Change in vdsm[master]: sp: update domain links on state change

ishaby at redhat.com ishaby at redhat.com
Mon Jan 18 08:29:48 UTC 2016


Idan Shaby has posted comments on this change.

Change subject: sp: update domain links on state change
......................................................................


Patch Set 7:

(4 comments)

https://gerrit.ovirt.org/#/c/51393/7//COMMIT_MSG
Commit Message:

Line 34:   we won't be listening to events that cannot be called anymore.
Line 35: 
Line 36: - This patch locks the pool and the domain id's in _domainStateChange:
Line 37:   On the pool, a shared lock is taken since we query the pool's state.
Line 38:   On the domain, an exclusive lock is taken to prevent concurrent calls
> We take a new <domain_uuid>_refresh exclusive lock
Done
Line 39:   to_refreshDomainLinks, which contains thread unsafe parts of vdsm
Line 40:   (lvm), and to prevent failures when checking and modifying symbolic
Line 41:   links.
Line 42: 


Line 36: - This patch locks the pool and the domain id's in _domainStateChange:
Line 37:   On the pool, a shared lock is taken since we query the pool's state.
Line 38:   On the domain, an exclusive lock is taken to prevent concurrent calls
Line 39:   to_refreshDomainLinks, which contains thread unsafe parts of vdsm
Line 40:   (lvm), and to prevent failures when checking and modifying symbolic
> Remove the part about thread unsafe parts in vdsm (lvm), this lock does not
Done
Line 41:   links.
Line 42: 
Line 43: Relates-To: https://bugzilla.redhat.com/show_bug.cgi?id=1091030
Line 44: Bug-Url: https://bugzilla.redhat.com/1271771


https://gerrit.ovirt.org/#/c/51393/7/vdsm/storage/sp.py
File vdsm/storage/sp.py:

Line 145:         domain = sdCache.produce(sdUUID)
Line 146:         with rmanager.acquireResource(STORAGE, self.spUUID,
Line 147:                                       rm.LockType.shared):
Line 148:             if sdUUID not in self.getDomains(activeOnly=True):
Line 149:                 self.log.debug("Domain %s is not active, "
> an active?
Done
Line 150:                                "skipping domain links refresh",
Line 151:                                sdUUID)
Line 152:                 return
Line 153:             with rmanager.acquireResource(STORAGE, sdUUID + "_refresh",


Line 149:                 self.log.debug("Domain %s is not active, "
Line 150:                                "skipping domain links refresh",
Line 151:                                sdUUID)
Line 152:                 return
Line 153:             with rmanager.acquireResource(STORAGE, sdUUID + "_refresh",
> Better - "_repo"  - this is about the local file system stuff associated wi
Done
Line 154:                                           rm.LockType.exclusive):
Line 155:                 self.log.debug("Refreshing domain links for %s", sdUUID)
Line 156:                 self._refreshDomainLinks(domain)
Line 157: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: If116100d3ae967f6a5490a2d91bf923e953cb4ee
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Idan Shaby <ishaby at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Ala Hino <ahino at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland at redhat.com>
Gerrit-Reviewer: Idan Shaby <ishaby at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list