Skip to content

Commit

Permalink
Merge pull request #16917 from trociny/wip-qa-admin-sock
Browse files Browse the repository at this point in the history
qa/workunits/rbd: use command line option to specify watcher asok

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
  • Loading branch information
Jason Dillaman committed Aug 9, 2017
2 parents f88047a + 6a57513 commit 339d3fa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions qa/workunits/rbd/test_admin_socket.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,30 +62,30 @@ 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
test -n "${pid}"
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
Expand Down

0 comments on commit 339d3fa

Please sign in to comment.