Francesco Romani has uploaded a new change for review. Change subject: vm: ensure graphics configuration data in recovery ......................................................................
vm: ensure graphics configuration data in recovery Graphics Devices may be not sent by Engine. To cover that VDSM reconstructs them from other VM configuration data - which is safe to do since the information is there, just organized in a different way. The recovery path skips that step, so the configuration is inconsistent. Later in the creation path the configuration is assumed to be present (either fixed by VDSM or given by Engine), but it is not, and this makes the domain initialization fail in the last stages. This is evident when upgrading Hosted Engine. This issue was unnoticed so far because the reccomended upgrade path is to migrate VMs away from the host being upgraded, and that avoid and triggers the existing safety nets for the missing configuration data. Change-Id: I6ed99b3e1a62d1e4c5bff5722bce9a966b193c73 Bug-Url: https://bugzilla.redhat.com/1168709 Signed-off-by: Francesco Romani <[email protected]> --- M vdsm/virt/vm.py 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/21/36021/1 diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py index 18af793..87e8de1 100644 --- a/vdsm/virt/vm.py +++ b/vdsm/virt/vm.py @@ -2614,6 +2614,9 @@ # So, to get proper device objects during VM recovery flow # we must to have updated conf before VM run self.saveState() + else: + # HE upgraded 3.4.x -> 3.5.x + self._fixLegacyConf() for devType, devClass in self.DeviceMapping: for dev in devices[devType]: @@ -5305,6 +5308,11 @@ if 'tlsPort' in dev: self.conf['displaySecurePort'] = dev['tlsPort'] + def _fixLegacyConf(self): + with self._confLock: + if not self._getFirstGraphicsDevice(): + self.conf['devices'].append(self.getConfGraphics()) + def _getFirstGraphicsDevice(self): for dev in self.conf.get('devices', ()): if dev.get('type') == GRAPHICS_DEVICES: -- To view, visit http://gerrit.ovirt.org/36021 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6ed99b3e1a62d1e4c5bff5722bce9a966b193c73 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
