Change in vdsm[master]: BZ#808874 Skip master validation on repoStat

fsimonce at redhat.com fsimonce at redhat.com
Thu Jun 7 12:10:25 UTC 2012


Federico Simoncelli has uploaded a new change for review.

Change subject: BZ#808874 Skip master validation on repoStat
......................................................................

BZ#808874 Skip master validation on repoStat

The current master validation code is affected by two different race
conditions triggered by both startSpm and stopSpm.

The first and clearer race condition is triggered by the master status
(fetched asynchronously by the domainMonitor thread) that could be
several seconds old. Comparing such status with the current SPM role
(SPM/HSM) during a transition (startSpm, stopSpm) is wrong.

The second race condition (more difficult to expose) happens again
during the startSpm/stopSpm methods since the mount/unmount of the
master domain is not atomic with the switch of the SPM role.

The correct way to solve this issue is to maintain the SPM role in
the domainMonitor thread so that it can be atomically paired with
the mount status. To do so we would need to introduce two new methods
to signal to the domainMonitor the beginning and the end of a transition
(startSpm, stopSpm) and ts final outcome (role = SPM/HSM).

Implementing such complicate infrastructure just to maintain this
validation is an overdesign given that two problematic situations
(SMP-master-not-valid and HSM-master-mounted) should be addressed in a
different way by VDSM and not reported to the engine.

Change-Id: I837877b5431edc3cfc6648e8fb654df2291413fc
Signed-off-by: Federico Simoncelli <fsimonce at redhat.com>
---
M vdsm/storage/hsm.py
1 file changed, 1 insertion(+), 38 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/34/5134/1
--
To view, visit http://gerrit.ovirt.org/5134
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I837877b5431edc3cfc6648e8fb654df2291413fc
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce at redhat.com>


More information about the vdsm-patches mailing list