diff options
author | Sage Weil <sage@inktank.com> | 2012-12-14 13:40:25 -0800 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2012-12-14 13:49:26 -0800 |
commit | e597482f2941ec80e3159610fc84a674701b48fd (patch) | |
tree | 8f619eec36ffc6fd8f57949969119b82cd8fafbd | |
parent | b63940caa11cdf549962ca4eae404c55f7784eac (diff) | |
download | ceph-e597482f2941ec80e3159610fc84a674701b48fd.tar.gz |
upstart: only start when 'upstart' file exists in daemon dir
We need to distinguish between daemons managed by upstart and sysvinit
(and, eventually, systemd). Only start daemons when 'upstart' is present.
Note that sysvinit will only start daemons when the 'host = ...' line is
in ceph.conf, so there is a similar "opt-in".
Signed-off-by: Sage Weil <sage@inktank.com>
-rw-r--r-- | src/upstart/ceph-mds-all-starter.conf | 2 | ||||
-rw-r--r-- | src/upstart/ceph-mon-all-starter.conf | 2 | ||||
-rw-r--r-- | src/upstart/ceph-osd-all-starter.conf | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/upstart/ceph-mds-all-starter.conf b/src/upstart/ceph-mds-all-starter.conf index fe7e2bd32ad..ef24995325e 100644 --- a/src/upstart/ceph-mds-all-starter.conf +++ b/src/upstart/ceph-mds-all-starter.conf @@ -10,7 +10,7 @@ script # TODO what's the valid charset for cluster names and mds ids? find /var/lib/ceph/mds/ -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/mds/$f/done" ]; then + if [ -e "/var/lib/ceph/mds/$f/done" ] && [ -e "/var/lib/ceph/mds/$f/upstart" ]; then cluster="${f%%-*}" id="${f#*-}" initctl emit ceph-mds cluster="$cluster" id="$id" diff --git a/src/upstart/ceph-mon-all-starter.conf b/src/upstart/ceph-mon-all-starter.conf index 7101a8acca9..723d4127846 100644 --- a/src/upstart/ceph-mon-all-starter.conf +++ b/src/upstart/ceph-mon-all-starter.conf @@ -10,7 +10,7 @@ script # TODO what's the valid charset for cluster names and mon ids? find /var/lib/ceph/mon/ -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/mon/$f/done" ]; then + if [ -e "/var/lib/ceph/mon/$f/done" ] && [ -e "/var/lib/ceph/mon/$f/upstart" ]; then cluster="${f%%-*}" id="${f#*-}" diff --git a/src/upstart/ceph-osd-all-starter.conf b/src/upstart/ceph-osd-all-starter.conf index c4d74e58442..4fd5a2a5125 100644 --- a/src/upstart/ceph-osd-all-starter.conf +++ b/src/upstart/ceph-osd-all-starter.conf @@ -10,7 +10,7 @@ script # 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 + if [ -e "/var/lib/ceph/osd/$f/ready" ] && [ -e "/var/lib/ceph/osd/$f/upstart" ]; then cluster="${f%%-*}" id="${f#*-}" |