Nir Soffer has posted comments on this change.
Change subject: Add additional vgcheck to fix vgextend workflow on HSMs. ......................................................................
Patch Set 9: Code-Review-1
(1 comment)
I don't understand how this fixes the related bug. If the issue was a missing pv, how running vgchk again fixes the missing pv?
If the issue is stale filters, why not invalidate the filters in _reloadvgs, when we find that a vg has missing pv? Why wait until selftest()?
.................................................... File vdsm/storage/blockSD.py Line 844: Line 845: if now - self._lastUncachedSelftest > timeout or \ Line 846: lvm.getVG(self.sdUUID).partial != lvm.VG_OK: Line 847: self._lastUncachedSelftest = now Line 848: lvm.chkVG(self.sdUUID) The indentation is wrong, and using \ for breaking long lines is not recommended.
If this is indeed a correct fix, I think this would be a more clear:
isStale = now - self._lastUncachedSelftest > timeout isPartial = lvm.getVG(self.sdUUID).partial != lvm.VG_OK
if isStale or isPartial: self._lastUncachedSelftest = now lvm.chkVG(self.sdUUID) Line 849: Line 850: def validate(self): Line 851: """ Line 852: Validate that the storage domain metadata