aboutsummaryrefslogtreecommitdiff
path: root/docker/ceph
diff options
context:
space:
mode:
authorMark Goddard <mark@stackhpc.com>2019-05-09 11:47:33 +0100
committerMarcin Juszkiewicz <marcin.juszkiewicz@linaro.org>2019-05-31 18:16:57 +0000
commite0cae62c4aab001fa7b5cc324f178793f4e88f3c (patch)
treef398a5b5fc7b1e0351a7480459f3d73dc5226243 /docker/ceph
parent3e9cf08ac59c6b38b1542ac12e19ff44af92eb12 (diff)
downloadkolla-e0cae62c4aab001fa7b5cc324f178793f4e88f3c.tar.gz
kolla-e0cae62c4aab001fa7b5cc324f178793f4e88f3c.zip
Ceph: Update to Nautilus on CentOS and OracleLinux
The CentOS Stein OpenStack distribution depends on the Ceph Nautilus release, while Kolla currently deploys Luminous on CentOS. This change switches CentOS and OracleLinux builds to use Ceph Nautilus. Support for auth UID has been removed in the Nautilus release [1][2], so we have removed the --set-uid argument from calls to ceph-authtool. Also ceph-osd bootstrap mode fails when no mon config is provided, so we added --no-mon-config (mon config is injected later after bootstrap). Due to ceph-nfs build issues (ceph upstream nfs-ganesha rpms relied on older version of userspace-rcu, than CentOS Storage SIG packages) we need to move to ceph upstream rpm repos. [1] https://github.com/ceph/ceph/commit/d6def8ba1126209f8dcb40e296977dc2b09a376e [2] http://docs.ceph.com/docs/master/releases/nautilus/ Co-Authored-By: Michal Nasiadka <michal.nasiadka@nokia.com> Change-Id: I000398f587c5f4d6cc8995e34e162eebc77bc3e3 Implements: blueprint centos-ceph-nautilus
Diffstat (limited to 'docker/ceph')
-rw-r--r--docker/ceph/ceph-base/Dockerfile.j23
-rw-r--r--docker/ceph/ceph-mon/extend_start.sh4
-rw-r--r--docker/ceph/ceph-osd/extend_start.sh23
3 files changed, 25 insertions, 5 deletions
diff --git a/docker/ceph/ceph-base/Dockerfile.j2 b/docker/ceph/ceph-base/Dockerfile.j2
index 4aeaca4e4..c3027a031 100644
--- a/docker/ceph/ceph-base/Dockerfile.j2
+++ b/docker/ceph/ceph-base/Dockerfile.j2
@@ -12,10 +12,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
{% set ceph_base_packages = [
'btrfs-progs',
'ceph',
+ 'ceph-mgr-dashboard',
'ceph-radosgw',
'e2fsprogs',
+ 'gdisk',
'hdparm',
'parted',
+ 'smartmontools',
'xfsprogs'
] %}
diff --git a/docker/ceph/ceph-mon/extend_start.sh b/docker/ceph/ceph-mon/extend_start.sh
index 4c3e91b31..af60faa17 100644
--- a/docker/ceph/ceph-mon/extend_start.sh
+++ b/docker/ceph/ceph-mon/extend_start.sh
@@ -22,8 +22,8 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
# Generating initial keyrings and monmap
ceph-authtool --create-keyring "${KEYRING_MON}" --gen-key -n mon. --cap mon 'allow *'
- ceph-authtool --create-keyring "${KEYRING_ADMIN}" --gen-key -n client.admin --set-uid=0 --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow' --cap mgr 'allow *'
- 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 --create-keyring "${KEYRING_ADMIN}" --gen-key -n client.admin --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow' --cap mgr 'allow *'
+ ceph-authtool --create-keyring "${KEYRING_RGW}" --gen-key -n client.radosgw.gateway --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}"
diff --git a/docker/ceph/ceph-osd/extend_start.sh b/docker/ceph/ceph-osd/extend_start.sh
index 68c0a28d6..c6cd4535c 100644
--- a/docker/ceph/ceph-osd/extend_start.sh
+++ b/docker/ceph/ceph-osd/extend_start.sh
@@ -83,8 +83,14 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
# This will through an error about no key existing. That is normal. It then
# creates the key in the next step.
- ceph-osd -i "${OSD_ID}" --mkkey
echo "bluestore" > "${OSD_DIR}"/type
+
+ if [[ "$(ceph --version)" =~ (luminous|mimic) ]]; then
+ ceph-osd -i "${OSD_ID}" --mkkey
+ else
+ ceph-osd -i "${OSD_ID}" --mkkey --no-mon-config
+ fi
+
if [ -n "${OSD_BS_BLK_DEV}" ] && [ "${OSD_BS_BLK_DEV}" != "${OSD_BS_DEV}" ] && [ -n "${OSD_BS_BLK_PARTNUM}" ]; then
sgdisk "--change-name="${OSD_BS_BLK_PARTNUM}":KOLLA_CEPH_DATA_BS_${OSD_ID}_B" "--typecode="${OSD_BS_BLK_PARTNUM}":${CEPH_OSD_TYPE_CODE}" -- "${OSD_BS_BLK_DEV}"
else
@@ -111,8 +117,14 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
ln -sf /dev/disk/by-partlabel/KOLLA_CEPH_DATA_BS_"${OSD_ID}"_D "${OSD_DIR}"/block.db
fi
- ceph-osd -i "${OSD_ID}" --mkfs -k "${OSD_DIR}"/keyring --osd-uuid "${OSD_UUID}"
+ if [[ "$(ceph --version)" =~ (luminous|mimic) ]]; then
+ ceph-osd -i "${OSD_ID}" --mkfs -k "${OSD_DIR}"/keyring --osd-uuid "${OSD_UUID}"
+ else
+ ceph-osd -i "${OSD_ID}" --mkfs -k "${OSD_DIR}"/keyring --osd-uuid "${OSD_UUID}" --no-mon-config
+ fi
+
ceph auth add "osd.${OSD_ID}" osd 'allow *' mon 'allow profile osd' -i "${OSD_DIR}/keyring"
+
if [[ "${OSD_BS_DEV}" =~ "/dev/loop" ]]; then
umount "${OSD_BS_DEV}""p${OSD_BS_PARTNUM}"
else
@@ -134,7 +146,12 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
# This will through an error about no key existing. That is normal. It then
# creates the key in the next step.
- ceph-osd -i "${OSD_ID}" --mkfs --osd-journal="${JOURNAL_PARTITION}" --mkkey
+ if [[ "$(ceph --version)" =~ (luminous|mimic) ]]; then
+ ceph-osd -i "${OSD_ID}" --mkfs --osd-journal="${JOURNAL_PARTITION}" --mkkey
+ else
+ ceph-osd -i "${OSD_ID}" --mkfs --osd-journal="${JOURNAL_PARTITION}" --mkkey --no-mon-config
+ fi
+
ceph auth add "osd.${OSD_ID}" osd 'allow *' mon 'allow profile osd' -i "${OSD_DIR}/keyring"
umount "${OSD_PARTITION}"
fi