vm/qubesvm: fire 'domain-start-failed' event even if fail was early
Fire 'domain-start-failed' even even if failure occurred during 'domain-pre-start' event. This will make sure if _anyone_ have seen 'domain-pre-start' event, will also see 'domain-start-failed'. In some cases it will look like spurious 'domain-start-failed', but it is safer option than the alternative.
This commit is contained in:
parent
ba82d9dc21
commit
6a191febc3
@ -861,9 +861,14 @@ class QubesVM(qubes.vm.mix.net.NetVMMixin, qubes.vm.BaseVM):
|
||||
|
||||
self.log.info('Starting {}'.format(self.name))
|
||||
|
||||
yield from self.fire_event_async('domain-pre-start',
|
||||
pre_event=True,
|
||||
start_guid=start_guid, mem_required=mem_required)
|
||||
try:
|
||||
yield from self.fire_event_async('domain-pre-start',
|
||||
pre_event=True,
|
||||
start_guid=start_guid, mem_required=mem_required)
|
||||
except Exception as exc:
|
||||
yield from self.fire_event_async('domain-start-failed',
|
||||
reason=str(exc))
|
||||
raise
|
||||
|
||||
for devclass in self.devices:
|
||||
for dev in self.devices[devclass].persistent():
|
||||
|
Loading…
Reference in New Issue
Block a user