Skip to content

Commit

Permalink
systemd: encourage ceph-mgr to start in sync with ceph-mon
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
tserong authored and John Spray committed Sep 29, 2016
1 parent 2e9e21e commit 61d7793
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions systemd/ceph-mgr@.service
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion systemd/ceph-mon@.service
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 61d7793

Please sign in to comment.