From 25b2062b471c965170d6ad7b0bdf40338e97d330 Mon Sep 17 00:00:00 2001 From: Mate Lakat Date: Tue, 25 Sep 2012 16:00:31 +0100 Subject: Fix XenServer's ability to boot xen type images Fixes bug 1055431. As the scheduler wants to boot a vm_mode=xen type of image, the host's "supported_instances" capability is used for finding a good candidate. In the Xapi case, this field was not populated. This fix modifies the xapi xenhost plugin, so the Xen host capabilities are returned back to the compute node, as "host_capabilities". On the compute side, the mentioned information is used, to extract the "supported_instances" information. Change-Id: I2da11ab81f74b5b52e2c30832a694470978e21b0 --- plugins/xenserver/xenapi/etc/xapi.d/plugins/xenhost | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenhost b/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenhost index e556931bb..4d2193908 100755 --- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenhost +++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenhost @@ -398,7 +398,9 @@ def cleanup(dct): for oc_fld in oc.split("; "): ock, ocv = strip_kv(oc_fld) ocd[ock] = ocv -# out["host_capabilities"] = dct.get("capabilities", "").split("; ") + + capabilities = dct.get("capabilities", "") + out["host_capabilities"] = capabilities.replace(";", "").split() # out["host_allowed-operations"] = dct.get( # "allowed-operations", "").split("; ") # lsrv = dct.get("license-server", "") -- cgit