WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] tools: fix cpu_weight/cap loss (22000:4fc

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] tools: fix cpu_weight/cap loss (22000:4fc66044477d)
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 04 Nov 2010 16:50:28 -0700
Delivery-date: Thu, 04 Nov 2010 16:52:17 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Lutz Dube <lutz.dube@xxxxxxxxxxxxxx>
# Date 1288805022 0
# Node ID a5ee42d0cf2e477da120783c5dd8148cb69ca595
# Parent  39e4f93f01a45a2f0494e99ae5bd4da4fc33021f
tools: fix cpu_weight/cap loss (22000:4fc66044477d)

Correction/Extension of changeset 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>
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendConfig.py |    5 +++++
 1 files changed, 5 insertions(+)

diff -r 39e4f93f01a4 -r a5ee42d0cf2e tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py       Wed Nov 03 12:51:14 2010 +0000
+++ b/tools/python/xen/xend/XendConfig.py       Wed Nov 03 17:23:42 2010 +0000
@@ -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 + \

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] tools: fix cpu_weight/cap loss (22000:4fc66044477d), Xen patchbot-unstable <=