aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-03-09 17:11:59 +0000
committerGerrit Code Review <review@openstack.org>2016-03-09 17:11:59 +0000
commit5868a13da8a87a1f629455e27c460a1b87741f9e (patch)
tree17d2f3f0af5afcff0f38b6d61623cda5870b137e
parent6423b4c5750c7100bfd09d8a435194716cb56761 (diff)
parent3b65e4993076d7000c57b55aaa26cc11173c2238 (diff)
downloadkolla-5868a13da8a87a1f629455e27c460a1b87741f9e.tar.gz
kolla-5868a13da8a87a1f629455e27c460a1b87741f9e.zip
Merge "Add ceph wait before bootstrap"
-rw-r--r--docker/ceph/ceph-osd/extend_start.sh16
1 files changed, 14 insertions, 2 deletions
diff --git a/docker/ceph/ceph-osd/extend_start.sh b/docker/ceph/ceph-osd/extend_start.sh
index 94736c8a8..202aad186 100644
--- a/docker/ceph/ceph-osd/extend_start.sh
+++ b/docker/ceph/ceph-osd/extend_start.sh
@@ -3,6 +3,9 @@
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
# of the KOLLA_BOOTSTRAP variable being set, including empty.
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
+ # Wait for ceph quorum before proceeding
+ ceph quorum_status
+
# Formatting disk for ceph
sgdisk --zap-all -- "${OSD_DEV}"
sgdisk --new=2:1M:5G --change-name=2:KOLLA_CEPH_JOURNAL --typecode=2:45B0969E-9B03-4F30-B4C6-B4B80CEFF106 --mbrtogpt -- "${OSD_DEV}"
@@ -10,8 +13,17 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
# This command may throw errors that we can safely ignore
partprobe || true
- # We look up the appropriate device path with partition.
- OSD_PARTITION=$(ls "${OSD_DEV}"* | egrep "${OSD_DEV}p?1")
+ count=0
+ while [[ "${OSD_PARTITION}x" == "x" ]]; do
+ if [[ "${count}" -gt 5 ]]; then
+ echo "Could not find OSD Partition"
+ exit 1
+ fi
+ sleep 1
+ # We look up the appropriate device path with partition.
+ OSD_PARTITION=$(ls "${OSD_DEV}"* | egrep "${OSD_DEV}p?1")
+ count=$(( count + 1 ))
+ done
JOURNAL_PARTITION="${OSD_PARTITION%?}2"
OSD_ID=$(ceph osd create)