Nir Soffer has uploaded a new change for review.
Change subject: fileSD: Keep deleted images name unique ......................................................................
fileSD: Keep deleted images name unique
If an image delete fails, and same image is created again, the second image cannot be deleted, since the first image occupy the deleted image name.
We use now _remove_me_<imagid>_<taskid>. This make it easy to locate the failed operation in vdsm or engine logs.
Change-Id: Ia0582896d7ede028e9096da1a688e3e449ab0258 Signed-off-by: Nir Soffer nsoffer@redhat.com --- M vdsm/storage/fileSD.py 1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/32/48032/1
diff --git a/vdsm/storage/fileSD.py b/vdsm/storage/fileSD.py index dc4a68e..7d8074a 100644 --- a/vdsm/storage/fileSD.py +++ b/vdsm/storage/fileSD.py @@ -34,6 +34,7 @@ import outOfProcess as oop from remoteFileHandler import Timeout from persistentDict import PersistentDict, DictValidator +from threadLocal import vars from vdsm import constants from vdsm.utils import stripNewLines from vdsm import supervdsm @@ -204,7 +205,8 @@ def deleteImage(self, sdUUID, imgUUID, volsImgs): currImgDir = self.getImagePath(imgUUID) dirName, baseName = os.path.split(currImgDir) - toDelDir = os.path.join(dirName, sd.REMOVED_IMAGE_PREFIX + baseName) + newName = "%s%s_%s" % (sd.REMOVED_IMAGE_PREFIX, baseName, vars.task.id) + toDelDir = os.path.join(dirName, newName) self.log.debug("Renaming dir %s to %s", currImgDir, toDelDir) try: self.oop.os.rename(currImgDir, toDelDir)
automation@ovirt.org has posted comments on this change.
Change subject: fileSD: Keep deleted images name unique ......................................................................
Patch Set 1:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
automation@ovirt.org has posted comments on this change.
Change subject: fileSD: Keep deleted images names unique ......................................................................
Patch Set 2:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
Jenkins CI RO has abandoned this change.
Change subject: fileSD: Keep deleted images names unique ......................................................................
Abandoned
Abandoned due to no activity - please restore if still relevant
gerrit-hooks has posted comments on this change.
Change subject: fileSD: Keep deleted images names unique ......................................................................
Patch Set 2:
* Update tracker: IGNORE, no Bug-Url found
vdsm-patches@lists.fedorahosted.org