]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
init, upstart: prevent daemons being started by both
authorJosh Durgin <josh.durgin@inktank.com>
Mon, 25 Nov 2013 21:43:43 +0000 (13:43 -0800)
committerJosh Durgin <josh.durgin@inktank.com>
Wed, 4 Dec 2013 00:33:23 +0000 (16:33 -0800)
commitc2e467b42dfaecf082a3838b10e873f9f8bd5633
tree8759d39c951bb1001a6f7e1063ee7ef996e96092
parent8812c4e958b154ca401c7257fd48ccaffe013639
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>
(cherry picked from commit 5e34beb61b3f5a1ed4afd8ee2fe976de40f95ace)
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