On 2013-02-28T17:51:03, Dejan Muhamedagic <deja...@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 ... > 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. 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@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