Skip to content

Commit

Permalink
demo: add osd to crush
Browse files Browse the repository at this point in the history
In jewel version and earlier we need to add the OSD to the crush
hierarchy manually, newer versions do that on startup.

Same for Kraken.

Signed-off-by: Sébastien Han <seb@redhat.com>
  • Loading branch information
leseb committed May 2, 2018
1 parent 9b5ac0a commit cd6fb09
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/daemon/demo.sh
Expand Up @@ -49,7 +49,7 @@ function bootstrap_osd {
if ! grep -qE "osd data = $OSD_PATH" /etc/ceph/"${CLUSTER}".conf; then
echo "osd data = $OSD_PATH" >> /etc/ceph/"${CLUSTER}".conf
fi
if [[ "$CEPH_VERSION" != "jewel" ]]; then
if [[ "$CEPH_VERSION" != "jewel" && "$CEPH_VERSION" != "kraken" ]]; then
CEPH_DISK_CLI_OPTS=(--bluestore)
fi
# bootstrap OSD
Expand All @@ -64,6 +64,9 @@ function bootstrap_osd {
# start OSD
chown --verbose -R ceph. "$OSD_PATH"
ceph-osd "${DAEMON_OPTS[@]}" -i 0
if [[ "$CEPH_VERSION" == "jewel" || "$CEPH_VERSION" == "kraken" ]]; then
ceph "${CLI_OPTS[@]}" osd crush add 0 1 root=default host="$(uname -n)"
fi
}


Expand Down Expand Up @@ -219,7 +222,7 @@ function build_bootstrap {
# this is will prevent someone writing daemons in the wrong order
# once both mon and mgr are up we don't care about the order
bootstrap_mon
if [[ "$CEPH_VERSION" != "jewel" ]]; then
if [[ "$CEPH_VERSION" != "jewel" && "$CEPH_VERSION" != "kraken" ]]; then
bootstrap_mgr
fi

Expand Down

0 comments on commit cd6fb09

Please sign in to comment.