From 2aaeea145b24b972a0b98549c3527ccf98f4c96f Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Fri, 10 Jul 2015 16:23:47 +0200 Subject: [PATCH] tests: TEST_crush_reject_empty must not run a mon * Back in Hammer, the osd-crush.sh individual tests did not run the monitor, it was taken care of by the run() function. An attempt to run another mon fails with: error: IO lock testdir/osd-crush/a/store.db/LOCK: Resource temporarily unavailable This problem was introduced by cc1cc033930e8690a57674e842a003f6bbc7a242 from https://github.com/ceph/ceph/pull/4936 * replace test/mon/mon-test-helpers.sh with test/ceph-helpers.sh as we need run_osd() in this newly added test * update the run-dir of commands: ceph-helpers.sh use the different convention for the run-dir of daemons. http://tracker.ceph.com/issues/11975 Refs: #11975 Signed-off-by: Loic Dachary --- src/test/mon/osd-crush.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/test/mon/osd-crush.sh b/src/test/mon/osd-crush.sh index c0857c4e99f47..1c6347f48e4aa 100755 --- a/src/test/mon/osd-crush.sh +++ b/src/test/mon/osd-crush.sh @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library Public License for more details. # -source test/mon/mon-test-helpers.sh +source test/ceph-helpers.sh function run() { local dir=$1 @@ -30,7 +30,7 @@ function run() { setup $dir || return 1 run_mon $dir a --public-addr $CEPH_MON if ! $TEST_function $dir ; then - cat $dir/a/log + cat $dir/mon.a.log return 1 fi teardown $dir || return 1 @@ -103,8 +103,8 @@ function TEST_crush_rule_create_erasure() { ./ceph osd erasure-code-profile rm default || return 1 ! ./ceph osd erasure-code-profile ls | grep default || return 1 ./ceph osd crush rule create-erasure $ruleset || return 1 - CEPH_ARGS='' ./ceph --admin-daemon $dir/a/ceph-mon.a.asok log flush || return 1 - grep 'profile default set' $dir/a/log || return 1 + CEPH_ARGS='' ./ceph --admin-daemon $dir/ceph-mon.a.asok log flush || return 1 + grep 'profile default set' $dir/mon.a.log || return 1 ./ceph osd erasure-code-profile ls | grep default || return 1 ./ceph osd crush rule rm $ruleset || return 1 ! ./ceph osd crush rule ls | grep $ruleset || return 1 @@ -190,7 +190,6 @@ function TEST_crush_rename_bucket() { function TEST_crush_reject_empty() { local dir=$1 - run_mon $dir a || return 1 # should have at least one OSD run_osd $dir 0 || return 1 -- 2.39.5