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

Andrew Beekhof andrew at beekhof.net
Thu Apr 11 18:00:22 EDT 2013


On 11/04/2013, at 10:04 PM, Brian J. Murrell <brian at interlinx.bc.ca> wrote:

> On 13-04-11 07:37 AM, Brian J. Murrell wrote:
>> 
>> In exploring all options, how about pcs?  Does pcs' "resource create
>> ..." for example have the same read+modify+replace problem as crm
>> configure or does pcs resource create also only send proper fragments to
>> update just the part of the CIB it's operating on?
> 
> Having just cracked pcs open, it doesn't seem to.  It seems to create an
> XML string which it then applies to the CIB with:
> 
> cibadmin -o resources -C -X $xml_resource_string
> 
> IIUC, that is compatible with my use-case of multiple nodes in the
> cluster creating resources concurrently and not having last-write-wins
> problems, correct?

Correct.

> 
> Usually the multiple nodes are creating separate resources and in any
> case where multiple nodes are creating the same resource (or adjusting
> some global parameter), it's configuration is the same from all writers
> so last-write-wins there doesn't matter, yes?

Actually, I think the semantics of -C are first-write-wins and any subsequent attempts fail with -EEXSIST

> 
> Cheers,
> b.
> 
> 
> _______________________________________________
> 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