Like the other upstart configs, these assume the default value for
'rgw data'. Same pattern as ceph-mon and ceph-mds.
Fixes: #2415
Signed-off-by: Sage Weil <sage@inktank.com>
$(srcdir)/upstart/ceph-mds.conf \
$(srcdir)/upstart/ceph-mds-all.conf \
$(srcdir)/upstart/ceph-mds-all-starter.conf \
+ $(srcdir)/upstart/radosgw.conf \
+ $(srcdir)/upstart/radosgw-all.conf \
+ $(srcdir)/upstart/radosgw-all-starter.conf \
ceph-disk-prepare \
ceph-disk-activate
--- /dev/null
+description "Ceph radosgw (task to start all instances)"
+
+start on starting radosgw-all
+
+task
+
+script
+ set -e
+ # TODO what's the valid charset for cluster names and daemon ids?
+ find /var/lib/ceph/radosgw/ -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/radosgw/$f/done" ]; then
+ cluster="${f%%-*}"
+ id="${f#*-}"
+ initctl emit radosgw cluster="$cluster" id="$id"
+ fi
+ done
+end script
--- /dev/null
+description "Ceph radosgw (all instances)"
--- /dev/null
+description "Ceph radosgw"
+
+start on radosgw
+stop on runlevel [!2345] or stopping radosgw-all
+
+respawn
+respawn limit 5 30
+
+pre-start script
+ set -e
+ test -x /usr/bin/radosgw || { stop; exit 0; }
+ test -d "/var/lib/ceph/radosgw/${cluster:-ceph}-$id" || { stop; exit 0; }
+
+ install -d -m0755 /var/run/ceph
+end script
+
+instance ${cluster:-ceph}/$id
+
+# this breaks oneiric
+#usage "cluster = name of cluster (defaults to 'ceph'); id = mds instance id"
+
+exec /usr/bin/radosgw --cluster="${cluster:-ceph}" -i "$id" -f