~mysql/mysql-fabric/1.4

Viewing all changes in revision 236.

  • Committer: Alfranio Correia
  • Date: 2014-07-07 16:04:49 UTC
  • Revision ID: alfranio.correia@oracle.com-20140707160449-mfgf6ma2762afr2h
BUG#72818: BUG#18874603: THE --DAEMONIZE OPTION IN "MYSQLFABRIC MANAGE START" IS BROKEN

If you try to use the --daemonize option in "mysqlfabric manage start", the
following error is produced:

$mysqlfabric manage start --daemonize
mysqlfabric: error: no such option: --daemonize

This happening because the options are defined upon the optional parameters
found in the command's execute or dispatch methods. If the execute method
exists, its optional parameters are used. Otherwise, the optional parameters
in the dispatch method are used.

The daemonize is broken because an execute method was introduced in the
Command class which is inherited by the other commands and thus any dispatch
method is ignored.

This changed was introduced by the following patch:

revno: 227 [merge]
committer: Alfranio Correia <alfranio.correia@oracle.com>
branch nick: mysql-hub
timestamp: Mon 2014-04-14 19:25:34 +0100

To fix the issue, we have reverted part of the previous patch. This
solution is not ideal though and we will improve this in the future.
Any ideal solution should:

   . Look at either the dispatch or execute method but it should not look
     at both methods as the current solution does. This is error prone as
     you have seen.

   . Allow users to define commands without any magic (.e.g. See Martin
     Arrieta suggestion in the bug report). Currently this is not working.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: