]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
init, upstart: prevent daemons being started by both 893/head
authorJosh Durgin <josh.durgin@inktank.com>
Mon, 25 Nov 2013 21:43:43 +0000 (13:43 -0800)
committerJosh Durgin <josh.durgin@inktank.com>
Tue, 3 Dec 2013 23:28:05 +0000 (15:28 -0800)
commit5e34beb61b3f5a1ed4afd8ee2fe976de40f95ace
tree24d01132295ae53aacd58c96d67d9a820775052b
parent031b9ed5daee43ecac2ef8f511941b90efd3bf65
init, upstart: prevent daemons being started by both

There can be only one init system starting a daemon. If there is a
host entry in ceph.conf for a daemon, sysvinit would try to start it
even if the daemon's directory did not include a sysvinit file. This
preserves backwards compatibility with older installs using sysvinit,
but if an upstart file is present in the daemon's directory, upstart
will try to start them, regardless of host entries in ceph.conf.

If there's an upstart file in a daemon's directory and a host entry
for that daemon in ceph.conf, both sysvinit and upstart would attempt
to manage it.

Fix this by only starting daemons if the marker file for the other
init system is not present. This maintains backwards compatibility
with older installs using neither sysvinit or upstart marker files,
and does not break any valid configurations. The only configuration
that would break is one with both sysvinit and upstart files present
for the same daemon.

Backport: emperor, dumpling
Reported-by: Tim Spriggs <tims@uahirise.org>
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
src/ceph_common.sh
src/upstart/ceph-mds-all-starter.conf
src/upstart/ceph-mon-all-starter.conf
src/upstart/ceph-osd-all-starter.conf