[Pacemaker] Removing resource from group without disturbing remaining resources in group
Florian Crouzat
gentoo at floriancrouzat.net
Thu Jun 6 14:50:14 UTC 2013
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
* 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
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
More information about the Pacemaker
mailing list