core: improve handling QubesDB startup errors

Kill the VM when QubesDB initialization fails, in any way, not only
QubesDB daemon itself.
This commit is contained in:
Marek Marczykowski-Górecki 2015-10-13 23:49:32 +02:00
parent 5c549e1134
commit 75168c8aef
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -1759,7 +1759,6 @@ class QubesVm(object):
str(self.xid),
self.name])
if retcode != 0:
self.force_shutdown()
raise OSError("ERROR: Cannot execute qubesdb-daemon!")
def request_memory(self, mem_required = None):
@ -1833,6 +1832,7 @@ class QubesVm(object):
self.libvirt_domain.createWithFlags(libvirt.VIR_DOMAIN_START_PAUSED)
try:
if verbose:
print >> sys.stderr, "--> Starting Qubes DB..."
self.start_qubesdb()
@ -1858,6 +1858,9 @@ class QubesVm(object):
for hook in self.hooks_start:
hook(self, verbose = verbose, preparing_dvm = preparing_dvm,
start_guid = start_guid, notify_function = notify_function)
except:
self.force_shutdown()
raise
if verbose:
print >> sys.stderr, "--> Starting the VM..."