mirror of
https://github.com/ceph/ceph
synced 2025-01-29 06:24:03 +00:00
Merge pull request #38856 from dzafman/wip-48789
test: Fix osd-scrub-scaps.sh to handle DB format change Reviewed-by: Ronen Friedman <rfriedma@redhat.com> Reviewed-by: Neha Ojha <nojha@redhat.com>
This commit is contained in:
commit
5c11f40c12
@ -101,11 +101,13 @@ function create_scenario() {
|
||||
OBJ5SAVE="$JSON"
|
||||
# Starts with a snapmap
|
||||
ceph-kvstore-tool bluestore-kv $dir/${osd} list 2> /dev/null > $dir/drk.log
|
||||
grep "^m.*SNA_.*[.]1[.]obj5[.][.]$" $dir/drk.log || return 1
|
||||
grep SNA_ $dir/drk.log
|
||||
grep "^[pm].*SNA_.*[.]1[.]obj5[.][.]$" $dir/drk.log || return 1
|
||||
ceph-objectstore-tool --data-path $dir/${osd} --rmtype nosnapmap "$JSON" remove || return 1
|
||||
# Check that snapmap is stil there
|
||||
ceph-kvstore-tool bluestore-kv $dir/${osd} list 2> /dev/null > $dir/drk.log
|
||||
grep "^m.*SNA_.*[.]1[.]obj5[.][.]$" $dir/drk.log || return 1
|
||||
grep SNA_ $dir/drk.log
|
||||
grep "^[pm].*SNA_.*[.]1[.]obj5[.][.]$" $dir/drk.log || return 1
|
||||
rm -f $dir/drk.log
|
||||
|
||||
JSON="$(ceph-objectstore-tool --data-path $dir/${osd} --op list obj5 | grep \"snapid\":4)"
|
||||
@ -121,12 +123,14 @@ function create_scenario() {
|
||||
|
||||
# Starts with a snapmap
|
||||
ceph-kvstore-tool bluestore-kv $dir/${osd} list 2> /dev/null > $dir/drk.log
|
||||
grep "^m.*SNA_.*[.]7[.]obj16[.][.]$" $dir/drk.log || return 1
|
||||
grep SNA_ $dir/drk.log
|
||||
grep "^[pm].*SNA_.*[.]7[.]obj16[.][.]$" $dir/drk.log || return 1
|
||||
JSON="$(ceph-objectstore-tool --data-path $dir/${osd} --op list obj16 | grep \"snapid\":7)"
|
||||
ceph-objectstore-tool --data-path $dir/${osd} --rmtype snapmap "$JSON" remove || return 1
|
||||
# Check that snapmap is now removed
|
||||
ceph-kvstore-tool bluestore-kv $dir/${osd} list 2> /dev/null > $dir/drk.log
|
||||
! grep "^m.*SNA_.*[.]7[.]obj16[.][.]$" $dir/drk.log || return 1
|
||||
grep SNA_ $dir/drk.log
|
||||
! grep "^[pm].*SNA_.*[.]7[.]obj16[.][.]$" $dir/drk.log || return 1
|
||||
rm -f $dir/drk.log
|
||||
|
||||
JSON="$(ceph-objectstore-tool --data-path $dir/${osd} --head --op list obj2)"
|
||||
|
Loading…
Reference in New Issue
Block a user