vm: report storage.stop() errors to log

Catch exception there and log it. Otherwise asyncio complains about not
retrieved exception. There is no one else to handle this exception,
because shutdown event is triggered from libvirt, not any Admin API.
This commit is contained in:
Marek Marczykowski-Górecki 2017-09-28 02:38:28 +02:00
parent 97e3dced92
commit b12fa13f06
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -876,7 +876,11 @@ class QubesVM(qubes.vm.mix.net.NetVMMixin, qubes.vm.BaseVM):
Do not allow domain to be started again until this finishes.
'''
with (yield from self.startup_lock):
yield from self.storage.stop()
try:
yield from self.storage.stop()
except qubes.storage.StoragePoolException:
self.log.exception('Failed to stop storage for domain %s',
self.name)
@qubes.events.handler('domain-shutdown')
def on_domain_shutdown(self, _event, **_kwargs):