summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2012-12-14 13:51:19 -0800
committerSage Weil <sage@inktank.com>2012-12-14 13:51:19 -0800
commitc728171b91ff477466ed11e7f48091a7fa5200f5 (patch)
tree7b3979b19ce65f5ac34ab3a72fc9bc6b1ed39d84
parent6ab7db6717ebb9197203191124d1b4553702c6ba (diff)
parent02aca6830ad07f585317bfafc4780c1b50701cb4 (diff)
downloadceph-c728171b91ff477466ed11e7f48091a7fa5200f5.tar.gz
Merge branch 'wip-upstart' into next
Reviewed-by: Greg Farnum <greg@inktank.com>
-rwxr-xr-xsrc/ceph-disk-activate5
-rw-r--r--src/upstart/ceph-mds-all-starter.conf4
-rw-r--r--src/upstart/ceph-mon-all-starter.conf2
-rw-r--r--src/upstart/ceph-osd-all-starter.conf3
4 files changed, 9 insertions, 5 deletions
diff --git a/src/ceph-disk-activate b/src/ceph-disk-activate
index 5fcc5bd177a..f78ae17ce88 100755
--- a/src/ceph-disk-activate
+++ b/src/ceph-disk-activate
@@ -474,6 +474,11 @@ def activate(
keyring=keyring,
)
+ # indicate this daemon is managed by upstart
+ if not os.path.exists(os.path.join(path, 'upstart')):
+ with file(os.path.join(path, 'upstart'), 'w'):
+ pass
+
if not os.path.exists(os.path.join(path, 'active')):
log.debug('Authorizing OSD key...')
auth_key(
diff --git a/src/upstart/ceph-mds-all-starter.conf b/src/upstart/ceph-mds-all-starter.conf
index fe7e2bd32ad..8e7540331ba 100644
--- a/src/upstart/ceph-mds-all-starter.conf
+++ b/src/upstart/ceph-mds-all-starter.conf
@@ -1,4 +1,4 @@
-description "Ceph MDS (task to start all instances)"
+description "Ceph MDS (start all instances)"
start on starting ceph-mds-all
stop on runlevel [!2345] or stopping ceph-mds-all
@@ -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..616f02ada6e 100644
--- a/src/upstart/ceph-osd-all-starter.conf
+++ b/src/upstart/ceph-osd-all-starter.conf
@@ -10,10 +10,9 @@ 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#*-}"
-
initctl emit ceph-osd cluster="$cluster" id="$id"
fi
done