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

Dejan Muhamedagic dejanmm at fastmail.fm
Mon Mar 4 11:14:28 EST 2013

On Thu, Feb 28, 2013 at 07:34:41PM +0100, Lars Marowsky-Bree wrote:
> On 2013-02-28T17:51:03, Dejan Muhamedagic <dejanmm at fastmail.fm> wrote:
> > crmsh used to make modifications in chunks, which was a bit
> > complex due to element dependencies, but it worked if I can
> > recall correctly. Then it got replaced by a full CIB replace
> > (everybody claimed that it was the right thing to do).
> Thought so at the time, yes. And I do think it cleaned up a few things,
> we just need to improve it. The full CIB replace also seems to trigger
> an election ...

I think that used to happen in Heartbeat clusters but got fixed
in the meantime, the details are a bit foggy.

> > Of course, cmrsh know which elements got modified, which are new, and
> > which should be deleted. But I'm not sure cibadmin can accept a diff
> > of such a kind. Perhaps doing a shadow apply instead of cibadmin -R
> > would help?
> cibadmin -P.
> If crm shell kept the XML it started out from around somewhere (easy for
> an uncommitted shadow CIB, in any case), it could use crm_diff --filter
> new to generate what has been changed in the current session and apply
> that.
> I *think* the CIB client side is supposed to do that already when
> cibadmin -R is called; but that doesn't allow merging of updates that
> have happened since and has this race.
> Then most of the logic in crmsh would remain unchanged (i.e., it'd still
> operate on whole CIBs only), but the way how it passes it on to
> Pacemaker would improve. I hope.

crmsh currently doesn't keep the original copy of the CIB.
Anyway, this approach is worth investigating.



> Regards,
>     Lars
> -- 
> Architect Storage/HA
> SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 21284 (AG Nürnberg)
> "Experience is the name everyone gives to their mistakes." -- Oscar Wilde
> _______________________________________________
> 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