Hello Allon Mureinik, Francesco Romani,
I'd like you to do a code review. Please visit
https://gerrit.ovirt.org/47926
to review the following change.
Change subject: hotunplug: Supporting lun and cinder disks fix.
......................................................................
hotunplug: Supporting lun and cinder disks fix.
While hotunplugging, VDSM queries libvirt for the unplugged disk to
verify it was removed. This check is in _isDriveAttached, which verifies
that the disk's serial is no longer among the VM's disks. As LUN disks
and Cinder disks currently do not have a serial specified in VDSM flows,
after unplugging, _isDriveAttached queries for empty disk serial to
detect whether the disk is still there, and returns true in case there
are disks with empty serials- such as CD-ROM disks.
This patch fixes _isDriveAttached to check the disk's presence by
verifying that the disk's path no longer exists in the xml, rather
than the serial- to make it return the right value when unplugging
LUN and Cinder disks.
Change-Id: I826eba42903167988da1d02b916feb8fcd19258e
Bug-Url: https://bugzilla.redhat.com/1270834
Signed-off-by: Amit Aviram <aaviram(a)redhat.com>
Reviewed-on: https://gerrit.ovirt.org/47795
Continuous-Integration: Jenkins CI
Reviewed-by: Daniel Erez <derez(a)redhat.com>
Tested-by: Daniel Erez <derez(a)redhat.com>
Reviewed-by: Nir Soffer <nsoffer(a)redhat.com>
Reviewed-by: Francesco Romani <fromani(a)redhat.com>
Reviewed-on: https://gerrit.ovirt.org/47846
Reviewed-by: Allon Mureinik <amureini(a)redhat.com>
---
M vdsm/virt/vm.py
1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/26/47926/1
diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index 18bc228..72287fd 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -4150,7 +4150,9 @@
def _isDriveAttached(self, drive):
root = ET.fromstring(self._dom.XMLDesc(0))
- return bool(root.findall("./devices/disk[serial='%s']" % drive.serial))
+ source_key = 'dev' if drive.blockDev else 'file'
+ return bool(root.findall("./devices/disk/source[@%s='%s']" %
+ (source_key, drive.path)))
def _readPauseCode(self, timeout):
# libvirt does not not export yet the I/O error reason code.
--
To view, visit https://gerrit.ovirt.org/47926
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I826eba42903167988da1d02b916feb8fcd19258e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: Amit Aviram <aaviram(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Liron Aravot has uploaded a new change for review.
Change subject: hsm: prepareForShutdown - operations order
......................................................................
hsm: prepareForShutdown - operations order
Currently cleanupMasterMount() is executed before
taskMgr.prepareForShutdown() and before the domain monitor is stopped,
that causes to errors during the tasks abortion (becasue of failure to
access the path) and to erros when stopping the domain monitoring
thread on that domain.
The solution introduced in that patch is to change the order of the
operations - so that the cleanupMasterMount() will be executed only
after the other operations are executed.
Change-Id: I9edd84317b08a17db80e265053edaf69582c2a51
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1161934
Signed-off-by: Liron Aravot <laravot(a)redhat.com>
---
M vdsm/storage/hsm.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/62/36162/1
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index c8aaf93..8f71d71 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -3433,7 +3433,6 @@
# stop spm tasks if spm etc.)
try:
self._connectionMonitor.stopMonitoring()
- sp.StoragePool.cleanupMasterMount()
self.__releaseLocks()
for spUUID in self.pools:
@@ -3454,6 +3453,7 @@
exc_info=True)
self.taskMng.prepareForShutdown()
+ sp.StoragePool.cleanupMasterMount()
except:
pass
--
To view, visit http://gerrit.ovirt.org/36162
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9edd84317b08a17db80e265053edaf69582c2a51
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Liron Aravot <laravot(a)redhat.com>
Candace Sheremeta has uploaded a new change for review.
Change subject: vdsm: added functionality to teardownImage when disk has been deleted
......................................................................
vdsm: added functionality to teardownImage when disk has been deleted
added code to teardownImage in hsm.py so that teardownImage reports
"Volume does not exist" for a previously deleted disk, where it
previously simply reported "OK" - teardownImage now checks to see
if volume exists before attempting to delete it
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1184718
Change-Id: Ia929dfdc78ccaa736033e41a77bce861d5a27769
Signed-off-by: Candace Sheremeta <cshereme(a)redhat.com>
---
M vdsm/storage/hsm.py
1 file changed, 7 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/41/38241/1
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index 8c75277..45e6634 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -3271,6 +3271,13 @@
vars.task.getSharedLock(STORAGE, sdUUID)
dom = sdCache.produce(sdUUID)
+ allVols = dom.getAllVolumes()
+ # Filter volumes related to this image
+ imgVolumes = sd.getVolsOfImage(allVols, imgUUID).keys()
+
+ if volUUID not in imgVolumes:
+ raise se.VolumeDoesNotExist(volUUID)
+
dom.deactivateImage(imgUUID)
@public
--
To view, visit https://gerrit.ovirt.org/38241
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia929dfdc78ccaa736033e41a77bce861d5a27769
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Candace Sheremeta <cshereme(a)redhat.com>