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

   ## What changes were proposed in this pull request?
   Improves observability of Container Balancer move failures in `ozone admin 
containerbalancer status -v`.
   
   Previously, verbose status only showed aggregate counts (“Failed to move 
containers”, “Failed to move containers by timeout”) with no breakdown of why 
moves failed, so users had to dig through SCM logs.
   
   This change tracks per-iteration move failures on the SCM side and surfaces 
them in the CLI:
   - Failure breakdown — counts grouped by reason (e.g. 
REPLICATION_FAIL_TIME_OUT, PRE_MOVE_CONTAINER_NOT_FOUND, 
ITERATION_MOVE_TIMEOUT, plus other MoveResult values)
   - Failed move details — sample failed moves with container ID and 
source/target datanode UUIDs (capped at 100 total, 10 per reason; counts are 
not capped)
   
   ## What is the link to the Apache JIRA
   
   [HDDS-15889](https://issues.apache.org/jira/browse/HDDS-15889)
   
   ## How was this patch tested?
   Added test cases.
   Tested in docker ozone-balancer cluster:
   
   ```
   bash-5.1$ ozone admin containerbalancer start \
     -t 0.1 -d 100 -i 2 \
     --move-replication-timeout-minutes 1 \
     --move-timeout-minutes 16 \
     --balancing-iteration-interval-minutes 1
   Container Balancer started successfully.
   bash-5.1$
   ```
   
   ```
   bash-5.1$ ozone admin containerbalancer status --verbose --history
   ContainerBalancer is Running.
   Started at: 2026-08-03 05:04:17
   Balancing duration: 5m 49s
   
   Container Balancer Configuration values:
   Key                                                Value
   Threshold                                          0.1
   Max Datanodes to Involve per Iteration(percent)    100
   Max Size to Move per Iteration                     500GB
   Max Size Entering Target per Iteration             26GB
   Max Size Leaving Source per Iteration              26GB
   Number of Iterations                               2
   Time Limit for Single Container's Movement         16min
   Time Limit for Single Container's Replication      1min
   Interval between each Iteration                    1min
   Whether to Enable Network Topology                 false
   Whether to Trigger Refresh Datanode Usage Info     false
   Container IDs to Include in Balancing              None
   Container IDs to Exclude from Balancing            None
   Datanodes Specified to be Balanced                 None
   Datanodes Excluded from Balancing                  None
   
   Current iteration info:
   Key                                                Value
   Iteration number                                   2
   Iteration duration                                 1m 15s
   Iteration result                                   -
   Size scheduled to move                             300 MB
   Moved data size                                    0 B
   Scheduled to move containers                       3
   Already moved containers                           0
   Failed to move containers                          0
   Failed to move containers by timeout               0
   Entered data to nodes
   750e0c27-4d66-4e98-96e2-62a6d4351b52 <- 100 MB
   df26a64a-da07-4207-8310-f6aa427c9e8d <- 100 MB
   9d674491-0530-438c-90a5-7f7c833edc86 <- 100 MB
   Exited data from nodes
   8768b1cf-8397-4f31-883f-3222e7abde05 -> 100 MB
   700868a5-6c48-4139-949e-58697d21a14e -> 100 MB
   86f4d3f6-7da3-4a41-8b2e-f582519d30fd -> 100 MB
   
   Completed iteration history:
   Key                                                Value
   Iteration number                                   1
   Iteration duration                                 3m 34s
   Iteration result                                   ITERATION_COMPLETED
   Size scheduled to move                             300 MB
   Moved data size                                    0 B
   Scheduled to move containers                       3
   Already moved containers                           0
   Failed to move containers                          0
   Failed to move containers by timeout               3
   Failure breakdown
     REPLICATION_FAIL_TIME_OUT                        3
   Failed move details
     REPLICATION_FAIL_TIME_OUT
       container 1  source 700868a5-6c48-4139-949e-58697d21a14e  target 
750e0c27-4d66-4e98-96e2-62a6d4351b52
       container 2  source 8768b1cf-8397-4f31-883f-3222e7abde05  target 
df26a64a-da07-4207-8310-f6aa427c9e8d
       container 3  source 86f4d3f6-7da3-4a41-8b2e-f582519d30fd  target 
9d674491-0530-438c-90a5-7f7c833edc86
   Entered data to nodes
   750e0c27-4d66-4e98-96e2-62a6d4351b52 <- 100 MB
   df26a64a-da07-4207-8310-f6aa427c9e8d <- 100 MB
   9d674491-0530-438c-90a5-7f7c833edc86 <- 100 MB
   Exited data from nodes
   8768b1cf-8397-4f31-883f-3222e7abde05 -> 100 MB
   700868a5-6c48-4139-949e-58697d21a14e -> 100 MB
   86f4d3f6-7da3-4a41-8b2e-f582519d30fd -> 100 MB
   
   
   bash-5.1$
   ```
   
   Green CI : https://github.com/sreejasahithi/ozone/actions/runs/30628368322
   


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