]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
upstart: only start when 'upstart' file exists in daemon dir
authorSage Weil <sage@inktank.com>
Fri, 14 Dec 2012 21:40:25 +0000 (13:40 -0800)
committerSage Weil <sage@inktank.com>
Fri, 14 Dec 2012 21:49:26 +0000 (13:49 -0800)
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>
src/upstart/ceph-mds-all-starter.conf
src/upstart/ceph-mon-all-starter.conf
src/upstart/ceph-osd-all-starter.conf

index fe7e2bd32ad03a2c04730232a1c85cbfa571ea91..ef24995325e193a174bf50d42d40542a6ea2dfb4 100644 (file)
@@ -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"
index 7101a8acca98f1de1e273868c54a2d8e2d4e15ca..723d41278467b141f6a5f53c14a6f3c7fbc1ec50 100644 (file)
@@ -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#*-}"
 
index c4d74e58442e799a294765365f13e12e04466027..4fd5a2a5125afc8e5efaaf013a15fac7b19b3c53 100644 (file)
@@ -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#*-}"