From b12fa13f06e425905c9e3b4534357877f868ea2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Thu, 28 Sep 2017 02:38:28 +0200 Subject: [PATCH] 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. --- qubes/vm/qubesvm.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qubes/vm/qubesvm.py b/qubes/vm/qubesvm.py index 67dcabd2..c187c65d 100644 --- a/qubes/vm/qubesvm.py +++ b/qubes/vm/qubesvm.py @@ -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):