ceph/ceph — pull request #893 by jdurgin (2013-12-04 00:16:15+00:00)
Title: 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
Signed-off-by: Josh Durgin