[ 
https://issues.apache.org/jira/browse/HDDS-583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16642273#comment-16642273
 ] 

Namit Maheshwari commented on HDDS-583:
---------------------------------------

[~elek] -Yes, the problem does not exist with OM. 

[~arpitagarwal] - I have created HDDS-590 and attached the Junit patch there, 
since this one is already resolved.

> SCM returns zero as the return code, even when invalid options are passed
> -------------------------------------------------------------------------
>
>                 Key: HDDS-583
>                 URL: https://issues.apache.org/jira/browse/HDDS-583
>             Project: Hadoop Distributed Data Store
>          Issue Type: Bug
>            Reporter: Namit Maheshwari
>            Assignee: Namit Maheshwari
>            Priority: Major
>             Fix For: 0.3.0
>
>         Attachments: HDDS-583.001.patch
>
>
> While doing testing for HDDS-564, found that SCM returns zero as the return 
> code, even when invalid options are passed. In StorageContainerManager.java, 
> please see below code 
> {code:java}
> private static StartupOption parseArguments(String[] args) {
>   int argsLen = (args == null) ? 0 : args.length;
>   StartupOption startOpt = StartupOption.HELP;
> {code}
> Here, startOpt is initialized to HELP, so by default even if wrong options 
> are passed, parseArguments method returns the value to HELP. This causes the 
> exit code to be 0. 
> Ideally, startOpt should be set to null, which will enable it to return non 
> zero exit code, if the options are invalid.
> {code:java}
> StartupOption startOpt = null{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to