From 917f0bef81b4844582e0a1b2f45ea4930e0afe4b Mon Sep 17 00:00:00 2001 From: Jens Harbott Date: Thu, 18 Oct 2018 12:50:36 +0000 Subject: [PATCH] Support Ubuntu Bionic LTS release Ubuntu Bionic has Ceph Luminous packages available natively, so we don't need to set up any additional repositories. Add a delay after starting ceph-mon in order to allow it to run properly. Change-Id: I2c40c4b4e49145d679affaba678f7117ce73a1d1 --- devstack/lib/ceph | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/devstack/lib/ceph b/devstack/lib/ceph index 604728c..a889214 100644 --- a/devstack/lib/ceph +++ b/devstack/lib/ceph @@ -214,6 +214,8 @@ function _get_ceph_version { ceph_version_str=$(sudo ceph --version | cut -d ' ' -f 3 | \ cut -d '.' -f 1,2) elif [[ $1 == 'mon' ]]; then + # TODO(frickler): Find a better way to make sure that ceph-mon has started + sleep 5 ceph_version_str=$(sudo ceph daemon mon.$(hostname) version | \ cut -d '"' -f 4 | cut -f 1,2 -d '.') else @@ -274,7 +276,7 @@ function check_os_support_ceph { return fi - if [[ ! ${DISTRO} =~ (trusty|xenial|jessie|sid|rhel7) ]]; then + if [[ ! ${DISTRO} =~ (bionic|trusty|xenial|jessie|sid|rhel7) ]]; then echo "WARNING: your distro $DISTRO does not provide \ (at least) the Firefly release. \ Please use Ubuntu Trusty or Fedora 27 (and higher)" @@ -410,6 +412,8 @@ function configure_ceph { elif [[ $INIT_SYSTEM == 'systemd' ]]; then sudo systemctl enable ceph-mon@$(hostname) sudo systemctl start ceph-mon@$(hostname) + # TODO(frickler): Find a better way to make sure that ceph-mon has started + sleep 5 else sudo touch ${CEPH_DATA_DIR}/mon/ceph-$(hostname)/sysvinit sudo service ceph start mon.$(hostname) @@ -935,6 +939,10 @@ function install_ceph { CEPH_PACKAGES="${CEPH_PACKAGES} ceph-mds libcephfs1" fi + elif [[ $os_CODENAME =~ bionic ]]; then + # Ceph Luminous is available in Ubuntu bionic natively, no need to set up + # any additional repos + true elif [ -f "$APT_REPOSITORY_FILE" ]; then # Opt into Openstack CI provided package repo mirror if [ -f "/etc/apt/sources.list.d/$(basename $APT_REPOSITORY_FILE)" ] ; then