aboutsummaryrefslogtreecommitdiff
path: root/docker/ceph
diff options
context:
space:
mode:
authorweiyu <weiyu@unitedstack.com>2016-01-28 12:16:21 +0800
committerweiyu <weiyu@unitedstack.com>2016-01-28 12:37:17 +0800
commit6a38a9fe755672057f0ec474608218a0e41dfcbc (patch)
treec117e1d13908dcef07f9383a37bf8b73453707a8 /docker/ceph
parent2361fddcffbae32fa681db1b2de4530bb65cd0e5 (diff)
downloadkolla-6a38a9fe755672057f0ec474608218a0e41dfcbc.tar.gz
kolla-6a38a9fe755672057f0ec474608218a0e41dfcbc.zip
reset $(hostname) to $(hostname -s) in ceph extend_start.sh
$(hostname) is Ceph Monitor name in extend_start.sh, {{ ansibe_hostanme }} is Ceph Monitor name in ceph.conf. $(hostname) not always equal to ansible_hostname , that makes ceph_mon container can't start. Closes-Bug: #1538870 Change-Id: I312bf8d74c855aa4c72f12285e3092df96f60048
Diffstat (limited to 'docker/ceph')
-rw-r--r--docker/ceph/ceph-mon/extend_start.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/docker/ceph/ceph-mon/extend_start.sh b/docker/ceph/ceph-mon/extend_start.sh
index fd17de511..fe8222897 100644
--- a/docker/ceph/ceph-mon/extend_start.sh
+++ b/docker/ceph/ceph-mon/extend_start.sh
@@ -5,7 +5,7 @@ KEYRING_ADMIN="/etc/ceph/ceph.client.admin.keyring"
KEYRING_MON="/etc/ceph/ceph.client.mon.keyring"
KEYRING_RGW="/etc/ceph/ceph.client.radosgw.keyring"
MONMAP="/etc/ceph/ceph.monmap"
-MON_DIR="/var/lib/ceph/mon/ceph-$(hostname)"
+MON_DIR="/var/lib/ceph/mon/ceph-$(hostname -s)"
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
# of the KOLLA_BOOTSTRAP variable being set, including empty.
@@ -19,7 +19,7 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
ceph-authtool --create-keyring "${KEYRING_RGW}" --gen-key -n client.radosgw.gateway --set-uid=0 --cap osd 'allow rwx' --cap mon 'allow rwx'
ceph-authtool "${KEYRING_MON}" --import-keyring "${KEYRING_ADMIN}"
ceph-authtool "${KEYRING_MON}" --import-keyring "${KEYRING_RGW}"
- monmaptool --create --add "$(hostname)" "${MON_IP}" --fsid "${FSID}" "${MONMAP}"
+ monmaptool --create --add "$(hostname -s)" "${MON_IP}" --fsid "${FSID}" "${MONMAP}"
exit 0
fi
@@ -32,6 +32,6 @@ if [[ ! -e "${MON_DIR}/keyring" ]]; then
ceph-authtool --create-keyring "${KEYRING_TMP}" --import-keyring "${KEYRING_ADMIN}"
ceph-authtool "${KEYRING_TMP}" --import-keyring "${KEYRING_MON}"
mkdir -p "${MON_DIR}"
- ceph-mon --mkfs -i "$(hostname)" --monmap "${MONMAP}" --keyring "${KEYRING_TMP}"
+ ceph-mon --mkfs -i "$(hostname -s)" --monmap "${MONMAP}" --keyring "${KEYRING_TMP}"
rm "${KEYRING_TMP}"
fi