[NEW PATCH] Related to BZ#713173 - Add killProc rollback to deleteImage (via gerrit-bot)

Igor Lvovsky ilvovsky at redhat.com
Sun Jul 17 10:33:26 UTC 2011


New patch submitted by Igor Lvovsky (ilvovsky at redhat.com)

You can review this change at: http://gerrit.usersys.redhat.com/707

commit e2825ec63de9c80c08bb1ec33bea0e04c938fa80
Author: Igor Lvovsky <ilvovsky at redhat.com>
Date:   Tue Jul 12 16:54:31 2011 +0300

    Related to BZ#713173 - Add killProc rollback to deleteImage
    
    When we run deleteImage with post-zeroing flag, we need to issue 'dd' for this.
    The rollback procedure for deleteImage it's actually roll forward.
    In this situation we need first to kill previous 'dd' operation that may hold
    file handler (or LV) open and prevent us to run the new deleteImage.
    Note that in case we need to run this roll forward action on different host (SPM switchover)
    the 'dd' killing will do nothing and still may fail.
    
    Change-Id: I1407626ab06583f5507f3aaa8ebf2a4e4edd60f9

diff --git a/vdsm/storage/blockVolume.py b/vdsm/storage/blockVolume.py
index 3da76fa..6b04047 100644
--- a/vdsm/storage/blockVolume.py
+++ b/vdsm/storage/blockVolume.py
@@ -261,7 +261,8 @@ class BlockVolume(volume.Volume):
                 # wipe out the whole volume
                 idle = config.getfloat('irs', 'idle')
                 try:
-                    misc.ddWatchCopy("/dev/zero", vol_path, vars.task.aborting, idle, int(size))
+                    misc.ddWatchCopy("/dev/zero", vol_path, vars.task.aborting, idle, int(size),
+                                     recoveryCallback=volume.baseAsyncTasksRollback)
                 except se.ActionStopped, e:
                     raise e
                 except Exception, e:




More information about the vdsm-patches mailing list