On Fri, Aug 12, 2011 at 08:21:49AM +0200, Ulrich Windl wrote:
> >>> Andrew Beekhof <[email protected]> schrieb am 12.08.2011 um 02:53 in 
> >>> Nachricht
> <CAEDLWG2pQijx=vwsqyrkfsl74i1xrjidcqcvjs+cvqwmxnm...@mail.gmail.com>:
> > On Thu, Aug 11, 2011 at 5:37 PM, Ulrich Windl
> > <[email protected]> wrote:
> > > Hi!
> > >
> > > Using crm shell, you cannot rename a running resource. However I managed 
> > > to 
> > do it via a shadow cib: I renamed the resource in the shadow cib, then 
> > committed the shadow cib.
> > > From the XML changes, I got the impression that the old primitive is 
> > removed, and then the new primitive is added. This caused the old resource 
> > to 
> > be stopped, the new one to be started, and one resource that was a 
> > successor 
> > in the group to be restarted.
> > >
> > > There was a temporary "active orphan" (the old name) and "Configuration 
> > WARNINGs found during PE processing", but that vanished when the states 
> > changed (transitions completed).
> > >
> > > So obviously there is no rename operation for resources. However when you 
> > add more and more resources to your cluster, one might find the point where 
> > some renaming for consistency might be a good idea. In priniple that could 
> > be 
> > done online without taking any resource down, but LRM seems to be not 
> > prepared for that. Are there any technical reasons for that?
> > 
> > The resource name is the equivalent of a primary key in a database table.
> > Its the sole point of comparison when deciding if two resources are
> > the same, therefor rename is not a valid operation to consider.
> > Any implementation would have to use delete + create underneath.
> 
> Hi!
> 
> In a database you canb change the primary key as long as you do it
> consistently (in a transaction). I think no CRM would work without
> transactions anyway, so this could be done IMHO. If any name is unique
> between transactions, is see no problem changing names of running
> resources. The olny thing is that one might allow an active monitor to
> finish before renaming the resource. Also: I don't want to rename the
> RAs, I just want to rename the resources.

"patches accepted" ;-)

What I do:

maintenance-mode on,
reconfigure all I want,
start/stop/move/migrate/whatever, by hand, if I want/need that
reprobe and cleanup until all lrmd and pacemaker know the new state of
the universe,
maintenance-mode off

For simple rename-only operations, as you seem to need,
that can easily be scripted.

-- 
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com

DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to