]> git-server-git.apps.pok.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)
committerSage Weil <sage@inktank.com>
Wed, 4 Dec 2013 05:41:35 +0000 (21:41 -0800)
commit9875c8b1992c59cc0c40901a44573676cdff2669
tree7023244235fee5f87f961e418dcb90ec838a872b
parentbd08d332f5d23b6097a7e8344a6183896b2303a9
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