[Pacemaker] Removing resource from group without disturbing remaining resources in group

Andreas Mock andreas.mock at web.de
Thu Jun 6 12:15:26 EDT 2013


Hi Florian,

thank you very much for that method description.
It seems that it does exactly what we want. By the way.
It's the same use case as yours. Many IP for which we
want a constraint handle (group).

Thank you!

Best regards
Andreas Mock


-----Ursprüngliche Nachricht-----
Von: Florian Crouzat [mailto:gentoo at floriancrouzat.net] 
Gesendet: Donnerstag, 6. Juni 2013 16:50
An: pacemaker at oss.clusterlabs.org
Betreff: Re: [Pacemaker] Removing resource from group without disturbing
remaining resources in group

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

_______________________________________________
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