]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
systemd: encourage ceph-mgr to start in sync with ceph-mon
authorTim Serong <tserong@suse.com>
Tue, 20 Sep 2016 12:32:58 +0000 (22:32 +1000)
committerJohn Spray <john.spray@redhat.com>
Thu, 29 Sep 2016 16:27:08 +0000 (17:27 +0100)
This change introduces the following behaviour:

- When ceph-mon starts, it will try to start ceph-mgr with the same
  instance id (Wants=), but will *not* fail to start if ceph-mgr
  doesn't start (i.e. the mon still works as it always did).
- ceph-mgr will start After= ceph-mon, and will stop and start when
  ceph-mon stops and starts, because it's PartOf= ceph-mon.

If you don't want ceph-mgr to run on the mons, you need to mask the
service, i.e. `systemctl mask ceph-mgr@INSTANCE`.  Hostnames are
typically instance names, so `systemctl mask ceph-mgr@$(hostname)`
should suffice if you wish to disable ceph-mgr on the mons.

Signed-off-by: Tim Serong <tserong@suse.com>
systemd/ceph-mgr@.service
systemd/ceph-mon@.service

index 669f47d9290b3c60383a21590a6185af704d2601..7a4e06862f4e55fbde5706081118dae21edfa300 100644 (file)
@@ -1,8 +1,8 @@
 [Unit]
 Description=Ceph cluster manager daemon
-After=network-online.target local-fs.target time-sync.target
+After=network-online.target local-fs.target time-sync.target ceph-mon@%i.service
 Wants=network-online.target local-fs.target time-sync.target
-PartOf=ceph-mgr.target
+PartOf=ceph-mgr.target ceph-mon@%i.service
 
 [Service]
 LimitNOFILE=1048576
index 15e2bf7c8b665e8cea24bef2f2d141413a4c0d5b..ada78bb838a7b1a80304d466703f8937f3ad0c68 100644 (file)
@@ -6,7 +6,7 @@ Description=Ceph cluster monitor daemon
 # these can be removed once ceph-mon will dynamically change network
 # configuration.
 After=network-online.target local-fs.target time-sync.target ceph-create-keys@%i.service
-Wants=network-online.target local-fs.target time-sync.target ceph-create-keys@%i.service
+Wants=network-online.target local-fs.target time-sync.target ceph-create-keys@%i.service ceph-mgr@%i.service
 
 PartOf=ceph-mon.target