[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] Improve error message when trying to pause / unpause domain 0.



# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Node ID 76e5bf49cb37aaedddf4e175efa906498a8df395
# Parent  989fd189f5299e60d399192cffe22098ec58b928
Improve error message when trying to pause / unpause domain 0.

Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendDomain.py |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff -r 989fd189f529 -r 76e5bf49cb37 tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py       Thu Nov 16 10:25:23 2006 +0000
+++ b/tools/python/xen/xend/XendDomain.py       Thu Nov 16 10:26:20 2006 +0000
@@ -948,10 +948,10 @@ class XendDomain:
             dominfo = self.domain_lookup_nr(domid)
             if not dominfo:
                 raise XendInvalidDomain(str(domid))
-            
+            if dominfo.getDomid() == DOM0_ID:
+                raise XendError("Cannot unpause privileged domain %s" % domid)
             log.info("Domain %s (%d) unpaused.", dominfo.getName(),
                      int(dominfo.getDomid()))
-            
             dominfo.unpause()
         except XendInvalidDomain:
             log.exception("domain_unpause")
@@ -973,6 +973,8 @@ class XendDomain:
             dominfo = self.domain_lookup_nr(domid)
             if not dominfo:
                 raise XendInvalidDomain(str(domid))
+            if dominfo.getDomid() == DOM0_ID:
+                raise XendError("Cannot pause privileged domain %s" % domid)
             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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.