ceph/test_ceph_daemon.sh
Sage Weil df40a49eb8 ceph-daemon: use client.admin keyring during bootstrap
It's usually okay to use the mon. key for CLI commands, except we had a
mgr but that prevented you from issuing mgr commands correctly.  We have
the new client.admin key available, so use that instead.

Update tests to not --skip-ssh (now that it doesn't hang).

Signed-off-by: Sage Weil <sage@redhat.com>
2019-10-30 14:07:52 -05:00

67 lines
1.3 KiB
Bash
Executable File

#!/bin/bash -ex
fsid='00000000-0000-0000-0000-0000deadbeef'
image='ceph/daemon-base:latest-master-devel'
[ -z "$ip" ] && ip=127.0.0.1
#A="-d"
../src/ceph-daemon $A rm-cluster --fsid $fsid --force
cat <<EOF > c
[global]
log to file = true
EOF
../src/ceph-daemon $A \
--image $image \
bootstrap \
--mon-id a \
--mgr-id x \
--fsid $fsid \
--mon-ip $ip \
--config c \
--output-keyring k \
--output-config c
chmod 644 k c
if [ -n "$ip2" ]; then
# mon.b
../src/ceph-daemon $A \
--image $image \
deploy --name mon.b \
--fsid $fsid \
--mon-ip $ip2 \
--keyring /var/lib/ceph/$fsid/mon.a/keyring \
--config c
fi
# mgr.b
bin/ceph -c c -k k auth get-or-create mgr.y \
mon 'allow profile mgr' \
osd 'allow *' \
mds 'allow *' > k-mgr.y
../src/ceph-daemon $A \
--image $image \
deploy --name mgr.y \
--fsid $fsid \
--keyring k-mgr.y \
--config c
# mds.{k,j}
for id in k j; do
bin/ceph -c c -k k auth get-or-create mds.$id \
mon 'allow profile mds' \
mgr 'allow profile mds' \
osd 'allow *' \
mds 'allow *' > k-mds.$id
../src/ceph-daemon $A \
--image $image \
deploy --name mds.$id \
--fsid $fsid \
--keyring k-mds.$id \
--config c
done
bin/ceph -c c -k k -s