test/ceph : Update script to fix some issues.
1. Remove created dir name with "/". 2. Compatible with upper version of ceph-authtool without --set-uid, let it run as default. 3. Fix error on ceph 12.*.* This is to fix issue #980 which blocks by ceph-authtool. If there's still other issue, should append fix. Change-Id: Icd7fb4177a75a731ae3d4d5fc51cef16eeab282f Signed-off-by: yidong0635 <dongx.yi@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470915 Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com> Reviewed-by: Karol Latecki <karol.latecki@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
1c2291bab9
commit
912ddafe94
@ -8,7 +8,7 @@ script_dir=$(readlink -f $(dirname $0))
|
|||||||
|
|
||||||
base_dir=/var/tmp/ceph
|
base_dir=/var/tmp/ceph
|
||||||
mon_ip=$1
|
mon_ip=$1
|
||||||
mon_dir=${base_dir}/mon.a/
|
mon_dir=${base_dir}/mon.a
|
||||||
pid_dir=${base_dir}/pid
|
pid_dir=${base_dir}/pid
|
||||||
ceph_conf=${base_dir}/ceph.conf
|
ceph_conf=${base_dir}/ceph.conf
|
||||||
mnt_dir=${base_dir}/mnt
|
mnt_dir=${base_dir}/mnt
|
||||||
@ -51,7 +51,7 @@ kpartx ${dev}
|
|||||||
|
|
||||||
# prep osds
|
# prep osds
|
||||||
|
|
||||||
mnt_pt=${mnt_dir}/osd-device-0-data/
|
mnt_pt=${mnt_dir}/osd-device-0-data
|
||||||
mkdir -p ${mnt_pt}
|
mkdir -p ${mnt_pt}
|
||||||
mkfs.xfs -f /dev/disk/by-partlabel/osd-device-0-data
|
mkfs.xfs -f /dev/disk/by-partlabel/osd-device-0-data
|
||||||
mount /dev/disk/by-partlabel/osd-device-0-data ${mnt_pt}
|
mount /dev/disk/by-partlabel/osd-device-0-data ${mnt_pt}
|
||||||
@ -68,7 +68,7 @@ mkdir -p ${mon_dir}
|
|||||||
mkdir -p ${pid_dir}
|
mkdir -p ${pid_dir}
|
||||||
|
|
||||||
ceph-authtool --create-keyring --gen-key --name=mon. ${base_dir}/keyring --cap mon 'allow *'
|
ceph-authtool --create-keyring --gen-key --name=mon. ${base_dir}/keyring --cap mon 'allow *'
|
||||||
ceph-authtool --gen-key --name=client.admin --set-uid=0 --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow *' --cap mgr 'allow *' ${base_dir}/keyring
|
ceph-authtool --gen-key --name=client.admin --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow *' --cap mgr 'allow *' ${base_dir}/keyring
|
||||||
|
|
||||||
monmaptool --create --clobber --add a ${mon_ip}:12046 --print ${base_dir}/monmap
|
monmaptool --create --clobber --add a ${mon_ip}:12046 --print ${base_dir}/monmap
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user