[ClusterLabs] Antw: Re: to change resource id - how?

Les Green les at greemo.com
Tue Apr 4 13:14:58 CEST 2017


If you put the cluster in maintenance mode first, then restart with the
new config, resources should stay up right?

On 04.04.2017 08:07, Ulrich Windl wrote:
>>>> Ken Gaillot <kgaillot at redhat.com> schrieb am 03.04.2017 um 16:26 in Nachricht
> <c7f4290c-ef8b-a4cb-bada-e93a8a86d134 at redhat.com>:
>> 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
>> 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.
> 
> In my experience it's very much advisable to stop any resource that is to be renamed _before_ doing so. Maybe the software became smarter since I suffered from problems, but it seems wise anyway...
> 
> Regards,
> Ulrich
> 
>>
>> _______________________________________________
>> 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 
> 
> 
> 
> 
> 
> _______________________________________________
> 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