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

   ## What changes were proposed in this pull request?
   
   The current error message if decommission or maintenance fails early is not 
detailed enough:
   `Error: AllHosts: Sufficient nodes are not available.`
   The message must be self-explanatory and mention the reason of failure.
   In this PR, the error messages have been changed to show the number of nodes 
trying to be decommissioned/put into maintenance and how many nodes are needed 
to maintain required replication.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-10859
   
   ## How was this patch tested?
   
   Tested locally in docker cluster with 5 nodes, max replication factor of 
keys was RATIS-THREE:
   ```
   bash-4.2$ ozone admin datanode decommission ozone-datanode-1 
ozone-datanode-2 ozone-datanode-3
   Started decommissioning datanode(s):
   ozone-datanode-1
   ozone-datanode-2
   ozone-datanode-3
   Error: AllHosts: Insufficient nodes. Tried to decommission 3 nodes of which 
3 nodes were valid. Cluster has 5 IN-SERVICE nodes, 3 of which are required for 
minimum replication. 
   Some nodes could not enter the decommission workflow
   bash-4.2$ 
   bash-4.2$ ozone admin datanode maintenance ozone-datanode-1 ozone-datanode-2 
ozone-datanode-3 ozone-datanode-4
   Entering maintenance mode on datanode(s):
   ozone-datanode-1
   ozone-datanode-2
   ozone-datanode-3
   ozone-datanode-4
   Error: AllHosts: Insufficient nodes. Tried to start maintenance for 4 nodes 
of which 4nodes were valid. Cluster has 5 IN-SERVICE nodes, 2 of which are 
required for minimum replication. 
   Some nodes could not start the maintenance workflow
   
   ```
   


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