All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Values of cpu_weight and cpu_cap are lost after xend restart - Correction/Extension of change set 22000
@ 2010-08-30  7:31 Dube, Lutz
  0 siblings, 0 replies; only message in thread
From: Dube, Lutz @ 2010-08-30  7:31 UTC (permalink / raw)
  To: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 1730 bytes --]

# 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@ts.fujitsu.com

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@ts.fujitsu.com

Internet:        http://ts.fujitsu.com<http://ts.fujitsu.com/>
Firmenangaben: http://de.ts.fujitsu.com/imprint.html





[-- Attachment #1.2: Type: text/html, Size: 4447 bytes --]

[-- Attachment #2: patch-cap_weight_corr --]
[-- Type: application/octet-stream, Size: 1306 bytes --]

# 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@ts.fujitsu.com

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 + \

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-08-30  7:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-30  7:31 [PATCH] Values of cpu_weight and cpu_cap are lost after xend restart - Correction/Extension of change set 22000 Dube, Lutz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.