diff options
author | Sage Weil <sage@inktank.com> | 2012-06-12 13:39:57 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2012-06-13 09:22:19 -0700 |
commit | 282277dece0bac88e086bc994bbb60f690f4b0dc (patch) | |
tree | 766799c70ecc9bbc8f0ab9921063862ba61d52b6 /src/upstart | |
parent | 6e551f7341aebfda30ec33b300f7b85242549410 (diff) | |
download | ceph-282277dece0bac88e086bc994bbb60f690f4b0dc.tar.gz |
radosgw: upstart support
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>
Diffstat (limited to 'src/upstart')
-rw-r--r-- | src/upstart/radosgw-all-starter.conf | 18 | ||||
-rw-r--r-- | src/upstart/radosgw-all.conf | 1 | ||||
-rw-r--r-- | src/upstart/radosgw.conf | 22 |
3 files changed, 41 insertions, 0 deletions
diff --git a/src/upstart/radosgw-all-starter.conf b/src/upstart/radosgw-all-starter.conf new file mode 100644 index 00000000000..ef7d23a8316 --- /dev/null +++ b/src/upstart/radosgw-all-starter.conf @@ -0,0 +1,18 @@ +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 diff --git a/src/upstart/radosgw-all.conf b/src/upstart/radosgw-all.conf new file mode 100644 index 00000000000..b5966d3d3dd --- /dev/null +++ b/src/upstart/radosgw-all.conf @@ -0,0 +1 @@ +description "Ceph radosgw (all instances)" diff --git a/src/upstart/radosgw.conf b/src/upstart/radosgw.conf new file mode 100644 index 00000000000..3446cf297d5 --- /dev/null +++ b/src/upstart/radosgw.conf @@ -0,0 +1,22 @@ +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 |