micro-osd.sh: set up a cephfs mirroring daemon

This mirroring daemon is required to test the cephfs mirroring calls
that will be added to cephfs/admin.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
John Mulligan 2021-06-14 15:16:54 -04:00 committed by mergify[bot]
parent e56f10f3b4
commit 6febfd6650
1 changed files with 21 additions and 0 deletions

View File

@ -114,6 +114,27 @@ ceph-mgr --id ${MGR_NAME}
ceph auth get-or-create client.rbd-mirror.${MIRROR_ID} mon 'profile rbd-mirror' osd 'profile rbd'
rbd-mirror --id ${MIRROR_ID} --log-file ${LOG_DIR}/rbd-mirror.log
# start cephfs-mirror
# Skip on "nautilus" and "octopus" the supported ceph versions that
# don't have it.
case "${CEPH_VERSION}" in
nautilus|octopus)
echo "Skipping cephfs-mirror on ${CEPH_VERSION} ..."
;;
*)
ceph auth get-or-create "client.cephfs-mirror.${MIRROR_ID}" \
mon 'profile cephfs-mirror' \
mds 'allow r' \
osd 'allow rw tag cephfs metadata=*, allow r tag cephfs data=*' \
mgr 'allow r'
cephfs-mirror --id "cephfs-mirror.${MIRROR_ID}" \
--log-file "${LOG_DIR}/cephfs-mirror.log"
ceph fs authorize cephfs client.cephfs-mirror-remote / rwps > "${DIR}/cephfs-mirror-remote.out"
# the .out file above is not used by the scripts but can be used for debugging
;;
esac
# start an rgw
ceph auth get-or-create client.rgw."${RGW_ID}" osd 'allow rwx' mon 'allow rw' -o ${RGW_DATA}/keyring
radosgw -n client.rgw."${RGW_ID}" -k ${RGW_DATA}/keyring