[ 
https://issues.apache.org/jira/browse/HDDS-14195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gargi Jaiswal updated HDDS-14195:
---------------------------------
    Description: 
While a DiskBalancer operation is running on a DataNode, starting another 
DiskBalancer operation on the same DataNode at the same time does not display 
any warning message.

*Expected Behavior:*
 * It should display a message: _“DiskBalancer operation is already running.”_

*Actual Behavior:*
 * No message is displayed.

 * A second operation can be initiated, which may lead to confusion.

Secondly, used set instead of list to store dnHostName for cli output so that 
it doesn't display duplicate hostnames if user give any diskbalancer command 
for same hostname twice like below:
{code:java}
bash-5.1$ ozone admin datanode diskbalancer status ozone-datanode-1 
ozone-datanode-3 ozone-datanode-1 --json
[ {
  "datanode" : "ozone-datanode-1.ozone_default",
  "action" : "status",
  "status" : "success",
  "serviceStatus" : "RUNNING",
  "threshold" : 10.0,
  "bandwidthInMB" : 10,
  "threads" : 5,
  "stopAfterDiskEven" : false,
  "successMove" : 0,
  "failureMove" : 0,
  "bytesMovedMB" : 0,
  "estBytesToMoveMB" : 0,
  "estTimeLeftMin" : 0
}, {
  "datanode" : "ozone-datanode-3.ozone_default",
  "action" : "status",
  "status" : "success",
  "serviceStatus" : "RUNNING",
  "threshold" : 10.0,
  "bandwidthInMB" : 10,
  "threads" : 5,
  "stopAfterDiskEven" : false,
  "successMove" : 0,
  "failureMove" : 0,
  "bytesMovedMB" : 0,
  "estBytesToMoveMB" : 0,
  "estTimeLeftMin" : 0
}, {
"datanode" : "ozone-datanode-1.ozone_default",
  "action" : "status",
  "status" : "success",
  "serviceStatus" : "RUNNING",
  "threshold" : 10.0,
  "bandwidthInMB" : 10,
  "threads" : 5,
  "stopAfterDiskEven" : false,
  "successMove" : 0,
  "failureMove" : 0,
  "bytesMovedMB" : 0,
  "estBytesToMoveMB" : 0,
  "estTimeLeftMin" : 0
} ] {code}
Thirdly, Instead of showing ip-address in json cli output show dnHostName for 
better clarity.
{code:java}
bash-5.1$ ozone admin datanode diskbalancer stop --in-service-datanodes --json
[ {
  "datanode" : "172.18.0.5:19864",
  "action" : "stop",
  "status" : "success"
}, {
  "datanode" : "172.18.0.9:19864",
  "action" : "stop",
  "status" : "success"
}, {
  "datanode" : "172.18.0.10:19864",
  "action" : "stop",
  "status" : "success"
}, {
  "datanode" : "172.18.0.8:19864",
  "action" : "stop",
  "status" : "success"
}]
 {code}
{{ }}

  was:
While a DiskBalancer operation is running on a DataNode, starting another 
DiskBalancer operation on the same DataNode at the same time does not display 
any warning message.

*Expected Behavior:*
 * It should display a message: _“DiskBalancer operation is already running.”_

*Actual Behavior:*
 * No message is displayed.

 * A second operation can be initiated, which may lead to confusion.


> DiskBalancer should not send another start operation on a DN with an active 
> DiskBalancer run
> --------------------------------------------------------------------------------------------
>
>                 Key: HDDS-14195
>                 URL: https://issues.apache.org/jira/browse/HDDS-14195
>             Project: Apache Ozone
>          Issue Type: Sub-task
>            Reporter: Gargi Jaiswal
>            Assignee: Gargi Jaiswal
>            Priority: Major
>              Labels: pull-request-available
>
> While a DiskBalancer operation is running on a DataNode, starting another 
> DiskBalancer operation on the same DataNode at the same time does not display 
> any warning message.
> *Expected Behavior:*
>  * It should display a message: _“DiskBalancer operation is already running.”_
> *Actual Behavior:*
>  * No message is displayed.
>  * A second operation can be initiated, which may lead to confusion.
> Secondly, used set instead of list to store dnHostName for cli output so that 
> it doesn't display duplicate hostnames if user give any diskbalancer command 
> for same hostname twice like below:
> {code:java}
> bash-5.1$ ozone admin datanode diskbalancer status ozone-datanode-1 
> ozone-datanode-3 ozone-datanode-1 --json
> [ {
>   "datanode" : "ozone-datanode-1.ozone_default",
>   "action" : "status",
>   "status" : "success",
>   "serviceStatus" : "RUNNING",
>   "threshold" : 10.0,
>   "bandwidthInMB" : 10,
>   "threads" : 5,
>   "stopAfterDiskEven" : false,
>   "successMove" : 0,
>   "failureMove" : 0,
>   "bytesMovedMB" : 0,
>   "estBytesToMoveMB" : 0,
>   "estTimeLeftMin" : 0
> }, {
>   "datanode" : "ozone-datanode-3.ozone_default",
>   "action" : "status",
>   "status" : "success",
>   "serviceStatus" : "RUNNING",
>   "threshold" : 10.0,
>   "bandwidthInMB" : 10,
>   "threads" : 5,
>   "stopAfterDiskEven" : false,
>   "successMove" : 0,
>   "failureMove" : 0,
>   "bytesMovedMB" : 0,
>   "estBytesToMoveMB" : 0,
>   "estTimeLeftMin" : 0
> }, {
> "datanode" : "ozone-datanode-1.ozone_default",
>   "action" : "status",
>   "status" : "success",
>   "serviceStatus" : "RUNNING",
>   "threshold" : 10.0,
>   "bandwidthInMB" : 10,
>   "threads" : 5,
>   "stopAfterDiskEven" : false,
>   "successMove" : 0,
>   "failureMove" : 0,
>   "bytesMovedMB" : 0,
>   "estBytesToMoveMB" : 0,
>   "estTimeLeftMin" : 0
> } ] {code}
> Thirdly, Instead of showing ip-address in json cli output show dnHostName for 
> better clarity.
> {code:java}
> bash-5.1$ ozone admin datanode diskbalancer stop --in-service-datanodes --json
> [ {
>   "datanode" : "172.18.0.5:19864",
>   "action" : "stop",
>   "status" : "success"
> }, {
>   "datanode" : "172.18.0.9:19864",
>   "action" : "stop",
>   "status" : "success"
> }, {
>   "datanode" : "172.18.0.10:19864",
>   "action" : "stop",
>   "status" : "success"
> }, {
>   "datanode" : "172.18.0.8:19864",
>   "action" : "stop",
>   "status" : "success"
> }]
>  {code}
> {{ }}



--
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