mirror of
https://github.com/ceph/ceph
synced 2025-02-19 08:57:27 +00:00
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 <mgolub@mirantis.com>
This commit is contained in:
parent
2efc7e756b
commit
6a575136a7
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user