make show-disk-free and pool-statistics actions more readable
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ceph Monitor Charm |
New
|
Undecided
|
Unassigned |
Bug Description
Currently both actions show-disk-free and pool-statistics return a shifted output that is hard to read:
$ juju run ceph-mon/leader show-disk-free
Running operation 13 with 1 task
- task 14 on unit-ceph-mon-2
Waiting for task 14...
message: "ID CLASS WEIGHT REWEIGHT SIZE RAW USE DATA OMAP META AVAIL
\ %USE VAR PGS STATUS TYPE NAME \n -1 0.09357 -
\ 96 GiB 929 MiB 11 MiB 0 B 918 MiB 95 GiB 0.94 1.00 - root
default \n-12 0.03119 - 32 GiB 307 MiB 3.7 MiB
\ 0 B 303 MiB 32 GiB 0.94 0.99 - rack us-east-1c \n-11
\ 0.03119 - 32 GiB 307 MiB 3.7 MiB 0 B 303 MiB 32 GiB 0.94
\ 0.99 - host ip-172-31-36-226\n 2 ssd 0.03119 1.00000
\ 32 GiB 307 MiB 3.7 MiB 0 B 303 MiB 32 GiB 0.94 0.99 153 up osd.2
\ \n -8 0.03119 - 32 GiB 311 MiB 3.7 MiB 0 B 307
MiB 32 GiB 0.95 1.00 - rack us-east-1e \n -7 0.03119
\ - 32 GiB 311 MiB 3.7 MiB 0 B 307 MiB 32 GiB 0.95 1.00 - host
ip-172-31-63-78 \n 1 ssd 0.03119 1.00000 32 GiB 311 MiB 3.7 MiB 0 B
\ 307 MiB 32 GiB 0.95 1.00 153 up osd.1 \n -4 0.03119
\ - 32 GiB 311 MiB 3.7 MiB 0 B 307 MiB 32 GiB 0.95 1.00 - rack
us-east-1f \n -3 0.03119 - 32 GiB 311 MiB 3.7 MiB 0
B 307 MiB 32 GiB 0.95 1.00 - host ip-172-31-79-73 \n 0
\ ssd 0.03119 1.00000 32 GiB 311 MiB 3.7 MiB 0 B 307 MiB 32 GiB 0.95
\ 1.00 153 up osd.0 \n TOTAL
\ 96 GiB 929 MiB 11 MiB 0 B 918 MiB 95 GiB 0.94 \nMIN/MAX
VAR: 0.99/1.00 STDDEV: 0.01\n"
$ juju run ceph-mon/leader pool-statistics
Running operation 15 with 1 task
- task 16 on unit-ceph-mon-2
Waiting for task 16...
message: "--- RAW STORAGE ---\nCLASS SIZE AVAIL USED RAW USED %RAW USED\nssd
\ 96 GiB 95 GiB 929 MiB 929 MiB 0.94\nTOTAL 96 GiB 95 GiB 929 MiB
\ 929 MiB 0.94\n \n--- POOLS ---\nPOOL ID PGS STORED
\ OBJECTS USED %USED MAX AVAIL\n.mgr 1 1 449 KiB
\ 2 1.3 MiB 0 30 GiB\ndefault.
B 0 0 B 0 30 GiB\ndefault.
B 8 0 B 0 30 GiB\ndefault.
B 0 0 B 0 30 GiB\ndefault.rgw.gc 5 2 0
B 0 0 B 0 30 GiB\ndefault.
\ 209 408 KiB 0 30 GiB\ndefault.
B 0 0 B 0 30 GiB\ndefault.
\ 10 84 KiB 0 30 GiB\ndefault.
B 0 0 B 0 30 GiB\ndefault.
B 0 0 B 0 30 GiB\ndefault.
B 0 0 B 0 30 GiB\ndefault.
B 0 0 B 0 30 GiB\ndefault.
B 0 0 B 0 30 GiB\ndefault.
B 0 0 B 0 30 GiB\ndefault.
B 0 0 B 0 30 GiB\ndefault.
B 0 0 B 0 30 GiB\n.rgw.root 17 2 1.3 KiB
\ 4 48 KiB 0 30 GiB\nceph-nfs 18 4 20
B 4 24 KiB 0 30 GiB\nceph-fs_data 19 4 0
B 0 0 B 0 30 GiB\nceph-
\ 22 120 KiB 0 30 GiB\ntest 21 32 133
B 5 36 KiB 0 30 GiB\n"
If the message part will be removed from the output, it will make some difference:
https:/
https:/
More difference will appear if the line break can be removed from the charm output and the output becomes like the result of this command (this is on juju 3.1.5):
$ juju exec --unit ceph-mon/0 "sudo ceph osd df tree"
ID CLASS WEIGHT REWEIGHT SIZE RAW USE DATA OMAP META AVAIL %USE VAR PGS STATUS TYPE NAME
-1 0.09357 - 96 GiB 929 MiB 11 MiB 0 B 918 MiB 95 GiB 0.94 1.00 - root default
-12 0.03119 - 32 GiB 307 MiB 3.7 MiB 0 B 303 MiB 32 GiB 0.94 0.99 - rack us-east-1c
-11 0.03119 - 32 GiB 307 MiB 3.7 MiB 0 B 303 MiB 32 GiB 0.94 0.99 - host ip-172-31-36-226
2 ssd 0.03119 1.00000 32 GiB 307 MiB 3.7 MiB 0 B 303 MiB 32 GiB 0.94 0.99 153 up osd.2
-8 0.03119 - 32 GiB 311 MiB 3.7 MiB 0 B 307 MiB 32 GiB 0.95 1.00 - rack us-east-1e
-7 0.03119 - 32 GiB 311 MiB 3.7 MiB 0 B 307 MiB 32 GiB 0.95 1.00 - host ip-172-31-63-78
1 ssd 0.03119 1.00000 32 GiB 311 MiB 3.7 MiB 0 B 307 MiB 32 GiB 0.95 1.00 153 up osd.1
-4 0.03119 - 32 GiB 311 MiB 3.7 MiB 0 B 307 MiB 32 GiB 0.95 1.00 - rack us-east-1f
-3 0.03119 - 32 GiB 311 MiB 3.7 MiB 0 B 307 MiB 32 GiB 0.95 1.00 - host ip-172-31-79-73
0 ssd 0.03119 1.00000 32 GiB 311 MiB 3.7 MiB 0 B 307 MiB 32 GiB 0.95 1.00 153 up osd.0
MIN/MAX VAR: 0.99/1.00 STDDEV: 0.01