Gargi-jais11 opened a new pull request, #9091:
URL: https://github.com/apache/ozone/pull/9091

   ## What changes were proposed in this pull request?
   Currently DiskBalancer start, stop and update command is send only to  
**IN_SERVICE_HEALTHY**  DN but user has no info about this so improve cli 
output message to show as below:
   ```
   bash-5.1$ ozone admin datanode diskbalancer start -t 0.0001 -a
   Start DiskBalancer on datanode(s):
   All datanodes which are IN_SERVICE and HEALTHY. 
   ```
   When start, stop and update command is sent to a specific DN which is not 
**IN_SERVICE_HEALTHY**, command should be rejected same as when sent to all DN.
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-13667
   
   ## How was this patch tested?
   
   Updated existing Integration Test 
`TestDiskBalancerDuringDecommissionAndMaintenance` .
   Also tested manually on docker-cluster:
   ```
   bash-5.1$ ozone admin datanode decommission -id scmservice 
ozone-ha-datanode-5
   Started decommissioning datanode(s):
   ozone-ha-datanode-5
   
   bash-5.1$ ozone admin datanode diskbalancer status
   Status result:
   Datanode                            Status          Threshold(%)    
BandwidthInMB   Threads      SuccessMove  FailureMove  BytesMoved(MB)  
EstBytesToMove(MB) EstTimeLeft(min)
   ozone-ha-datanode-3.ozone-ha_default STOPPED         10.0000         200     
        5            0            0            0               0               
0              
   ozone-ha-datanode-2.ozone-ha_default STOPPED         10.0000         200     
        5            0            0            0               0               
0              
   ozone-ha-datanode-4.ozone-ha_default STOPPED         10.0000         200     
        5            0            0            0               0               
0              
   ozone-ha-datanode-1.ozone-ha_default STOPPED         10.0000         200     
        5            0            0            0               0               
0              
   
   Note: Estimated time left is calculated based on the estimated bytes to move 
and the configured disk bandwidth.
   
   bash-5.1$ ozone admin datanode diskbalancer start -b 200 -d 
ozone-ha-datanode-5
   Error: ozone-ha-datanode-5.ozone-ha_default: Datanode is not in optimal 
state for disk balancing. NodeStatus: DECOMMISSIONING(no expiry)-HEALTHY
   Some nodes could not start DiskBalancer.
   ```
   
   ```
   bash-5.1$ ozone admin datanode decommission -id scmservice 
ozone-ha-datanode-3 
   Started decommissioning datanode(s):
   ozone-ha-datanode-3
   
   bash-5.1$ ozone admin datanode decommission -id scmservice 
ozone-ha-datanode-4 
   Started decommissioning datanode(s):
   ozone-ha-datanode-4
   
   bash-5.1$ ozone admin datanode diskbalancer start -t 0.002 -a
   Start DiskBalancer on datanode(s):
   All datanodes which are IN_SERVICE and HEALTHY.
   
   ```
   
   


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