Namit Maheshwari created HDDS-583: ------------------------------------- Summary: 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
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-dev-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-dev-h...@hadoop.apache.org