Fix managed domain rebooting by only complaining about a VM name conflict if

the VM UUID conflicts as well.

Also, remove the previous_restart_time node when explicitly rebooting a guest --
the user ought to be able to drive reboots faster than the safety catch.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
This commit is contained in:
Ewan Mellor committed 2006-11-30 20:07:58 +00:00
1 parent be61b6ee05
commit f99727ee65
1 file changed
+5 -3
+5 -3
View File
@@ -479,8 +479,9 @@ class XendDomainInfo:
if reason not in DOMAIN_SHUTDOWN_REASONS.values():
raise XendError('Invalid reason: %s' % reason)
self._removeVm('xend/previous_restart_time')
self.storeDom("control/shutdown", reason)
def pause(self):
"""Pause domain
@@ -1692,8 +1693,9 @@ class XendDomainInfo:
raise VmError('Invalid VM Name')
dom = XendDomain.instance().domain_lookup_nr(name)
if dom and dom != self and not dom.info['dying']:
raise VmError("VM name '%s' already exists" % name)
if dom and dom.info['uuid'] != self.info['uuid']:
raise VmError("VM name '%s' already exists as domain %s" %
(name, str(dom.domid)))
def update(self, info = None, refresh = True):
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.