[ClusterLabs] to change resource id - how?

Dejan Muhamedagic dejanmm at fastmail.fm
Tue Apr 4 18:36:02 CEST 2017


On Mon, Apr 03, 2017 at 09:26:04AM -0500, Ken Gaillot wrote:
> On 04/03/2017 06:35 AM, lejeczek wrote:
> > hi
> > I'm sroogling and reading but cannot find any info - how to
> > (programmatically) change resources ids? In other words: how to rename
> > these entities?
> > many thanks
> > L
> 
> As far as I know, higher-level tools don't support this directly -- you

At least crmsh does. There's "crm cfg rename".

Thanks,

Dejan

> have to edit the XML. The basic process is:
> 
> 1. Save a copy of the live CIB to a file.
> 2. Edit that file, and do a search-and-replace on the desired name (so
> you change it in constraints, etc., as well as the resource definition).
> 3. Push the configuration section of that file to the live CIB.
> 
> The higher-level tools have commands to do that, but at the low level,
> it would be something like:
> 
> 1. cibadmin -Q --scope configuration > tmp.cib
> 2. vim tmp.cib
> 3. cibadmin -x tmp.cib --replace --scope configuration
> 
> The cluster will treat it as a completely new resource, so it will stop
> the old one and start the new one.
> 
> _______________________________________________
> Users mailing list: Users at clusterlabs.org
> http://lists.clusterlabs.org/mailman/listinfo/users
> 
> 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 Users mailing list