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] Fix a problem where the vcpu count for do

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Fix a problem where the vcpu count for dom0 doesn't get reset back to the
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 07 Jun 2006 11:40:12 +0000
Delivery-date: Wed, 07 Jun 2006 04:42:06 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 pl@xxxxxxxxxx
# Node ID 647d012b9a36be50d10c4da8dd571f8faa9b4d91
# Parent  057c5554f8c3dc7c36a4b89ecec52cbf7d917f73
Fix a problem where the vcpu count for dom0 doesn't get reset back to the
original value when 01_enforce_dom0_cpus_basic_pos fails.
---
 tools/xm-test/tests/enforce_dom0_cpus/01_enforce_dom0_cpus_basic_pos.py |   21 
+++++-----
 1 files changed, 11 insertions(+), 10 deletions(-)

diff -r 057c5554f8c3 -r 647d012b9a36 
tools/xm-test/tests/enforce_dom0_cpus/01_enforce_dom0_cpus_basic_pos.py
--- a/tools/xm-test/tests/enforce_dom0_cpus/01_enforce_dom0_cpus_basic_pos.py   
Thu Jun 01 11:57:33 2006 +0100
+++ b/tools/xm-test/tests/enforce_dom0_cpus/01_enforce_dom0_cpus_basic_pos.py   
Thu Jun 01 12:11:59 2006 +0100
@@ -28,6 +28,12 @@ check_status = 1
 check_status = 1
 max_tries = 10
 
+def reset_vcpu_count():
+    status, output = traceCommand("xm vcpu-set 0 %s"%(dom0_online_vcpus))
+    if status != 0:
+        print "WARNING!!! Unable to set vcpus back to %s, please set manually"\
+            %(dom0_online_vcpus)
+
 # 1) Make sure we have a multi cpu system and dom0 has at least 2 vcpus online.
 
 if smpConcurrencyLevel() <= 1:
@@ -57,6 +63,7 @@ if check_status and status != 0:
 # 4) restart xend with new config
 os.putenv("XEND_CONFIG", "/tmp/xend-config.sxp")
 status = restartXend()
+os.unsetenv("XEND_CONFIG")
 if check_status and status != 0:
     ns, no = restartXend()
     if ns != 0:
@@ -75,7 +82,7 @@ while timeout + starttime > time.time():
     cmd = "grep \"^processor\" /proc/cpuinfo | wc -l"
     status, output = traceCommand(cmd)
     if check_status and status != 0:
-        os.unsetenv("XEND_CONFIG")
+        reset_vcpu_count()
         restartXend()
         FAIL("\"%s\" returned invalid %i != 0" %(cmd,status))
 # Has it succeeded? If so, we can leave the loop
@@ -84,7 +91,7 @@ while timeout + starttime > time.time():
 # Sleep for 1 second before trying again
     time.sleep(1)
 if output != str(enforce_dom0_cpus):
-    os.unsetenv("XEND_CONFIG")
+    reset_vcpu_count()
     restartXend()
     FAIL("/proc/cpuinfo says xend didn't enforce dom0_cpus (%s != 
%s)"%(output, 
                                                              
enforce_dom0_cpus))
@@ -92,17 +99,13 @@ if output != str(enforce_dom0_cpus):
 # 6) count number of online cpus and see that it matches enforce value
 num_online = int(getDomInfo("Domain-0", "VCPUs"))
 if num_online != enforce_dom0_cpus:
-    os.unsetenv("XEND_CONFIG")
+    reset_vcpu_count()
     restartXend()
     FAIL("xm says xend didn't enforce dom0_cpus (%s != %s)" %(num_online, 
                                                              
enforce_dom0_cpus))
 
 # 7) restore dead processors 
-status, output = traceCommand("xm vcpu-set 0 %s"%(dom0_online_vcpus))
-if check_status and status != 0:
-    os.unsetenv("XEND_CONFIG")
-    restartXend()
-    FAIL("\"%s\" returned invalid %i != 0" %(cmd,status))
+reset_vcpu_count()
 
 # check restore worked
 # Since this also takes time, we will do it in a loop with a 20 second timeout.
@@ -114,12 +117,10 @@ while timeout + starttime > time.time():
         break
     time.sleep(1)
 if num_online != dom0_online_vcpus:
-    os.unsetenv("XEND_CONFIG")
     restartXend()
     FAIL("failed to restore dom0's VCPUs")
 
 
 # 8) Restart xend with default config
-os.unsetenv("XEND_CONFIG")
 restartXend()
 

_______________________________________________
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] Fix a problem where the vcpu count for dom0 doesn't get reset back to the, Xen patchbot-unstable <=