Eduardo has posted comments on this change.
Change subject: Relink template hard links to meta and lease files
......................................................................
Patch Set 1: I would prefer that you didn't submit this
(3 inline comments)
....................................................
File vdsm/storage/fileSD.py
Line 525:
Line 526: This function assumes that dom is backup dom and that template image is
Line 527: used by other volumes.
Line 528: """
Line 529: # Avoid relink templates for non-NFS domains
This check is redundant since an instance of this class _is_ a FileSD image and should be
re-linked.
Line 530: if self.getStorageType() not in [sd.NFS_DOMAIN]:
Line 531: self.log.debug("Doesn't relink templates non-NFS domain
%s",
Line 532: self.sdUUID)
Line 533: return
....................................................
File vdsm/storage/fileVolume.py
Line 540: def __metaVolumePath(cls, vol_path):
Line 541: if vol_path:
Line 542: return vol_path + META_FILEEXT
Line 543: else:
Line 544: return None
vol_path is mandatory and I see no reason for dealing with a "None" (or False or
weahtever param.)
Should be removed in __leaseVolumePath too.
Line 545:
Line 546: @classmethod
Line 547: def __leaseVolumePath(cls, vol_path):
Line 548: if vol_path:
....................................................
File vdsm/storage/sd.py
Line 785: (on NFS mostly) due to lazy file removal
Line 786: """
Line 787: pass
Line 788:
Line 789: def templateRelink(self, imgUUID, volUUID):
Since this class should be not instantiated in any form, this method should not be here.
Only instances that not support re-link, i.e. BlockSD, should have it, or gracefully raise
an AttributeError (default).
IMHO trying to do this should be and error.
But this will be addressed in a further patch.
Line 790: """
Line 791: Relink all hardlinks of the template 'volUUID' in all VMs based
on it.
Line 792:
Line 793: This function assumes that dom is backup dom and that template image is
--
To view, visit
http://gerrit.ovirt.org/12837
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Idce0f3f1812fdf45efeeeffcccb7dc22b3b0d0f0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yeela Kaplan <ykaplan(a)redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Eduardo <ewarszaw(a)redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server