Eduardo has uploaded a new change for review.
Change subject: Revert "pool: ignore refreshStoragePool calls on the SPM"
......................................................................
Revert "pool: ignore refreshStoragePool calls on the SPM"
This reverts commit 7d8f85547e5f56d3eefc91f330e29458a7b8ac27.
Change-Id: I660b8d01844520b43998b7081ca02ef06a5acd93
Signed-off-by: Eduardo <ewarszaw(a)redhat.com>
---
M vdsm/storage/hsm.py
1 file changed, 0 insertions(+), 14 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/27/13927/1
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index f3a702e..b560ea4 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -788,22 +788,8 @@
se.StoragePoolActionError(
"spUUID=%s, msdUUID=%s, masterVersion=%s" %
(spUUID, msdUUID, masterVersion)))
-
vars.task.getSharedLock(STORAGE, spUUID)
-
- try:
- # The refreshStoragePool command is an HSM command and
- # should not be issued (and executed) on the SPM. At the
- # moment we just ignore it for legacy reasons but in the
- # future vdsm could raise an exception.
- self.validateNotSPM(spUUID)
- except se.IsSpm:
- self.log.info("Ignoring the refreshStoragePool request "
- "(the host is the SPM)")
- return
-
pool = self.getPool(spUUID)
-
try:
self.validateSdUUID(msdUUID)
pool.refresh(msdUUID, masterVersion)
--
To view, visit http://gerrit.ovirt.org/13927
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I660b8d01844520b43998b7081ca02ef06a5acd93
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Eduardo <ewarszaw(a)redhat.com>
Eduardo has uploaded a new change for review.
Change subject: Remove force parameter in StoragePool.spmStop()
......................................................................
Remove force parameter in StoragePool.spmStop()
Change-Id: I7eaf8883e62a72445e27f0bc9876fe61a10bcb3f
Signed-off-by: Eduardo <ewarszaw(a)redhat.com>
---
M vdsm/storage/sp.py
1 file changed, 20 insertions(+), 18 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/29/13929/1
diff --git a/vdsm/storage/sp.py b/vdsm/storage/sp.py
index ca20f9a..70c5802 100644
--- a/vdsm/storage/sp.py
+++ b/vdsm/storage/sp.py
@@ -340,8 +340,8 @@
except Exception as e:
self.log.error("Unexpected error", exc_info=True)
- self.log.error("failed: %s" % str(e))
- self.stopSpm(force=True, __securityOverride=True)
+ self.log.error("failed: spmRole:%s %s", self.spmRole, str(e))
+ self.stopSpm(__securityOverride=True)
raise
@unsecured
@@ -392,44 +392,46 @@
else:
cls.log.debug("master `%s` is not mounted, skipping", master)
- def stopSpm(self, force=False):
+ def stopSpm(self):
with self.lock:
- if not force and self.spmRole == SPM_FREE:
+ if self.spmRole == SPM_FREE:
return True
self._shutDownUpgrade()
self._setUnsafe()
- stopFailed = False
-
+ failedStops = []
try:
self.cleanupMasterMount()
except:
# If unmounting fails the vdsm panics.
- stopFailed = True
+ failedStops.append("cleanupMasterMount")
- try:
- if self.spmMailer:
+ if self.spmMailer:
+ try:
self.spmMailer.stop()
- except:
- # Here we are just begin polite.
- # SPM will also clean this on start up.
- pass
+ except:
+ # Here we are just begin polite.
+ # SPM will also clean this on start up.
+ self.log.debug("fail: spmMailer %s", self.spmMailer)
- if not stopFailed:
+ if not failedStops:
try:
self.setMetaParam(PMDK_SPM_ID, SPM_ID_FREE,
__securityOverride=True)
except:
- pass # The system can handle this inconsistency
+ # The system can handle this inconsistency
+ self.log.debug("fail: reset %s to %s",
+ PMDK_SPM_ID, SPM_ID_FREE)
try:
self.masterDomain.releaseClusterLock()
except:
- stopFailed = True
+ failedStops.append("releaseClusterLock")
- if stopFailed:
- misc.panic("Unrecoverable errors during SPM stop process.")
+ if failedStops:
+ misc.panic("Unrecoverable errors during SPM stop process: %s.",
+ ", ".join(failedStops))
self.spmRole = SPM_FREE
--
To view, visit http://gerrit.ovirt.org/13929
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7eaf8883e62a72445e27f0bc9876fe61a10bcb3f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Eduardo <ewarszaw(a)redhat.com>
Dan Kenigsberg has uploaded a new change for review.
Change subject: hotunplug: Identify a nic according to its alias
......................................................................
hotunplug: Identify a nic according to its alias
MAC addresses may change. The "alias" is immutable.
Change-Id: Iae7619c2547d667103e33777180e01b285f4b18d
Bug-Url: https://bugzilla.redhat.com/919356
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M vdsm/libvirtvm.py
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/92/12892/1
diff --git a/vdsm/libvirtvm.py b/vdsm/libvirtvm.py
index 39d1b5b..99bf548 100644
--- a/vdsm/libvirtvm.py
+++ b/vdsm/libvirtvm.py
@@ -1669,7 +1669,8 @@
# Find NIC object in vm's NICs list
nic = None
for dev in self._devices[vm.NIC_DEVICES][:]:
- if dev.macAddr.lower() == nicParams['macAddr'].lower():
+ if dev.alias == nicParams.get('alias') or \
+ dev.macAddr.lower() == nicParams['macAddr'].lower():
nic = dev
break
--
To view, visit http://gerrit.ovirt.org/12892
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iae7619c2547d667103e33777180e01b285f4b18d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
Lee Yarwood has uploaded a new change for review.
Change subject: blockSD: Ensure active volumes are refreshed before use.
......................................................................
blockSD: Ensure active volumes are refreshed before use.
At present we trust that active LVs represent the current state of a
given LV. This may not be the case if the LV has been modified
(extended, recreated etc) by another host while the LV is active on
the current host.
This change forces active non-special LVs to be refresh before use.
Change-Id: If3058cded234500e01939e50b2485afebd7087a3
Signed-off-by: Lee Yarwood <lyarwood(a)redhat.com>
---
M vdsm/storage/blockSD.py
1 file changed, 11 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/87/21387/1
diff --git a/vdsm/storage/blockSD.py b/vdsm/storage/blockSD.py
index d27f331..7d296b7 100644
--- a/vdsm/storage/blockSD.py
+++ b/vdsm/storage/blockSD.py
@@ -1059,14 +1059,23 @@
def activateVolumes(self, imgUUID, volUUIDs):
"""
- Activate all the volumes belonging to the image.
+ Activate all the volumes belonging to the image. Refresh any active
+ volumes that belong to the image as long as they are not special.
- imgUUID: the image to be deactivated.
+ imgUUID: the image to be activated.
allVols: getAllVolumes result.
If the image is based on a template image it will be activated.
"""
+ toRefresh = [ vol for vol in volUUIDs if vol not in SPECIAL_LVS and
+ lvm.isLVActive(self.sdUUID, vol)]
lvm.activateLVs(self.sdUUID, volUUIDs)
+
+ if toRefresh:
+ log.warning("The following volumes are already active and will be"
+ " refreshed before use : %s", toRefresh)
+ lvm.refreshLVs(self.sdUUID, toRefresh)
+
vgDir = os.path.join("/dev", self.sdUUID)
return self.createImageLinks(vgDir, imgUUID, volUUIDs)
--
To view, visit http://gerrit.ovirt.org/21387
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If3058cded234500e01939e50b2485afebd7087a3
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Lee Yarwood <lyarwood(a)redhat.com>