[Pacemaker] [PATCH]Bug 2567 - crm resource migrate should support an optional "role" parameter

Holger Teutsch holger.teutsch at web.de
Fri Mar 18 11:21:40 UTC 2011


Hi,
I would like to submit 2 patches of an initial implementation for
discussion.

Patch 1 implements migration of the Master role of an m/s resource to
another node in crm_resource
Patch 2 adds support for the shell.

crm_resource does this with options

"crm_resource --move --resource ms_test --master --node devel2"

The shell does the same with

"crm resource migrate ms_test:master devel2"

crm_resource insist on the options "--master --node xxx" if dealing with
m/s resources.

It is not easy to assess the expectations that a move command should
fulfill for something more complex than a group.

To recall:

crm_resource --move resource
creates a "standby" rule that moves the resource off the currently
active node

while

crm_resource --move resource --node newnode
creates a "prefer" rule that moves the resource to the new node.

When dealing with clones and masters the behavior was random as the code
only considers the node where the first instance of the clone was
started.

The new code behaves consistently for the master role of an m/s
resource. The options "--master" and "rsc:master" are somewhat redundant
as a "slave" move is not supported. Currently it's more an
acknowledgement of the user.

On the other hand it is desirable (and was requested several times on
the ML) to stop a single resource instance of a clone or master on a
specific node.

Should that be implemented by something like
 
"crm_resource --move-off --resource myresource --node devel2" ?

or should

crm_resource refuse to work on clones

and/or should moving the master role be the default for m/s resources
and the "--master" option discarded ?


Regards
Holger
-------------- next part --------------
A non-text attachment was scrubbed...
Name: crm_migrate.diff
Type: text/x-patch
Size: 7064 bytes
Desc: not available
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20110318/8bc118a9/attachment-0006.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shell_migrate.diff
Type: text/x-patch
Size: 1499 bytes
Desc: not available
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20110318/8bc118a9/attachment-0007.bin>


More information about the Pacemaker mailing list