From: Mykola Golub Date: Tue, 8 Aug 2017 18:50:47 +0000 (+0200) Subject: qa/workunits/rbd: use command line option to specify watcher asok X-Git-Tag: v12.1.3~14^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F16946%2Fhead;p=ceph.git qa/workunits/rbd: use command line option to specify watcher asok The previous method to get the watcher admin socket was fragile and had started to fail after the recent changes to vstart ceph.conf. Fixes: http://tracker.ceph.com/issues/20954 Signed-off-by: Mykola Golub (cherry picked from commit 6a575136a76b9e291c0948e1179f33a2f73853fb) --- diff --git a/qa/workunits/rbd/test_admin_socket.sh b/qa/workunits/rbd/test_admin_socket.sh index 9135c2ecefc..a7ecd839c5d 100755 --- a/qa/workunits/rbd/test_admin_socket.sh +++ b/qa/workunits/rbd/test_admin_socket.sh @@ -62,15 +62,17 @@ function rbd_check_perfcounter() function rbd_watch_start() { local image=$1 + local asok=$(rbd_watch_asok ${image}) mkfifo $(rbd_watch_fifo ${image}) (cat $(rbd_watch_fifo ${image}) | - rbd watch ${image} > $(rbd_watch_out_file ${image}) 2>&1)& + rbd --admin-socket ${asok} watch ${image} \ + > $(rbd_watch_out_file ${image}) 2>&1)& # find pid of the started rbd watch process local pid for i in `seq 10`; do - pid=$(ps auxww | awk "/[r]bd watch ${image}/ {print \$2}") + pid=$(ps auxww | awk "/[r]bd --admin.* watch ${image}/ {print \$2}") test -n "${pid}" && break sleep 0.1 done @@ -78,14 +80,12 @@ function rbd_watch_start() echo ${pid} > $(rbd_watch_pid_file ${image}) # find watcher admin socket - local asok=$(ceph-conf admin_socket | sed -E "s/[0-9]+/${pid}/") test -n "${asok}" for i in `seq 10`; do test -S "${asok}" && break sleep 0.1 done test -S "${asok}" - ln -s "${asok}" $(rbd_watch_asok ${image}) # configure debug level ceph --admin-daemon "${asok}" config set debug_rbd 20