From: Jason Dillaman Date: Tue, 19 Feb 2019 19:19:29 +0000 (-0500) Subject: qa/workunits: fixed mon address parsing for rbd-mirror X-Git-Tag: v14.1.0~22^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F26521%2Fhead;p=ceph.git 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 --- diff --git a/qa/workunits/rbd/rbd_mirror_helpers.sh b/qa/workunits/rbd/rbd_mirror_helpers.sh index ea50078ddc2e..7d874d900e37 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}