Skip to content

Commit 1e2f375

Browse files
committed
mon/test_mon_osdmap_prune: Use first_pinned instead of first_committed
In the test, we assume the trimming of osdmaps is done if osdmap_first_committed is equal to the epoch of the map upto which we had to trim. osdmap_first_committed however returns the value of cached_first_committed which is updated before the Paxos proposal for trim goes through. Normally, this is not a problem as when a refresh() happens, cached_first_committed will be corrected to the value before the trim was proposed if the Paxos proposal failed. But for this test, we encounter a failure in this case as the osdmap_first_committed will not be equal to the osdmap_manifest.first_pinned as the trim never went through. Changing the test to verify that osdmap_manifest.first_pinned has changed to the correct value is a better way to signify that the trim is complete for the purpose of this test. Fixes: https://tracker.ceph.com/issues/47838 Signed-off-by: Aishwarya Mathuria <[email protected]>
1 parent ce0d6fc commit 1e2f375

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

qa/workunits/mon/test_mon_osdmap_prune.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ function wait_for_trim() {
3333

3434
for ((i=0; i < ${#delays[*]}; ++i)); do
3535
fc=$(ceph report | jq '.osdmap_first_committed')
36-
if [[ $fc -eq $epoch ]]; then
36+
manifest="$(ceph report | jq '.osdmap_manifest')"
37+
first_pinned_map=$(ceph report | jq '.osdmap_manifest.first_pinned')
38+
if [[ $first_pinned_map -eq $epoch ]]; then
3739
return 0
3840
fi
3941
sleep ${delays[$i]}

0 commit comments

Comments
 (0)