2016-09-07 05:39:58 +00:00
|
|
|
[Unit]
|
|
|
|
Description=Ceph cluster manager daemon
|
2016-09-20 12:32:58 +00:00
|
|
|
After=network-online.target local-fs.target time-sync.target ceph-mon@%i.service
|
2016-09-07 05:39:58 +00:00
|
|
|
Wants=network-online.target local-fs.target time-sync.target
|
2016-09-20 12:32:58 +00:00
|
|
|
PartOf=ceph-mgr.target ceph-mon@%i.service
|
2016-09-07 05:39:58 +00:00
|
|
|
|
|
|
|
[Service]
|
|
|
|
LimitNOFILE=1048576
|
|
|
|
LimitNPROC=1048576
|
|
|
|
EnvironmentFile=-/etc/sysconfig/ceph
|
|
|
|
Environment=CLUSTER=ceph
|
2017-03-14 02:37:29 +00:00
|
|
|
|
2016-09-20 13:55:32 +00:00
|
|
|
# This ExecStartPre business is a hack to inject a key for the mgr daemon,
|
|
|
|
# using whatever key already exists on the mon on this node to gain sufficient
|
|
|
|
# permissions to create the mgr key. Failure is ignored at every step (the
|
|
|
|
# '-' prefix) in case someone has already used some other trick to set
|
|
|
|
# everything up manually.
|
2016-12-18 12:54:13 +00:00
|
|
|
# `sh -c "exec ..."` is required, since different Linux ditributives have different rules on absolute paths of that executables.
|
|
|
|
# systemd requires to use absoulte paths.
|
|
|
|
ExecStartPre=-/bin/sh -c "exec mkdir -p /var/lib/ceph/mgr/${CLUSTER}-%i"
|
|
|
|
ExecStartPre=-/bin/sh -c "[ -f /var/lib/ceph/mgr/${CLUSTER}-%i/keyring ] || /usr/bin/ceph-authtool --create-keyring --gen-key --name=mgr.%i /var/lib/ceph/mgr/${CLUSTER}-%i/keyring"
|
|
|
|
ExecStartPre=-/bin/sh -c "exec chown -R ceph.ceph /var/lib/ceph/mgr/${CLUSTER}-%i"
|
2017-04-21 11:20:59 +00:00
|
|
|
ExecStartPre=-/usr/bin/ceph -i /var/lib/ceph/mgr/${CLUSTER}-%i/keyring auth add mgr.%i mon 'allow profile mgr' osd 'allow *' mds 'allow *' --keyring=/var/lib/ceph/mon/${CLUSTER}-%i/keyring --name=mon.
|
2017-03-14 02:37:29 +00:00
|
|
|
|
2016-09-07 05:39:58 +00:00
|
|
|
ExecStart=/usr/bin/ceph-mgr -f --cluster ${CLUSTER} --id %i --setuser ceph --setgroup ceph
|
|
|
|
ExecReload=/bin/kill -HUP $MAINPID
|
|
|
|
Restart=on-failure
|
|
|
|
StartLimitInterval=30min
|
|
|
|
StartLimitBurst=3
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=ceph-mgr.target
|