From 3e0094910ab9a692e1794e64eb6231100e381208 Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Tue, 19 Feb 2019 14:19:29 -0500 Subject: [PATCH] qa/workunits: fixed mon address parsing for rbd-mirror The test extracts the mon addresses from the monmap, but with the recent v2 format change it extracted an invalid address. Fixes: http://tracker.ceph.com/issues/38385 Signed-off-by: Jason Dillaman --- qa/workunits/rbd/rbd_mirror_helpers.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qa/workunits/rbd/rbd_mirror_helpers.sh b/qa/workunits/rbd/rbd_mirror_helpers.sh index ea50078ddc2..7d874d900e3 100755 --- a/qa/workunits/rbd/rbd_mirror_helpers.sh +++ b/qa/workunits/rbd/rbd_mirror_helpers.sh @@ -263,13 +263,14 @@ setup_pools() else mon_map_file=${TEMPDIR}/${remote_cluster}.monmap ceph --cluster ${remote_cluster} mon getmap > ${mon_map_file} - mon_addr=$(monmaptool --print ${mon_map_file} | grep -E 'mon\.' | head -n 1 | sed -E 's/^[0-9]+: ([^/]+).+$/\1/') + mon_addr=$(monmaptool --print ${mon_map_file} | grep -E 'mon\.' | + head -n 1 | sed -E 's/^[0-9]+: ([^ ]+).+$/\1/' | sed -E 's/\/[0-9]+//g') admin_key_file=${TEMPDIR}/${remote_cluster}.client.${CEPH_ID}.key CEPH_ARGS='' ceph --cluster ${remote_cluster} auth get-key client.${CEPH_ID} > ${admin_key_file} rbd --cluster ${cluster} mirror pool peer add ${POOL} client.${CEPH_ID}@${remote_cluster}-DNE \ - --remote-mon-host ${mon_addr} --remote-key-file ${admin_key_file} + --remote-mon-host "${mon_addr}" --remote-key-file ${admin_key_file} uuid=$(rbd --cluster ${cluster} mirror pool peer add ${PARENT_POOL} client.${CEPH_ID}@${remote_cluster}-DNE) rbd --cluster ${cluster} mirror pool peer set ${PARENT_POOL} ${uuid} mon-host ${mon_addr} -- 2.39.5