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

Holger Teutsch holger.teutsch at web.de
Fri Apr 8 13:21:31 UTC 2011


On Thu, 2011-04-07 at 12:33 +0200, Dejan Muhamedagic wrote:
> > New syntax:
> > -----------
> > 
> > crm_resource --move-from --resource myresource --node mynode
> >    -> all resource variants: check whether active on mynode, then create standby constraint
> > 
> > crm_resource --move-from --resource myresource
> >    -> primitive/group: set --node `current_node`, then create standby constraint
> >    -> clone/master: refused
> > 
> > crm_resource --move-to --resource myresource --node mynode
> >   -> all resource variants: create prefer constraint
> > 
> > crm_resource --move-to --resource myresource --master --node mynode
> >   -> master: check whether active as slave on mynode, then create prefer constraint for master role
> >   -> others: refused
> > 
> > crm_resource --move-cleanup --resource myresource
> >   -> zap constraints
> > 
> > As we are already short on meaningful single letter options I vote for long options only.
> > 
> > Backwards Compatibility:
> > ------------------------
> > 
> > crm_resource {-M|--move} --resource myresource
> >   -> output deprecation warning
> >   -> treat as crm_resource --move-from --resource myresource
> > 
> > crm_resource {-M|--move} --resource myresource --node mynode
> >   -> output deprecation warning
> >   -> treat as crm_resource --move-to --resource myresource --node mynode
> > 
> > crm_resource {-U|--unmove} --resource myresource
> >   -> output deprecation warning
> >   -> treat as crm_resource --move-cleanup --resource myresource
> 
> All looks fine to me.
> 
> > For the shell:
> > Should we go for similar commands or keep "migrate-XXX"
> 
> migrate is a bit of a misnomer, could be confused with the
> migrate operation. I'd vote to leave old migrate/unmigrate
> as deprecated and introduce just move-from/to/cleanup variants.
> 

Deajn & Andrew,
please find attached the patches that implement these commands for
review. The require the patch
 
Low: lib/common/utils.c: Don't try to print unprintable option values in crm_help

that I send separately because it is not directly related to the
movement stuff.

I think that the preceding discussions were very valuable to fully
understand issues and implications and I'm confident that the new
command set is consistent and behaves with predictable outcome.

Regards
Holger


-------------- next part --------------
A non-text attachment was scrubbed...
Name: crm_cli.diff
Type: text/x-patch
Size: 2136 bytes
Desc: not available
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20110408/51886fa0/attachment-0012.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: crm_resource.diff
Type: text/x-patch
Size: 14001 bytes
Desc: not available
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20110408/51886fa0/attachment-0013.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shell_move.diff
Type: text/x-patch
Size: 4588 bytes
Desc: not available
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20110408/51886fa0/attachment-0014.bin>


More information about the Pacemaker mailing list