From 8f443547fb70e01f7c165d3775dd12127d5288f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 4 Nov 2016 13:28:01 +0100 Subject: [PATCH] qubes/vm: disconnect from old QubesDB when going to start new instance QubesDB daemon no longer remove socket created by new instance, so one part of VM restart race condition is solved. The only remaining part is to ensure that we really connect to the new instance, instead of talking to the old one (soon to be terminated). Fixes QubesOS/qubes-issues#1694 --- qubes/vm/qubesvm.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qubes/vm/qubesvm.py b/qubes/vm/qubesvm.py index d6da4f3b..19646128 100644 --- a/qubes/vm/qubesvm.py +++ b/qubes/vm/qubesvm.py @@ -1173,9 +1173,10 @@ class QubesVM(qubes.vm.mix.net.NetVMMixin, qubes.vm.BaseVM): :raises OSError: when starting fails. ''' - self.log.info('Starting Qubes DB') + # drop old connection to QubesDB, if any + self._qdb_connection = None - # FIXME #1694 #1241 + self.log.info('Starting Qubes DB') try: self.start_daemon([ qubes.config.system_path["qubesdb_daemon_path"],