admin@glassfish.java.net

Re: list-commands is buggy and doesn't work as documented

From: Yamini K B <Yamini.Kb_at_Sun.COM>
Date: Mon, 17 May 2010 22:56:09 +0530
Files an issue 11918

-Yamini

Byron Nevins wrote:


On 5/13/2010 3:28 AM, Yamini K B wrote:
Hi,

I find the following issues with list-commands:

1. list-commands fails when DAS is not running:

$ ./asadmin list-commands
ConnectException
Command list-commands failed.


Whereas help text says that this command is supported in local mode:

This subcommand is supported in local mode and remote mode.

So, shouldn't it display just the local commands when DAS is down? Also, it would be nice if a proper message is displayed instead of just 'ConnectException'
That's exactly how it is supposed to work.  It used to work correctly.  This is a bug.  Please file a bug against Admin.


2.  Whats wrong with using both the options?

$ ./asadmin list-commands --remoteonly=true --localonly=true
You can't specify both --local and --remote as true at the same time.
Command list-commands failed.

 Also, option names are incorrect in the above error message.
Please include the wrong names in the bug report.  It is illogical to have two only's.  Only is singular.  If you want both -- do nothing.

3. Help text says:

     --localonly
         If this option is set to true, only local  commands  are
         listed. Default is false.

         If this option is set to true, the  --remoteonly  option
         must be set to false. Otherwise, an error occurs.


     --remoteonly

         If this option is set to true, only remote commands  are
         listed. Default is false.

         If this option is set to true,  the  --localonly  option
         must be set to false. Otherwise, an error occurs.


Actual behaviour is that command works if either one of the options are specified as true. Moreover, the above statements contradicts the fact that both options cannot be used.

4. Improper error messages:

$ ./asadmin list-commands --remoteonly=true --localonly=false
ConnectException
Command list-commands failed.
$ ./asadmin list-commands --localonly=false
ConnectException
Command list-commands failed.


Instead of using 2 different options, wouldn't it have been simpler to have just one option say, --type=local|remote
a. If --type is not specified and DAS is not running, display just the local commands.
b. If --type is not specified, then display both local and remote commands.
c. If type is specified, then displays the specified local/remote commands.

Any comments?

Thanks,
-Yamini
--------------------------------------------------------------------- To unsubscribe, e-mail: admin-unsubscribe@glassfish.dev.java.net For additional commands, e-mail: admin-help@glassfish.dev.java.net

-- 
Byron Nevins  -  Oracle Corporation
Home: 650-359-1290
Cell: 650-784-4123
Sierra: 209-295-2188
  
--------------------------------------------------------------------- To unsubscribe, e-mail: admin-unsubscribe@glassfish.dev.java.net For additional commands, e-mail: admin-help@glassfish.dev.java.net