[Pacemaker] Removing resource from group without disturbing remaining resources in group
Dejan Muhamedagic
dejanmm at fastmail.fm
Thu Jun 6 15:29:35 UTC 2013
Hi,
On Thu, Jun 06, 2013 at 04:50:14PM +0200, Florian Crouzat wrote:
> Le 06/06/2013 16:35, Andreas Mock a écrit :
>> Hi all,
>>
>> is there a way to remove a resource from a group without
>> disturbing the other resources in the group.
>>
>> The following example:
>> - G1 has R1 R2 R3
>> - All resources are started
>> - Stopping R1 would cause a stop of R2 R3
>> - So, the idea was:
>> * crm configure edit => remove R1 from the group while running
>> * stop resource
>> * delete resource
>>
>> BUT: At some point (which we couldn't find out at
>> the moment) all remaining resources of the group are
>> restarted. It seems that the change of the implicit
>> dependency tree of the initial group forces a rebuild
>> of that tree including a restart of that group.
>> (Andrew: Is this assumption right?)
>>
>> So, is there are way to add/remove resources from
>> group without disturbing the other resources.
>> It's clear to me that the resources would restart
>> when the node assignment after removing would change.
>>
>> Hints welcome.
>>
>
> Approximative syntax, do not blame me !
>
> * crm configure property maintenance-mode=true
> * crm resource stop R1 # it won't stop as it's in maintenance-mode
A recent crmsh knows that it can delete a resource if
maintenance-mode is set.
> * crm configure delete R1
> * crm configure show # very that all references to R1 are gone
> * crm resource reprobe # the cluster double check the status of declared
> resources and sees that everything is fine and R1 doesn't exists anymore
> * crm_mon -Arf1 # double check that everything is "started (unmanaged)"
> and R1 is gone
> * crm_simulate -S -L -VVV # optional, to check what would happen when
> leaving maintenance-mode
> * crm configure property maintenance-mode=false
Right. The basic idea is to detach the PE while making changes.
Thanks,
Dejan
> If something goes wrong while in maintenance-mode, crm resource cleanup
> foo might be handy. Nothing should move, start or stop until you leave
> maintenance-mode anyway. I use this scenario very often, to add or
> remove IPaddr2 resources to a group of 30+ IPaddr2.
>
>
> --
> Cheers,
> Florian Crouzat
>
> _______________________________________________
> Pacemaker mailing list: Pacemaker at 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
More information about the Pacemaker
mailing list