Liron Aravot has uploaded a new change for review.
Change subject: hsm: lock pool when running upgradeStoragePool ......................................................................
hsm: lock pool when running upgradeStoragePool
When running upgradeStoragePool we use the pool metadata to know which domains needs upgrade, having no pool lock means that races with flows that manipulate the pool metadata like activateSd and deactivateSd might occur.
Change-Id: I1d5b65a75b1b50d5f5991334cf6221c067a31f5b Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1260429 Signed-off-by: Liron Aravot laravot@redhat.com --- M vdsm/storage/hsm.py 1 file changed, 5 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/77/45977/1
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py index 57063f1..da571fc 100644 --- a/vdsm/storage/hsm.py +++ b/vdsm/storage/hsm.py @@ -3550,7 +3550,11 @@ def upgradeStoragePool(self, spUUID, targetDomVersion): targetDomVersion = int(targetDomVersion) pool = self.getPool(spUUID) - pool._upgradePool(targetDomVersion) + # This lock has to be mutual with the pool metadata operations (like + # activateSD/deactivateSD) as it uses the pool metadata. + with rmanager.acquireResource(STORAGE, spUUID, + rm.LockType.exclusive): + pool._upgradePool(targetDomVersion) return {"upgradeStatus": "started"}
def _getDomsStats(self, domainMonitor, doms):
automation@ovirt.org has posted comments on this change.
Change subject: hsm: lock pool when running upgradeStoragePool ......................................................................
Patch Set 1: Verified-1
* Update tracker::#1260429::OK * Check Bug-Url::OK * Check Public Bug::#1260429::OK, public bug * Check Product::#1260429::OK, Correct product Red Hat Enterprise Virtualization Manager * Check TR::#1260429::OK, correct target release 3.5.5 * Check merged to previous::WARN, Still open on branches ovirt-3.6, master
Liron Aravot has posted comments on this change.
Change subject: hsm: lock pool when running upgradeStoragePool ......................................................................
Patch Set 1: Verified+1
automation@ovirt.org has posted comments on this change.
Change subject: hsm: lock pool when running upgradeStoragePool ......................................................................
Patch Set 2: Verified-1
* Update tracker::#1260429::OK * Check Bug-Url::OK * Check Public Bug::#1260429::OK, public bug * Check Product::#1260429::OK, Correct product Red Hat Enterprise Virtualization Manager * Check TR::#1260429::OK, correct target release 3.5.5 * Check merged to previous::WARN, Still open on branches ovirt-3.6, master
automation@ovirt.org has posted comments on this change.
Change subject: hsm: lock pool when running upgradeStoragePool ......................................................................
Patch Set 3: Verified-1
* Update tracker::#1260429::OK * Check Bug-Url::OK * Check Public Bug::#1260429::OK, public bug * Check Product::#1260429::OK, Correct product Red Hat Enterprise Virtualization Manager * Check TR::#1260429::OK, correct target release 3.5.5 * Check merged to previous::WARN, Still open on branches ovirt-3.6, master
Liron Aravot has posted comments on this change.
Change subject: hsm: lock pool when running upgradeStoragePool ......................................................................
Patch Set 3: Verified+1
Liron Aravot has posted comments on this change.
Change subject: hsm: lock pool when running upgradeStoragePool ......................................................................
Patch Set 3: -Verified
automation@ovirt.org has posted comments on this change.
Change subject: hsm: lock pool when running upgradeStoragePool ......................................................................
Patch Set 4: Verified-1
* Update tracker::#1260429::OK * Check Bug-Url::OK * Check Public Bug::#1260429::OK, public bug * Check Product::#1260429::OK, Correct product Red Hat Enterprise Virtualization Manager * Check TR::#1260429::OK, correct target release 3.5.5 * Check merged to previous::WARN, Still open on branches ovirt-3.6, master
automation@ovirt.org has posted comments on this change.
Change subject: hsm: lock pool when running upgradeStoragePool ......................................................................
Patch Set 5: Verified-1
* Update tracker::#1260429::OK * Check Bug-Url::OK * Check Public Bug::#1260429::OK, public bug * Check Product::#1260429::OK, Correct product Red Hat Enterprise Virtualization Manager * Check TR::#1260429::OK, correct target release 3.5.5 * Check merged to previous::WARN, Still open on branches ovirt-3.6, master
Liron Aravot has posted comments on this change.
Change subject: hsm: lock pool when running upgradeStoragePool ......................................................................
Patch Set 5: Verified+1
Nir Soffer has posted comments on this change.
Change subject: hsm: lock pool when running upgradeStoragePool ......................................................................
Patch Set 5: Code-Review+1
automation@ovirt.org has posted comments on this change.
Change subject: hsm: lock pool when running upgradeStoragePool ......................................................................
Patch Set 6: -Verified
* Update tracker::#1269187::OK * Check Bug-Url::OK * Check Public Bug::#1269187::OK, public bug * Check Product::#1269187::OK, Correct product Red Hat Enterprise Virtualization Manager * Check TM::#1269187::ERROR, wrong target milestone for stable branch, --- should match ^.*3.5.* * Check merged to previous::OK, change not open on any previous branch
Francesco Romani has posted comments on this change.
Change subject: hsm: lock pool when running upgradeStoragePool ......................................................................
Patch Set 6: Code-Review+2
Francesco Romani has posted comments on this change.
Change subject: hsm: lock pool when running upgradeStoragePool ......................................................................
Patch Set 6: Continuous-Integration+1
Francesco Romani has submitted this change and it was merged.
Change subject: hsm: lock pool when running upgradeStoragePool ......................................................................
hsm: lock pool when running upgradeStoragePool
When running upgradeStoragePool we use the pool metadata to know which domains needs upgrade, having no pool lock means that races with flows that manipulate the pool metadata like activateSd and deactivateSd might occur.
Change-Id: I1d5b65a75b1b50d5f5991334cf6221c067a31f5b Bug-Url: https://bugzilla.redhat.com/1269187 Signed-off-by: Liron Aravot laravot@redhat.com Reviewed-on: https://gerrit.ovirt.org/45977 Reviewed-by: Nir Soffer nsoffer@redhat.com Reviewed-by: Francesco Romani fromani@redhat.com Continuous-Integration: Francesco Romani fromani@redhat.com --- M vdsm/storage/hsm.py 1 file changed, 3 insertions(+), 0 deletions(-)
Approvals: Nir Soffer: Looks good to me, but someone else must approve Francesco Romani: Looks good to me, approved; Passed CI tests Liron Aravot: Verified
automation@ovirt.org has posted comments on this change.
Change subject: hsm: lock pool when running upgradeStoragePool ......................................................................
Patch Set 7:
* Update tracker::#1269187::OK * Set MODIFIED::bug 1269187::::#1269187::::IGNORE, not oVirt prod but Red Hat Enterprise Virtualization Manager
vdsm-patches@lists.fedorahosted.org