Ensure crushtool --test called correctly

Later Ceph releases require that the --test function of crushtool
is called with replica information for validation.

Pass in "--num-rep 3" as a basic check plus "--show-statistics"
to silence a non-fatal warning message.

This can be clean cherry-picked back at least as far as
Ceph 12.2.x.

Change-Id: I76d21ddd9da79535f68490b4231ae13705e27edb
Closes-Bug: 2003690
This commit is contained in:
James Page 2023-01-23 12:17:22 +00:00
parent df676a097f
commit 58fc48ebbe
1 changed files with 2 additions and 1 deletions

View File

@ -573,7 +573,8 @@ def attempt_mon_cluster_bootstrap():
"chooseleaf firstn 0 type rack/' > "
"/tmp/crush.decompiled",
"crushtool -c /tmp/crush.decompiled -o /tmp/crush.map",
"crushtool -i /tmp/crush.map --test",
"crushtool -i /tmp/crush.map --test "
"--num-rep 3 --show-statistics",
"ceph osd setcrushmap -i /tmp/crush.map"
]
for cmd in cmds: