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

Ethan Rose commented on HDDS-13094:
-----------------------------------

Copying an excerpt from the volume handling design proposal for reference on 
current issues with the datanode CLI:
----
The {{ozone admin datanode}} command is currently lacking any specific 
information about volumes. It is not clear where to put this information since 
the command's layout is atypical of other Ozone commands. Most commands follow 
the pattern of a {{list}} subcommand which gives a summary of each item, 
followed by an {{info}} command to get more detailed information. See {{{}ozone 
admin container {info,list{}}}} and {{{}ozone sh \{volume,bucket,key} 
{info,list{}}}}. The datanode CLI instead provides two relevant subcommands:
 * {{ozone admin datanode list}} which provides very verbose information about 
each datanode, some of which could be saved for an {{info}} command
 * {{ozone admin datanode usageinfo}} which provides only information about 
total node capacity, in addition to verbose information about the original node 
when {{--json}} is used.
 ** This command adds further confusion because it seems to be intended to 
provide info on one node, but then provides options to obtain a list of most 
and least used nodes, changing it to a list type command.

This current CLI layout splits a dedicated {{info}} command between two 
commands that are each {{list/info}} hybrids. This makes it difficult to add 
new datanode information like we want for volumes. To improve the CLI in a 
compatible way we can take the following steps:
 # Add sorting flags to {{ozone admin datanode list}} that allow sorting by 
node capacity.
 # Add a counter for {{totalVolumes}} and {{healthyVolumes}} to each entry in 
{{{}ozone admin datanode list{}}}.
 ** This allows filtering for datanodes that have {{healthyVolumes < 
totalVolumes}} from a single place using {{{}jq{}}}.
 ** We could optionally add a flag to the {{list}} command to only give nodes 
with unhealthy volumes.
 # Add an {{ozone admin datanode info}} command that gives all information 
about a datanode in a verbose json format.
 ** This includes its total usage info, per volume usage info, and volume 
health.
 # Deprecate {{{}ozone admin datanode usageinfo{}}}.
 ** All its functionality should now be covered by {{{}ozone admin datanode 
{list,info{}}}}.

> Improve `ozone admin datanode` CLI
> ----------------------------------
>
>                 Key: HDDS-13094
>                 URL: https://issues.apache.org/jira/browse/HDDS-13094
>             Project: Apache Ozone
>          Issue Type: Improvement
>          Components: Ozone CLI
>            Reporter: Ethan Rose
>            Assignee: Ethan Rose
>            Priority: Major
>
> Parent Jira to track improvements to theĀ {{ozone admin datanode}} command 
> with a focus on observability of volumes within datanodes. Improvements to 
> this command to support volume observability are covered in [This 
> document|https://github.com/apache/ozone/pull/8405]. As a result of these 
> changes, it should be easier to add new datanode information to the CLI going 
> forward as well.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to