Skip to contentSkip to conversation

Reject xm shutdown to the paused domain

PATCH In review Masaki Kanno 2 participants 3 messages Aug 1, 2006 – Aug 3, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Reject xm shutdown to the paused domain

Hi,

This patch rejects the xm shutdown/reboot command to the domain of the paused state. By the user's mistake, the domain is not destroyed.

Best regards,
Kan

tools/python/xen/xend/XendDomainInfo.py +4 -0
diff -r d2bf1a7cc131 tools/python/xen/xend/XendDomainInfo.py
@@ -945,6 +945,10 @@ class XendDomainInfo:
             raise XendError('Invalid reason: %s' % reason)
         if self.domid == 0:
             raise XendError("Can't specify Domain-0")
+        xeninfo = dom_get(self.domid)
+        if xeninfo is not None:
+            if xeninfo['paused']:
+                raise XendError("Domain %d has been pausing." % self.domid)
         self.storeDom("control/shutdown", reason)
 
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw
Quoted 2 lines · Masaki Kanno

This patch rejects the xm shutdown/reboot command to the domain of the paused state. By the user's mistake, the domain is not destroyed.

A domain can be paused for short period for all sorts of reasons outside the control of the administrator, so this doesn't seem a good extra check to add. Arguably better would be to remove xm pause/unpause altogether. I doubt they are really practically useful.

-- Keir

#2 lore raw

Hi Keir,

Thanks for your comment.
There may be users needing xm pause/unpause. Maybe...

Best regards,
Kan

Quoted 12 lines · Masaki Kanno
Quoted 3 lines

This patch rejects the xm shutdown/reboot command to the domain of the paused state. By the user's mistake, the domain is not destroyed.

A domain can be paused for short period for all sorts of reasons outside the control of the administrator, so this doesn't seem a good extra check to add. Arguably better would be to remove xm pause/unpause altogether. I doubt they are really practically useful.

-- Keir