]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tests: TEST_crush_reject_empty must not run a mon
authorLoic Dachary <ldachary@redhat.com>
Fri, 10 Jul 2015 14:23:47 +0000 (16:23 +0200)
committerKefu Chai <kchai@redhat.com>
Sat, 11 Jul 2015 17:32:42 +0000 (01:32 +0800)
* 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 <ldachary@redhat.com>
src/test/mon/osd-crush.sh

index c0857c4e99f47690a84ed9343a508b7723b91ec0..1c6347f48e4aa77500f293d32f4b27a7b2bd3a5f 100755 (executable)
@@ -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