Federico Simoncelli has uploaded a new change for review.
Change subject: Change safelease APIs to match SANLock flow ......................................................................
Change safelease APIs to match SANLock flow
Change-Id: I39d5410ad76b22b037e8cac7e667817fb9ef56f6 --- M vdsm/storage/blockSD.py M vdsm/storage/safelease.py M vdsm/storage/sd.py M vdsm/storage/sp.py 4 files changed, 110 insertions(+), 57 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/21/221/1 -- To view, visit http://gerrit.ovirt.org/221 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: I39d5410ad76b22b037e8cac7e667817fb9ef56f6 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com
Saggi Mizrahi has posted comments on this change.
Change subject: Change safelease APIs to match SANLock flow ......................................................................
Patch Set 2: Looks good to me, but someone else must approve
-- To view, visit http://gerrit.ovirt.org/221 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I39d5410ad76b22b037e8cac7e667817fb9ef56f6 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com
Igor Lvovsky has posted comments on this change.
Change subject: Change safelease APIs to match SANLock flow ......................................................................
Patch Set 2: I would prefer that you didn't submit this
(6 inline comments)
.................................................... File vdsm/storage/sp.py Line 727: for sdUUID in self.getDomains(): use activeOnly on getDomains
Line 736: # on this domain. Add rollback
Line 758: for sdUUID in self.getDomains(): activeOnly domains should be released
Line 1021: dom.acquireHostId(self.id) should be moved to activateSD.
Line 1022: dom.acquireClusterLock(self.id) Saggi, why we need acquireClusterLock here? It's look as we need to consider again using of acquireClusterLock on all places.
Line 1081: dom.releaseHostId(self.id) move it to the deactivateSD
-- To view, visit http://gerrit.ovirt.org/221 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I39d5410ad76b22b037e8cac7e667817fb9ef56f6 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com
Saggi Mizrahi has posted comments on this change.
Change subject: Change safelease APIs to match SANLock flow ......................................................................
Patch Set 2: (2 inline comments)
.................................................... File vdsm/storage/sp.py Line 1021: dom.acquireHostId(self.id) Leave it here, you can't acquire a SANLOCK cluster lock without and ID lock.
Line 1022: dom.acquireClusterLock(self.id) You're attaching the domain on line 1027. Because the domain is not yet in the pool 2 pools might try and attach it at the same time corrupting the MD.
-- To view, visit http://gerrit.ovirt.org/221 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I39d5410ad76b22b037e8cac7e667817fb9ef56f6 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com
Federico Simoncelli has posted comments on this change.
Change subject: Change safelease APIs to match SANLock flow ......................................................................
Patch Set 2: (1 inline comment)
.................................................... File vdsm/storage/sp.py Line 1022: dom.acquireClusterLock(self.id) Ok then the acquireHostId is correct but I have to add a releaseHostId after line 1032.
-- To view, visit http://gerrit.ovirt.org/221 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I39d5410ad76b22b037e8cac7e667817fb9ef56f6 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com
Igor Lvovsky has posted comments on this change.
Change subject: Change safelease APIs to match SANLock flow ......................................................................
Patch Set 2: (2 inline comments)
.................................................... File vdsm/storage/sp.py Line 1021: dom.acquireHostId(self.id) Don't forgot that after attachSD you probably will disconnected from the storage by RHEV-M. You will connected again before activateSD and then you should acquire SANLOCK again
Line 1022: dom.acquireClusterLock(self.id) I think you should.
-- To view, visit http://gerrit.ovirt.org/221 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I39d5410ad76b22b037e8cac7e667817fb9ef56f6 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com
Igor Lvovsky has posted comments on this change.
Change subject: Change safelease APIs to match SANLock flow ......................................................................
Patch Set 3: (1 inline comment)
.................................................... File vdsm/storage/safelease.py Line 38: def __init__(self, sdUUID, idFile, leaseFile, is 'idFile' in use ?
-- To view, visit http://gerrit.ovirt.org/221 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I39d5410ad76b22b037e8cac7e667817fb9ef56f6 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com
Federico Simoncelli has posted comments on this change.
Change subject: Change safelease APIs to match SANLock flow ......................................................................
Patch Set 3: (1 inline comment)
.................................................... File vdsm/storage/safelease.py Line 38: def __init__(self, sdUUID, idFile, leaseFile, Yes it's used by sanlock. We need the expose the same interface in safelease even though it's unused here.
-- To view, visit http://gerrit.ovirt.org/221 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I39d5410ad76b22b037e8cac7e667817fb9ef56f6 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com
Saggi Mizrahi has posted comments on this change.
Change subject: Change safelease APIs to match SANLock flow ......................................................................
Patch Set 4: Looks good to me, but someone else must approve
-- To view, visit http://gerrit.ovirt.org/221 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I39d5410ad76b22b037e8cac7e667817fb9ef56f6 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com
Saggi Mizrahi has posted comments on this change.
Change subject: Change safelease APIs to match SANLock flow ......................................................................
-- To view, visit http://gerrit.ovirt.org/221 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I39d5410ad76b22b037e8cac7e667817fb9ef56f6 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com
Igor Lvovsky has posted comments on this change.
Change subject: Change safelease APIs to match SANLock flow ......................................................................
Patch Set 5: Looks good to me, but someone else must approve
-- To view, visit http://gerrit.ovirt.org/221 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I39d5410ad76b22b037e8cac7e667817fb9ef56f6 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com
Dan Kenigsberg has posted comments on this change.
Change subject: Change safelease APIs to match SANLock flow ......................................................................
Patch Set 6: Looks good to me, approved
(1 inline comment)
.................................................... File vdsm/storage/storage_exception.py Line 1218: class AcquireLockFailure(StorageException): I do not understand why was it so urgent to drop the informatory id= rc= from the log.
-- To view, visit http://gerrit.ovirt.org/221 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I39d5410ad76b22b037e8cac7e667817fb9ef56f6 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com
Igor Lvovsky has posted comments on this change.
Change subject: Change safelease APIs to match SANLock flow ......................................................................
Patch Set 6: Looks good to me, but someone else must approve
-- To view, visit http://gerrit.ovirt.org/221 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I39d5410ad76b22b037e8cac7e667817fb9ef56f6 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com
Igor Lvovsky has posted comments on this change.
Change subject: Change safelease APIs to match SANLock flow ......................................................................
Patch Set 7: Looks good to me, but someone else must approve
-- To view, visit http://gerrit.ovirt.org/221 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I39d5410ad76b22b037e8cac7e667817fb9ef56f6 Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com
Dan Kenigsberg has posted comments on this change.
Change subject: Change safelease APIs to match SANLock flow ......................................................................
Patch Set 8: I would prefer that you didn't submit this
You said you had another version for this, no?
-- To view, visit http://gerrit.ovirt.org/221 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I39d5410ad76b22b037e8cac7e667817fb9ef56f6 Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com
Igor Lvovsky has posted comments on this change.
Change subject: Change safelease APIs to match SANLock flow ......................................................................
Patch Set 9: Looks good to me, but someone else must approve
-- To view, visit http://gerrit.ovirt.org/221 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I39d5410ad76b22b037e8cac7e667817fb9ef56f6 Gerrit-PatchSet: 9 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com
Dan Kenigsberg has posted comments on this change.
Change subject: Change safelease APIs to match SANLock flow ......................................................................
Patch Set 9: (1 inline comment)
.................................................... File vdsm/storage/sp.py Line 921: # since the domain will be deactivated this seems unrelated to the API change. wouldn't it be slightly safer to first stop spm and only then umount?
-- To view, visit http://gerrit.ovirt.org/221 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I39d5410ad76b22b037e8cac7e667817fb9ef56f6 Gerrit-PatchSet: 9 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com
Federico Simoncelli has posted comments on this change.
Change subject: Change safelease APIs to match SANLock flow ......................................................................
Patch Set 9: (1 inline comment)
.................................................... File vdsm/storage/sp.py Line 921: # since the domain will be deactivated If we stop the spm first we don't know how long the umount will take (or even if it fails) and we might end up with two SPMs with the master mounted. Do you want to split this change out?
-- To view, visit http://gerrit.ovirt.org/221 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I39d5410ad76b22b037e8cac7e667817fb9ef56f6 Gerrit-PatchSet: 9 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com
Dan Kenigsberg has posted comments on this change.
Change subject: Change safelease APIs to match SANLock flow ......................................................................
Patch Set 9: Verified; Looks good to me, approved
-- To view, visit http://gerrit.ovirt.org/221 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I39d5410ad76b22b037e8cac7e667817fb9ef56f6 Gerrit-PatchSet: 9 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com
Dan Kenigsberg has submitted this change and it was merged.
Change subject: Change safelease APIs to match SANLock flow ......................................................................
Change safelease APIs to match SANLock flow
Change-Id: I39d5410ad76b22b037e8cac7e667817fb9ef56f6 --- M vdsm/storage/blockSD.py M vdsm/storage/safelease.py M vdsm/storage/sd.py M vdsm/storage/sp.py M vdsm/storage/storage_exception.py 5 files changed, 85 insertions(+), 24 deletions(-)
Approvals: Dan Kenigsberg: Verified; Looks good to me, approved Igor Lvovsky: Looks good to me, but someone else must approve
-- To view, visit http://gerrit.ovirt.org/221 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged Gerrit-Change-Id: I39d5410ad76b22b037e8cac7e667817fb9ef56f6 Gerrit-PatchSet: 9 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com
vdsm-patches@lists.fedorahosted.org