From: Sage Weil Date: Fri, 20 Dec 2019 19:33:21 +0000 (-0600) Subject: qa/standalone: python -> python3 X-Git-Tag: v15.1.0~407^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=acd4f5bc43525f1625d0bea0d79bca3b6bb40115;p=ceph.git qa/standalone: python -> python3 Signed-off-by: Sage Weil --- diff --git a/qa/standalone/mon/osd-pool-create.sh b/qa/standalone/mon/osd-pool-create.sh index ecb94cb3ab88b..b14ca803bdf6d 100755 --- a/qa/standalone/mon/osd-pool-create.sh +++ b/qa/standalone/mon/osd-pool-create.sh @@ -204,7 +204,7 @@ function TEST_utf8_cli() { ceph osd lspools 2>&1 | \ grep "黄" || return 1 ceph -f json-pretty osd dump | \ - python -c "import json; import sys; json.load(sys.stdin)" || return 1 + python3 -c "import json; import sys; json.load(sys.stdin)" || return 1 ceph osd pool delete 黄 黄 --yes-i-really-really-mean-it } diff --git a/qa/standalone/scrub/osd-scrub-repair.sh b/qa/standalone/scrub/osd-scrub-repair.sh index 10917dd6ae693..287d970132e6e 100755 --- a/qa/standalone/scrub/osd-scrub-repair.sh +++ b/qa/standalone/scrub/osd-scrub-repair.sh @@ -1139,7 +1139,7 @@ function TEST_corrupt_scrub_replicated() { # Get epoch for repair-get requests epoch=$(jq .epoch $dir/json) - jq "$jqfilter" << EOF | jq '.inconsistents' | python -c "$sortkeys" > $dir/checkcsjson + jq "$jqfilter" << EOF | jq '.inconsistents' | python3 -c "$sortkeys" > $dir/checkcsjson { "inconsistents": [ { @@ -2020,7 +2020,7 @@ function TEST_corrupt_scrub_replicated() { } EOF - jq "$jqfilter" $dir/json | jq '.inconsistents' | python -c "$sortkeys" > $dir/csjson + jq "$jqfilter" $dir/json | jq '.inconsistents' | python3 -c "$sortkeys" > $dir/csjson multidiff $dir/checkcsjson $dir/csjson || test $getjson = "yes" || return 1 if test $getjson = "yes" then @@ -2117,7 +2117,7 @@ EOF # Get epoch for repair-get requests epoch=$(jq .epoch $dir/json) - jq "$jqfilter" << EOF | jq '.inconsistents' | python -c "$sortkeys" > $dir/checkcsjson + jq "$jqfilter" << EOF | jq '.inconsistents' | python3 -c "$sortkeys" > $dir/checkcsjson { "inconsistents": [ { @@ -3496,7 +3496,7 @@ EOF } EOF - jq "$jqfilter" $dir/json | jq '.inconsistents' | python -c "$sortkeys" > $dir/csjson + jq "$jqfilter" $dir/json | jq '.inconsistents' | python3 -c "$sortkeys" > $dir/csjson multidiff $dir/checkcsjson $dir/csjson || test $getjson = "yes" || return 1 if test $getjson = "yes" then @@ -3634,7 +3634,7 @@ function corrupt_scrub_erasure() { # Get epoch for repair-get requests epoch=$(jq .epoch $dir/json) - jq "$jqfilter" << EOF | jq '.inconsistents' | python -c "$sortkeys" > $dir/checkcsjson + jq "$jqfilter" << EOF | jq '.inconsistents' | python3 -c "$sortkeys" > $dir/checkcsjson { "inconsistents": [ { @@ -4254,7 +4254,7 @@ function corrupt_scrub_erasure() { } EOF - jq "$jqfilter" $dir/json | jq '.inconsistents' | python -c "$sortkeys" > $dir/csjson + jq "$jqfilter" $dir/json | jq '.inconsistents' | python3 -c "$sortkeys" > $dir/csjson multidiff $dir/checkcsjson $dir/csjson || test $getjson = "yes" || return 1 if test $getjson = "yes" then @@ -4280,7 +4280,7 @@ EOF if [ "$allow_overwrites" = "true" ] then - jq "$jqfilter" << EOF | jq '.inconsistents' | python -c "$sortkeys" > $dir/checkcsjson + jq "$jqfilter" << EOF | jq '.inconsistents' | python3 -c "$sortkeys" > $dir/checkcsjson { "inconsistents": [ { @@ -4935,7 +4935,7 @@ EOF else - jq "$jqfilter" << EOF | jq '.inconsistents' | python -c "$sortkeys" > $dir/checkcsjson + jq "$jqfilter" << EOF | jq '.inconsistents' | python3 -c "$sortkeys" > $dir/checkcsjson { "inconsistents": [ { @@ -5668,7 +5668,7 @@ EOF fi - jq "$jqfilter" $dir/json | jq '.inconsistents' | python -c "$sortkeys" > $dir/csjson + jq "$jqfilter" $dir/json | jq '.inconsistents' | python3 -c "$sortkeys" > $dir/csjson multidiff $dir/checkcsjson $dir/csjson || test $getjson = "yes" || return 1 if test $getjson = "yes" then @@ -5934,7 +5934,7 @@ function TEST_corrupt_snapset_scrub_rep() { rados list-inconsistent-obj $pg > $dir/json || return 1 - jq "$jqfilter" << EOF | jq '.inconsistents' | python -c "$sortkeys" > $dir/checkcsjson + jq "$jqfilter" << EOF | jq '.inconsistents' | python3 -c "$sortkeys" > $dir/checkcsjson { "epoch": 34, "inconsistents": [ @@ -6100,7 +6100,7 @@ function TEST_corrupt_snapset_scrub_rep() { } EOF - jq "$jqfilter" $dir/json | jq '.inconsistents' | python -c "$sortkeys" > $dir/csjson + jq "$jqfilter" $dir/json | jq '.inconsistents' | python3 -c "$sortkeys" > $dir/csjson multidiff $dir/checkcsjson $dir/csjson || test $getjson = "yes" || return 1 if test $getjson = "yes" then diff --git a/qa/standalone/scrub/osd-scrub-snaps.sh b/qa/standalone/scrub/osd-scrub-snaps.sh index 3f84a8b077ec1..65c73e7f0ad72 100755 --- a/qa/standalone/scrub/osd-scrub-snaps.sh +++ b/qa/standalone/scrub/osd-scrub-snaps.sh @@ -224,19 +224,19 @@ function TEST_scrub_snaps() { # The injected snapshot errors with a single copy pool doesn't # see object errors because all the issues are detected by # comparing copies. - jq "$jqfilter" << EOF | python -c "$sortkeys" > $dir/checkcsjson + jq "$jqfilter" << EOF | python3 -c "$sortkeys" > $dir/checkcsjson { "epoch": 17, "inconsistents": [] } EOF - jq "$jqfilter" $dir/json | python -c "$sortkeys" > $dir/csjson + jq "$jqfilter" $dir/json | python3 -c "$sortkeys" > $dir/csjson multidiff $dir/checkcsjson $dir/csjson || test $getjson = "yes" || return 1 rados list-inconsistent-snapset $pgid > $dir/json || return 1 - jq "$jqfilter" << EOF | python -c "$sortkeys" > $dir/checkcsjson + jq "$jqfilter" << EOF | python3 -c "$sortkeys" > $dir/checkcsjson { "inconsistents": [ { @@ -615,7 +615,7 @@ EOF } EOF - jq "$jqfilter" $dir/json | python -c "$sortkeys" > $dir/csjson + jq "$jqfilter" $dir/json | python3 -c "$sortkeys" > $dir/csjson multidiff $dir/checkcsjson $dir/csjson || test $getjson = "yes" || return 1 if test $getjson = "yes" then @@ -779,7 +779,7 @@ function _scrub_snaps_multi() { if [ $which = "replica" ]; then scruberrors="20" - jq "$jqfilter" << EOF | python -c "$sortkeys" > $dir/checkcsjson + jq "$jqfilter" << EOF | python3 -c "$sortkeys" > $dir/checkcsjson { "epoch": 23, "inconsistents": [] @@ -788,7 +788,7 @@ EOF else scruberrors="30" - jq "$jqfilter" << EOF | python -c "$sortkeys" > $dir/checkcsjson + jq "$jqfilter" << EOF | python3 -c "$sortkeys" > $dir/checkcsjson { "epoch": 23, "inconsistents": [ @@ -1042,7 +1042,7 @@ else EOF fi - jq "$jqfilter" $dir/json | python -c "$sortkeys" > $dir/csjson + jq "$jqfilter" $dir/json | python3 -c "$sortkeys" > $dir/csjson multidiff $dir/checkcsjson $dir/csjson || test $getjson = "yes" || return 1 if test $getjson = "yes" then