bitkeeper revision 1.1159.1.174 (41544174lO23TSzrMCtW6FnECUFlnQ)

Revert to constructing image first when creating a domain - doing
it later breaks restore.
This commit is contained in:
mjw@wray-m-3.hpl.hp.com committed 2004-09-24 15:47:00 +00:00
1 parent 34fe926686
commit 04e12a3139
4 files changed
+36 -20

No files matched your search

+10 -9
View File
@@ -500,16 +500,14 @@ class XendDomainInfo:
raise VmError('missing memory size')
self.init_domain()
self.construct_image()
self.configure_console()
self.configure_restart()
self.configure_backends()
deferred = self.configure()
def cbok(val):
return self.construct_image()
def cberr(err):
self.destroy()
return err
deferred.addCallback(cbok)
deferred.addErrback(cberr)
except StandardError, ex:
# Catch errors, cleanup and re-raise.
@@ -651,12 +649,7 @@ class XendDomainInfo:
devices have been released.
"""
if self.dom is None: return 0
if self.console:
if self.restart_pending():
self.console.deregisterChannel()
else:
log.debug('Closing console, domain %s', self.id)
self.console.close()
self.destroy_console()
chan = xend.getDomChannel(self.dom)
if chan:
log.debug("Closing channel to domain %d", self.dom)
@@ -666,6 +659,14 @@ class XendDomainInfo:
except Exception, err:
log.exception("Domain destroy failed: %s", self.name)
def destroy_console(self):
if self.console:
if self.restart_pending():
self.console.deregisterChannel()
else:
log.debug('Closing console, domain %s', self.id)
self.console.close()
def cleanup(self):
"""Cleanup vm resources: release devices.
"""
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.