openstack-helm/ceph/templates/bin/_osd_activate_journal.sh.tpl
Larry Rensing 98d436eb94 Add ceph entrypoint scripts
This moves the set of ceph entrypoint scripts into the helm chart
this allows us to control how the different pods start.  Also gives
each script the +x flag to give better insight as to the execution of
entrypoint scripts.

Change-Id: Ib78b8a5d57f653bdb399a1980b34ab5ea25f94cc
2017-07-14 15:20:20 +00:00

21 lines
476 B
Smarty

#!/bin/bash
set -ex
function osd_activate_journal {
if [[ -z "${OSD_JOURNAL}" ]];then
log "ERROR- You must provide a device to build your OSD journal ie: /dev/sdb2"
exit 1
fi
# watch the udev event queue, and exit if all current events are handled
udevadm settle --timeout=600
# wait till partition exists
wait_for ${OSD_JOURNAL}
chown ceph. ${OSD_JOURNAL}
ceph-disk -v --setuser ceph --setgroup disk activate-journal ${OSD_JOURNAL}
start_osd
}