Reject xm shutdown to the paused domain
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
@@ -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
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
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