Hello Vinzenz Feenstra, Dan Kenigsberg, Martin Polednik,
I'd like you to do a code review. Please visit
https://gerrit.ovirt.org/45018
to review the following change.
Change subject: vm: do not log known missing alias
......................................................................
vm: do not log known missing alias
Libvirt will not give back aliases for some devices, e.g.
graphic devices.
Avoid to worry the user and mislead troubleshooting with
error logs in those, well known and usually harmless cases.
X-Backport-To: 3.6
Change-Id: I63bc6d8f4b6fed52ee0af12f129007a1044d413b
Related-To: https://bugzilla.redhat.com/1248788
Signed-off-by: Francesco Romani <[email protected]>
Reviewed-on: https://gerrit.ovirt.org/44669
Reviewed-by: Vinzenz Feenstra <[email protected]>
Reviewed-by: Martin Polednik <[email protected]>
Reviewed-by: Dan Kenigsberg <[email protected]>
Continuous-Integration: Dan Kenigsberg <[email protected]>
---
M vdsm/virt/vm.py
M vdsm/virt/vmdevices/hwclass.py
2 files changed, 8 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/18/45018/1
diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index 0eff29a..3beca6b 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -4479,6 +4479,10 @@
for dev in self._devices[devType]:
if hasattr(dev, 'alias'):
aliasToDevice[dev.alias] = dev
+ elif devType == hwclass.WITHOUT_ALIAS:
+ # we expect these failures, we don't log
+ # to not confuse the user
+ pass
else:
self.log.error("Alias not found for device type %s "
"during migration at destination host" %
diff --git a/vdsm/virt/vmdevices/hwclass.py b/vdsm/virt/vmdevices/hwclass.py
index d44f0bc..fef5439 100644
--- a/vdsm/virt/vmdevices/hwclass.py
+++ b/vdsm/virt/vmdevices/hwclass.py
@@ -35,3 +35,7 @@
TPM = 'tpm'
HOSTDEV = 'hostdev'
MEMORY = 'memory'
+
+
+# libvirt is not giving back aliases
+WITHOUT_ALIAS = GRAPHICS
--
To view, visit https://gerrit.ovirt.org/45018
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I63bc6d8f4b6fed52ee0af12f129007a1044d413b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Francesco Romani <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Martin Polednik <[email protected]>
Gerrit-Reviewer: Vinzenz Feenstra <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches