why? CMD_ERR("Resource %s not moved:" " specifying --master is not supported for --move-from\n", rsc_id);
also the legacy handling is a little off - do a make install and run tools/regression.sh and you'll see what i mean. other than that the crm_resource part looks pretty good. can you add some regression testcases in tools/ too please? On Fri, Apr 8, 2011 at 3:21 PM, Holger Teutsch <holger.teut...@web.de> wrote: > 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 > > > > _______________________________________________ > Pacemaker mailing list: Pacemaker@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://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker > > _______________________________________________ Pacemaker mailing list: Pacemaker@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://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker