[Pacemaker] racing crm commands... last write wins?

Dejan Muhamedagic dejanmm at fastmail.fm
Wed Feb 27 09:48:20 EST 2013


On Mon, Feb 25, 2013 at 12:20:13PM -0500, Brian J. Murrell wrote:
> On 13-02-25 10:30 AM, Dejan Muhamedagic wrote:
> > 
> > Before doing replace, crmsh queries the CIB and checks if the
> > epoch was modified in the meantime.
> 
> But doesn't take out a lock of any sort to prevent an update in the
> meanwhile, right?

No.

> > Those operations are not
> > atomic, though.
> 
> Indeed.
> 
> > Perhaps there's a way to improve this.
> 
> Well, the CIB is shared resource.  Shared resources need to be locked
> against these sort of racy updates.  Is there no locking of any kind at
> any level of CIB modifying operations?

No.

> i.e. does even cibadmin suffer from these last-write wins races with no
> option or opportunity to lock the CIB?
> 
> > crm node/crm resource invoke crm_attribute or other crm_ tools.
> 
> Yes, that would be my expectation.  But somewhere, something has to
> implement locking of the shared resource, yes?
> 
> > You should file a bugzilla then.
> 
> Indeed.  If there is no locking available anywhere, a ticket most
> definitely needs filing.
> 
> Cheers,
> b.

Thanks,

Dejan



> _______________________________________________
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
> 
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org





More information about the Pacemaker mailing list