diff options
author | Sage Weil <sage@inktank.com> | 2012-11-16 16:37:14 -0800 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2012-11-16 17:28:14 -0800 |
commit | b4a769df32ef98650c4c168eb4a9a139a6951ebb (patch) | |
tree | a78066f6e3611b20ddfd170303f72e5c3b8409d3 | |
parent | ff0a44bb81708ba704c2d43e61d84332f9658211 (diff) | |
download | ceph-b4a769df32ef98650c4c168eb4a9a139a6951ebb.tar.gz |
upstart: add ceph-osd-all-starter.conf
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>
-rw-r--r-- | src/Makefile.am | 1 | ||||
-rw-r--r-- | src/upstart/ceph-osd-all-starter.conf | 20 |
2 files changed, 21 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index cfb1140783e..0c85b8e3d34 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1074,6 +1074,7 @@ EXTRA_DIST += \ $(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 \ diff --git a/src/upstart/ceph-osd-all-starter.conf b/src/upstart/ceph-osd-all-starter.conf new file mode 100644 index 00000000000..c4d74e58442 --- /dev/null +++ b/src/upstart/ceph-osd-all-starter.conf @@ -0,0 +1,20 @@ +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 |