Hi,

On Mon, Jun 03, 2013 at 06:19:06PM +0200, Ferenc Wagner wrote:
> Hi,
> 
> I've got a script for resource creation, which puts the new resource in
> a shadow CIB together with the necessary constraints, runs a simulation
> and finally offers to commit the shadow CIB into the live config (by
> invoking an interactive crm).  This works well.  My concern is that if
> somebody else (another cluster administrator) changes anything in the
> cluster configuration between creation of the shadow copy and the
> commit, those changes will be silently reverted (lost) by the commit.
> Is there any way to avoid the possibility of this?  According to
> http://article.gmane.org/gmane.linux.highavailability.pacemaker/11021,
> crm provides this functionality for its configure sessions [*], but the
> shadow CIB route has good points as well (easier to script via cibadmin,
> simulation), which I'd like to use.  Any ideas?

Record the two epoch attributes of the cib tag at the beginning
and check if they changed just before applying the changes.

Thanks,

Dejan

> Thanks,
> Feri.
> 
> [*] abbreviating Dejan Muhamedagic:
> "The shell keeps the changes in its memory until the user says commit.
> Just before doing the commit, it checks if the CIB changed in the
> meantime and if so it refuses to commit changes."
> _______________________________________________
> Linux-HA mailing list
> Linux-HA@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
_______________________________________________
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to