# HG changeset patch
# User Lutz.Dube
# Node ID 72ab023329a873e86be90c469d716cf7c9483e77
# Parent 3c4c3d48a8350994f4450314c6b759771c7ad4ef
Correction/Extension of change set 22000:4fc66044477d:
Values of cpu_weight and cpu_cap are lost after xend restart.
Values of cpu_weight and cpu_cap taken from managed SXP file have to
be converted from str to int.
Signed-off-by: Lutz Dube Lutz.Dube@xxxxxxxxxxxxxx
diff -r 3c4c3d48a835 -r 72ab023329a8 tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py Thu Aug 26 11:16:56 2010 +0100
+++ b/tools/python/xen/xend/XendConfig.py Mon Aug 30 09:17:44 2010 +0200
@@ -689,9 +689,14 @@ class XendConfig(dict):
if not cfg["vcpus_params"].has_key("weight"):
cfg["vcpus_params"]["weight"] = \
int(sxp.child_value(sxp_cfg, "cpu_weight", 256))
+ else:
+ cfg["vcpus_params"]["weight"] = int(cfg["vcpus_params"]["weight"])
+
if not cfg["vcpus_params"].has_key("cap"):
cfg["vcpus_params"]["cap"] = \
int(sxp.child_value(sxp_cfg, "cpu_cap", 0))
+ else:
+ cfg["vcpus_params"]["cap"] = int(cfg["vcpus_params"]["cap"])
# Only extract options we know about.
extract_keys = LEGACY_UNSUPPORTED_BY_XENAPI_CFG + \
---
Best regards
Lutz Dube
Softwareentwickler
TSP ES&S SWE OS7
FUJITSU TECHNOLOGY SOLUTIONS GMBH
Domagkstr. 28
D-80807 München
Telefon: +49 (0)89 3222 2688
Telefax: +49 (0)89 3222 329 2688
Email: Lutz Dube@xxxxxxxxxxxxxx