Starter helper will start all osds that appear in /var/lib/ceph/osd/*,
as we do with the mons and mdss.
This will only proceed if the 'ready' file is there, which is currently
only touched by ceph-disk-activate.
Signed-off-by: Sage Weil <sage@inktank.com>
$(srcdir)/upstart/ceph-create-keys.conf \
$(srcdir)/upstart/ceph-osd.conf \
$(srcdir)/upstart/ceph-osd-all.conf \
+ $(srcdir)/upstart/ceph-osd-all-starter.conf \
$(srcdir)/upstart/ceph-hotplug.conf \
$(srcdir)/upstart/ceph-mds.conf \
$(srcdir)/upstart/ceph-mds-all.conf \
--- /dev/null
+description "Ceph OSD (start all instances)"
+
+start on starting ceph-osd-all
+stop on runlevel [!2345] or stopping ceph-osd-all
+
+task
+
+script
+ set -e
+ # TODO what's the valid charset for cluster names and osd ids?
+ find /var/lib/ceph/osd/ -mindepth 1 -maxdepth 1 -regextype posix-egrep -regex '.*/[a-z0-9]+-[a-z0-9._-]+' -printf '%P\n' \
+ | while read f; do
+ if [ -e "/var/lib/ceph/osd/$f/ready" ]; then
+ cluster="${f%%-*}"
+ id="${f#*-}"
+
+ initctl emit ceph-osd cluster="$cluster" id="$id"
+ fi
+ done
+end script