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

Brian J. Murrell brian at interlinx.bc.ca
Mon Feb 25 17:20:13 UTC 2013


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?

> 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?

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.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20130225/2bf250ce/attachment-0004.sig>


More information about the Pacemaker mailing list