mogadm host modify...

Brad Fitzpatrick brad at danga.com
Mon Nov 13 21:50:19 UTC 2006


I'm not sure that's entirely correct.  I spent a bit of time yesterday
fighting this.

Basically we want strict argument checking both before the verb, and after
the verb's options:

  mogadm --someoptions verb modify --verb-options=foo --bogus-option

And have --bogus-option fail, as well as any bogus options before the
verb.

I wasn't able to figure it out quick enough and moved on.  Do you know how
to accomplish that?

I thought 'no_require_order' was the default?  I'm wondering why we set
any Configure() options at all if the default was doing what we wanted.



On Mon, 13 Nov 2006, Saunders, Newton wrote:

> Hi,
>
>
>
> I just updated to the latest version of MogileFS in subversion and am
> having some trouble with the mogadm utility.  I am unable to change a
> host's status or http_port.  The following call does not cause an error,
> however, it also does not modify the host:
>
>
>
> mogadm --trackers=<tracker_host>:<tracker_port> host modify
> <storage_node_host> --status=alive --port=22675
>
>
>
>
>
> The issue lies with the GetOpt::Long configuration.  This change fixes
> the problem:
>
>
>
> [newton] ~/mogilefs > svn diff utils/mogadm
>
> Index: utils/mogadm
>
> ===================================================================
>
> --- utils/mogadm        (revision 458)
>
> +++ utils/mogadm        (working copy)
>
> @@ -135,7 +135,7 @@
>
>          "help"       => \$opts{help},
>
>          "verbose"    => \$opts{verbose},
>
>      ) or abortWithUsage();
>
> -Getopt::Long::Configure("require_order");
>
> +Getopt::Long::Configure("no_require_order");
>
>
>
>  # bail for help
>
>  abortWithUsage() if $opts{help};
>
> [newton] ~/mogilefs >
>
>
>
>
>
>
>
>
>
> Thanks,
>
>
>
> Newton
>
>


More information about the mogilefs mailing list