sarvekshayr opened a new pull request, #8166:
URL: https://github.com/apache/ozone/pull/8166

   ## What changes were proposed in this pull request?
   Currently, the `--verbose` option of GenericCli is accepted only when placed 
immediately after `ozone admin`, `ozone debug` or `ozone admin`, unless 
explicitly defined in the respective subcommand classes.
   
   The goal of this task is to improve usability by allowing `--verbose` to be 
placed anywhere in the command, including after a subcommand or other options.
   
   ## What is the link to the Apache JIRA
   [HDDS-12660](https://issues.apache.org/jira/browse/HDDS-12660)
   
   ## How was this patch tested?
   Before adding ScopeType._INHERIT_ to `--verbose` option.
   ```
   bash-5.1$ ozone admin safemode status
   SCM is out of safe mode.
   
   bash-5.1$ ozone admin --verbose safemode status          
   SCM is out of safe mode.
   validated:true, DataNodeSafeModeRule, registered datanodes (=1) >= required 
datanodes (=1)
   validated:true, HealthyPipelineSafeModeRule, healthy Ratis/THREE pipelines 
(=0) >= healthyPipelineThresholdCount (=0)
   validated:true, ContainerSafeModeRule, 100.00% of [Ratis] Containers(0 / 0) 
with at least one reported replica (=1.00) >= safeModeCutoff (=0.99);
   100.00% of [EC] Containers(0 / 0) with at least N reported replica (=1.00) 
>= safeModeCutoff (=0.99);
   validated:true, AtleastOneDatanodeReportedRule, reported Ratis/THREE 
pipelines with at least one datanode (=0) >= threshold (=0)
   
   bash-5.1$ ozone admin safemode status --verbose
   Unknown option: '--verbose'
   Possible solutions: --version
   
   bash-5.1$ ozone admin safemode --verbose status
   Unknown option: '--verbose'
   Possible solutions: --version
   ```
   After adding ScopeType._INHERIT_ to `--verbose` option.
   ```
   bash-5.1$ ozone admin safemode status
   SCM is out of safe mode.
   
   bash-5.1$ ozone admin safemode status --verbose
   SCM is out of safe mode.
   validated:true, DataNodeSafeModeRule, registered datanodes (=1) >= required 
datanodes (=1)
   validated:true, HealthyPipelineSafeModeRule, healthy Ratis/THREE pipelines 
(=0) >= healthyPipelineThresholdCount (=0)
   validated:true, ContainerSafeModeRule, 100.00% of [Ratis] Containers(0 / 0) 
with at least one reported replica (=1.00) >= safeModeCutoff (=0.99);
   100.00% of [EC] Containers(0 / 0) with at least N reported replica (=1.00) 
>= safeModeCutoff (=0.99);
   validated:true, AtleastOneDatanodeReportedRule, reported Ratis/THREE 
pipelines with at least one datanode (=0) >= threshold (=0)
   
   bash-5.1$ ozone admin safemode --verbose status          
   SCM is out of safe mode.
   validated:true, DataNodeSafeModeRule, registered datanodes (=1) >= required 
datanodes (=1)
   validated:true, HealthyPipelineSafeModeRule, healthy Ratis/THREE pipelines 
(=0) >= healthyPipelineThresholdCount (=0)
   validated:true, ContainerSafeModeRule, 100.00% of [Ratis] Containers(0 / 0) 
with at least one reported replica (=1.00) >= safeModeCutoff (=0.99);
   100.00% of [EC] Containers(0 / 0) with at least N reported replica (=1.00) 
>= safeModeCutoff (=0.99);
   validated:true, AtleastOneDatanodeReportedRule, reported Ratis/THREE 
pipelines with at least one datanode (=0) >= threshold (=0)
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to