[Pacemaker] Concurrent runs of 'crm configure primitive' interfering

Brian J. Murrell brian at interlinx.bc.ca
Wed Sep 28 10:52:16 EDT 2011


On 11-09-28 10:20 AM, Dejan Muhamedagic wrote:
> Hi,

Hi,

> I'm really not sure. Need to investigate this area more.

Well, I am experimenting with cibadmin.  It's certainly not as nice and
shiny as crm shell though.  :-)

> cibadmin talks to the cib (the process) and cib should allow
> only one writer at the time.

Good.  That's needed of course.  But what does it do with other
attempting writers?  Do they block until the CIB is available to write
or do they turn their attempted writers away in error?

> The shell keeps the changes in its memory until the user says
> commit (or if it's a single-shot configure command). Just before
> doing the commit, it checks (using cibadmin) if the CIB changed
> in the meantime (i.e. since it was last time loaded or refreshed
> in crm) and if so it refuses to commit changes.

Ahhhh.

> That is,
> _unless_ it is forced to do so. So, if you use the -F option,
> one crm instance is likely to override changes of another crm
> instance or, for that matter, of anybody else.

But is crm writing (i.e. replacing) entire CIBs or just updating
fragments of it, like the resources and constraints, etc. it's being
asked to operate on by the user?

If the the latter, then two crm instances that are forced to write
non-overlapping fragments should result in both being successful, if the
cib is locking out concurrent cibadmin writers the way it should be, yes?

> In short, having more than one crm instance trying to modify the
> configuration simultaneously probably won't give good results.

As long as they are making non-colliding changes, shouldn't they both be
successful?

> And the matter is simple: If the cluster CIB changed since the
> crm itself accepted configuration modifications, there's no way
> to say which changes should take precedence and there's no
> obvious way to merge the changes coming from two different
> sources.

Indeed, assuming they conflict.  But if they don't, there shouldn't be
any problem with two crms working on independent resources and
constraints, yes?

> What's your use case?

We're using tools to drive HA configuration where those tools go out to
the various nodes in the cluster and perform configuration tasks,
possibly and probably in parallel, one of which is to issue the crm
commands to configure the resources and constraints that that node will
primarily be responsible for.

b.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20110928/81ddef97/attachment-0003.sig>


More information about the Pacemaker mailing list