kadalu / moana

Moana is a frontend for the Kadalu Storage / GlusterFS. Moana provides tools for setting up and managing the Kadalu Storage / Gluster pools.
GNU General Public License v3.0
18 stars 7 forks source link

rebalance: Add subcommand 'kadalu rebalance status <>' #300

Closed vatsa287 closed 1 year ago

vatsa287 commented 1 year ago

This PR adds support to display status of rebalance processes(migrate-data) at volume level by default and, status of rebalance processes of all storage units with --detail.

Example:

root@kadalu-dev:/src/mgr# ./bin/kadalu rebalance status dev/vol1 
Name                       : dev/vol1
Type                       : Distribute
ID                         : 2111a5bd-7687-4384-82d8-c46f70dd9985
Progress                   : 66.67 %
Estimate Seconds           : 0
Scanned                    : 13.5MiB / 13.5MiB

Volume vol1 Rebalance Status            : partial
Total Number of Rebalance Process       : 6
Number of Completed Rebalance Process   : 4
Number of Failed Rebalance Process      : 0
root@kadalu-dev:/src/mgr# ./bin/kadalu rebalance status dev/vol1 --detail
Name                                    : dev/vol1
Type                                    : Distribute
ID                                      : 2111a5bd-7687-4384-82d8-c46f70dd9985
Distribute group 1 
    Storage unit 1                      : kadalu-dev:/exports/vol1/s1
     Status                             : not started
     Progress                           : 0 %
     Scanned                            : 0B / 0B
     Duration Seconds                   : 0
     Estimate Seconds                   : 0

Distribute group 2 
    Storage unit 1                      : kadalu-dev:/exports/vol1/s2
     Status                             : complete
     Progress                           : 100 %
     Scanned                            : 39.8MiB / 39.8MiB
     Duration Seconds                   : 2
     Estimate Seconds                   : 0

Distribute group 3 
    Storage unit 1                      : kadalu-dev:/exports/vol1/s3
     Status                             : complete
     Progress                           : 100 %
     Scanned                            : 39.5MiB / 39.5MiB
     Duration Seconds                   : 2
     Estimate Seconds                   : 0

Distribute group 4 
    Storage unit 1                      : kadalu-dev:/exports/vol1/s1_e
     Status                             : not started
     Progress                           : 0 %
     Scanned                            : 0B / 0B
     Duration Seconds                   : 0
     Estimate Seconds                   : 0

Distribute group 5 
    Storage unit 1                      : kadalu-dev:/exports/vol1/s2_e
     Status                             : complete
     Progress                           : 100 %
     Scanned                            : 1.09MiB / 1.09MiB
     Duration Seconds                   : 0
     Estimate Seconds                   : 0

Distribute group 6 
    Storage unit 1                      : kadalu-dev:/exports/vol1/s3_e
     Status                             : complete
     Progress                           : 100 %
     Scanned                            : 1.09MiB / 1.09MiB
     Duration Seconds                   : 0
     Estimate Seconds                   : 0

Volume vol1 Rebalance Status            : partial
Total Number of Rebalance Process       : 6
Number of Completed Rebalance Process   : 4
Number of Failed Rebalance Process      : 0

Updates: https://github.com/kadalu/rfcs/pull/26 Signed-off-by: Shree Vatsa N vatsa@kadalu.tech