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.
Tento commit je obsažen v:
Marek Marczykowski-Górecki 2017-09-28 02:38:28 +02:00
rodič 97e3dced92
revize b12fa13f06
V databázi nebyl nalezen žádný známý klíč pro tento podpis
ID GPG klíče: 063938BA42CFA724

Zobrazit soubor

@ -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):
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):