On 2013-09-25T11:00:17, Chuck Smith <[email protected]> wrote:
> do act accordingly, for instance, I have raw primitives, add them to a
> group, then decide to move them to a different group (subject to load order)
> I cant just remove it from the group and put it in a different one, I have
> to remove it first, commit the change, the add it to the new group, and
> commit the change again.
Moving a resource from one group to another without unnecessary restarts
should be quite possible.
But you are right - it is not. The crmsh backend is not *quite* smart
enough if you're doing it in one "edit" session. (e.g., removing it
somewhere and adding it elsewhere in the same step.) And I think it
should be, hence Cc'ing Kristoffer "I'm rewriting the parser" Gronlund
;-)
For now, you have to split it in two steps:
# edit (and now remove the resources from groups)
# edit (and now add them again)
# commit
Note you don't need an intermediate commit, so no restarts should
happen. (Unless you add a stopped resource to the middle of an otherwise
started group, or vice versa.)
You can also do something like:
crm(live)configure# show
group grp1 dummy1 dummy2 dummy3
group grp2 dummy4 dummy5
crm(live)configure# modgroup grp1 remove dummy2
crm(live)configure# modgroup grp2 add dummy2
crm(live)configure# show
group grp1 dummy1 dummy3
group grp2 dummy4 dummy5 dummy2
See "help modgroup" for more details. That might be useful if you're
doing this regularly or need it scripted.
And just in case you weren't aware of this, you can ask what the cluster
would do before actually committing:
crm(live)configure# simulate actions nograph
notice: LogActions: Move dummy4 (Started hex-2 -> hex-3)
notice: LogActions: Move dummy5 (Started hex-2 -> hex-3)
notice: LogActions: Move dummy2 (Started hex-1 -> hex-3)
notice: LogActions: Move dummy1 (Started hex-3 -> hex-1)
notice: LogActions: Restart dummy3 (Started hex-1)
(I had my resources ungrouped before this example, so I did exactly what
I told you not to do to avoid spurious restarts ;-)
Regards,
Lars
--
Architect Storage/HA
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB
21284 (AG Nürnberg)
"Experience is the name everyone gives to their mistakes." -- Oscar Wilde
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems