Nir Soffer has uploaded a new change for review. Change subject: fileSD: Do not try to remove non-existent lease file ......................................................................
fileSD: Do not try to remove non-existent lease file The volume.lease file exists only if a domain has volume leases. Avoid removing the non-existent lease file and the bogus exception in the log when the operation "fails". Change-Id: I525704678707dfef40e34497bc4917dd19d73034 Bug-Url: https://bugzilla.redhat.com/1291207 Signed-off-by: Nir Soffer <nsof...@redhat.com> --- M vdsm/storage/fileSD.py 1 file changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/89/50589/1 diff --git a/vdsm/storage/fileSD.py b/vdsm/storage/fileSD.py index 85d9490..d6f4843 100644 --- a/vdsm/storage/fileSD.py +++ b/vdsm/storage/fileSD.py @@ -219,9 +219,10 @@ metaFile = volPath + '.meta' self.log.debug("Removing file: %s", metaFile) self.oop.os.remove(metaFile) - leaseFile = volPath + '.lease' - self.log.debug("Removing file: %s", leaseFile) - self.oop.os.remove(leaseFile) + if self.hasVolumeLeases(): + leaseFile = volPath + '.lease' + self.log.debug("Removing file: %s", leaseFile) + self.oop.os.remove(leaseFile) except OSError: self.log.error("vol: %s can't be removed.", volPath, exc_info=True) -- To view, visit https://gerrit.ovirt.org/50589 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I525704678707dfef40e34497bc4917dd19d73034 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer <nsof...@redhat.com> _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches