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] xend: Fix xm pause/unpause for inactive m

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xend: Fix xm pause/unpause for inactive managed domains.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 10 Jul 2007 04:32:23 -0700
Delivery-date: Tue, 10 Jul 2007 04:30:36 -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 kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1184058901 -3600
# Node ID 80099a459d7a2f9c2d7f895ffc8854ca9435206d
# Parent  3f2d2adc87f708e269247e5e89eef3c2c595d83b
xend: Fix xm pause/unpause for inactive managed domains.
Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendDomain.py |    8 ++++++++
 1 files changed, 8 insertions(+)

diff -r 3f2d2adc87f7 -r 80099a459d7a tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py       Tue Jul 10 10:13:16 2007 +0100
+++ b/tools/python/xen/xend/XendDomain.py       Tue Jul 10 10:15:01 2007 +0100
@@ -1112,6 +1112,10 @@ class XendDomain:
                 raise XendInvalidDomain(str(domid))
             if dominfo.getDomid() == DOM0_ID:
                 raise XendError("Cannot unpause privileged domain %s" % domid)
+            if dominfo._stateGet() not in (DOM_STATE_PAUSED, 
DOM_STATE_RUNNING):
+                raise VMBadState("Domain '%s' is not started" % domid,
+                                 POWER_STATE_NAMES[DOM_STATE_PAUSED],
+                                 POWER_STATE_NAMES[dominfo._stateGet()])
             log.info("Domain %s (%d) unpaused.", dominfo.getName(),
                      int(dominfo.getDomid()))
             dominfo.unpause()
@@ -1137,6 +1141,10 @@ class XendDomain:
                 raise XendInvalidDomain(str(domid))
             if dominfo.getDomid() == DOM0_ID:
                 raise XendError("Cannot pause privileged domain %s" % domid)
+            if dominfo._stateGet() not in (DOM_STATE_RUNNING, 
DOM_STATE_PAUSED):
+                raise VMBadState("Domain '%s' is not started" % domid,
+                                 POWER_STATE_NAMES[DOM_STATE_RUNNING],
+                                 POWER_STATE_NAMES[dominfo._stateGet()])
             log.info("Domain %s (%d) paused.", dominfo.getName(),
                      int(dominfo.getDomid()))
             dominfo.pause()

_______________________________________________
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] xend: Fix xm pause/unpause for inactive managed domains., Xen patchbot-unstable <=