[ClusterLabs] Antw: Re: Antw: [EXT] How to stop removed resources when replacing cib.xml via cibadmin or crm_shadow

Ulrich Windl Ulrich.Windl at rz.uni-regensburg.de
Thu Oct 1 07:17:56 EDT 2020

>>> Igor Tverdovskiy <igor.tverdovskiy.pe at gmail.com> schrieb am 01.10.2020 um 11:47
in Nachricht
<CAARZOog=Nggexdc6pMcTC8SDLOd97xm0a_iXe+HvS_ewD0wYFg at mail.gmail.com>:
> Hi,
>> > I have generated proper XML according to predefined templates and apply
>> it
>> > via
>> >> cibadmin --replace --xml-file cib.xml
>> I think before doing such a thing you should put all nodes into standby,
>> or stop all resources.
>> In the past it had been a bad idea to delete running resources or trying
>> to rename such.
>> When replacing the CIB you probably do such things.
>> What are your specific reasons to replace the CIB?
> Well if I could stop all resources beforehand it wouldn't be a problem :)
> In general I don't see any drawbacks except not proper shutting down of the
> removed resources.
> The reason is that I need to configure a number of resources
> simultaneously and do it fast without freezing for ages because of
> "--wait" option and transitions races. Working with XML way better for
> automation.
> But still, is there way to replace XML in a clean way? Maybe some statuses
> should be added to a new XML, etc?

Actually I _never_ used XML to configure the cluster; instead I did everything (create, rename, edit, remove) using "(SLES) crm shell.
Still you can "crm configure load xml ..." if you ever need to load XML.
And nothing is freezing for ages if I update the configuration: Once committed, changes take effec timmediately.

Finally be aware that the cluster still has to find out the difference between old and new CIB to create the actions needed, so I really don't see a reason to replace the CIB unless completely resetting the cluster (and then there should be no problem stopping resources before).


More information about the Users mailing list