Federico Simoncelli has posted comments on this change.
Change subject: vm: Avoid log spamming when drive format is undefined
......................................................................
Patch Set 1:
(1 comment)
....................................................
File vdsm/vm.py
Line 1407: return hasattr(self, "diskReplicate")
Line 1408:
Line 1409: def isExtendable(self):
Line 1410: # Note: format may not be defined during migration
Line 1411: return self.blockDev and getattr(self, 'format', None) ==
'cow'
There are tons of places where an AttributeError can happen, and we cannot fix them all
assuming potentially unsafe defaults.
I proposed to use __slots__, but also in that case the format cannot be assumed None or
"raw". It is mandatory.
The proper fix is to handle broken recovery files: if the parameter is missing we have to
find the value running a getVolumeInfo (or any other relevant command). In the same way we
could handle run/migrate requests that are lacking this value.
Line 1412:
Line 1413: @property
Line 1414: def volExtensionChunk(self):
Line 1415: """
--
To view, visit
http://gerrit.ovirt.org/22551
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia50e8af94b9c9b54332066a3f30999ce73e7a56f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Sergey Gotliv <sgotliv(a)redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes