Change in vdsm[master]: sp: allow executing upgradePool even if there is a pending u...

nsoffer at redhat.com nsoffer at redhat.com
Sun May 8 12:56:52 UTC 2016


Nir Soffer has posted comments on this change.

Change subject: sp: allow executing upgradePool even if there is a pending update
......................................................................


Patch Set 2:

(4 comments)

https://gerrit.ovirt.org/#/c/57188/2/vdsm/storage/sp.py
File vdsm/storage/sp.py:

Line 174
Line 175
Line 176
Line 177
Line 178
This removes the upgrade_domain_uuid lock, right?


Line 202
Line 203
Line 204
Line 205
Line 206
This changes pool, se we need exclusive lock on the pool for this operation.

list.remove() should be thread safe, but it is not documented as such.


Line 203
Line 204
Line 205
Line 206
Line 207
This also changes the pool state, needs an exclusive lock on the pool.

We can do this:

    with rmanager.acquireResource(STORAGE, "upgrade_" + self.spUUID, rm.LockType.shared):
        with rmanager.acquireResource(STORAGE, sdUUID, rm.LockType.exclusive):
            upgrade domain...

    with rmanager.acquireResource(STORAGE, self.spUUID, rm.LockType.exclusive):
        clear domain uuid and finallize if needed


Line 374
Line 375
Line 376
Line 377
Line 378
Nice!


-- 
To view, visit https://gerrit.ovirt.org/57188
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8e14a3aa33bfab4751ab5d1e3becbeda892da4c3
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list