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

Dejan Muhamedagic dejanmm at fastmail.fm
Wed Sep 28 10:20:11 EDT 2011


On Wed, Sep 28, 2011 at 09:12:57AM -0400, Brian J. Murrell wrote:
> On 11-09-16 11:14 AM, Dejan Muhamedagic wrote:
> > On Thu, Sep 08, 2011 at 03:41:42PM +0100, John Spray wrote:
> > 
> >>  * Is there another way of adding resources which would be safe when
> >> run concurrently?
> > 
> > cibadmin.
> But doesn't crm use cibadmin itself and if so, shouldn't whatever
> benefits of using cibadmin directly filter up to crm shell?  Put another
> way, if crm shell is just using cibadmin, isn't it likely that cibadmin
> will exhibit the same concurrency issue?

I'm really not sure. Need to investigate this area more.
cibadmin talks to the cib (the process) and cib should allow
only one writer at the time. If that's not the case, then we
have a bug.

> > This sounds to me like a deficiency in the crm shell.
> Of course I'm still willing to believe that.  I just wonder what crm
> shell could be doing that is failing with concurrent commands that
> cibadmin will not fail with also.

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

In short, having more than one crm instance trying to modify the
configuration simultaneously probably won't give good results.
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

What's your use case?



> 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://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker

More information about the Pacemaker mailing list