]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
systemd/ceph-mgr: remove automagic mgr creation hack 16023/head
authorSage Weil <sage@redhat.com>
Thu, 29 Jun 2017 17:39:28 +0000 (13:39 -0400)
committerSage Weil <sage@redhat.com>
Thu, 29 Jun 2017 17:39:28 +0000 (13:39 -0400)
For kraken we auto-created mgr daemons next to mon daemons with some
systemd hackery.  This is awkward (you can't not get a new mgr daemon when
you deploy a mon), systemd-specific (not implemented for upstart on
trusty), and mostly unexpected.  Since ceph-mgr daemons are now first-class
citizens and required for every cluster, make their deployment explicit
and transparent to the administrator.  Major upgrades are a rare
opportunity to have the administrator's full attention so take advantage
of it.

This effectively reverts 61d779345e9efbe9a2e3f215af1f1dcf6630f04a and
082199f69dd0bd4c18a5f4baea67a88782586657 (and follow-on fixes).

Fixes/avoids: http://tracker.ceph.com/issues/19994
Signed-off-by: Sage Weil <sage@redhat.com>
doc/release-notes.rst
systemd/ceph-mgr@.service
systemd/ceph-mon@.service

index 66cfe0330a1830a3d6546cc0e01114ed0ff50b84..8dbf51ceacd7c2998d5f131267315a47d23648a6 100644 (file)
@@ -326,10 +326,10 @@ Upgrade from Jewel or Kraken
 
      # systemctl ceph-mgr.target
 
-   If you are upgrading from jewel, you should have new ceph-mgr daemons
-   automatically appear on the same hosts as the ceph-mon daemons.  If not,
-   you can deploy new daemons with tools like ceph-deploy or ceph-ansible.  For
-   example,::
+   If you are upgrading from kraken, you may already have ceph-mgr
+   daemons deployed.  If not, or if you are upgrading from jewel, you
+   can deploy new daemons with tools like ceph-deploy or ceph-ansible.
+   For example,::
 
      # ceph-deploy mgr create HOST
 
index 421860163133af9bc5b6780f6888df0e1f28b9bc..6614e54f6a5e61255e512c552bb3f69a867015bd 100644 (file)
@@ -1,8 +1,8 @@
 [Unit]
 Description=Ceph cluster manager daemon
-After=network-online.target local-fs.target time-sync.target ceph-mon@%i.service
+After=network-online.target local-fs.target time-sync.target
 Wants=network-online.target local-fs.target time-sync.target
-PartOf=ceph-mgr.target ceph-mon@%i.service
+PartOf=ceph-mgr.target
 
 [Service]
 LimitNOFILE=1048576
@@ -10,18 +10,6 @@ LimitNPROC=1048576
 EnvironmentFile=-/etc/sysconfig/ceph
 Environment=CLUSTER=ceph
 
-# 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.
-# `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"
-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.
-
 ExecStart=/usr/bin/ceph-mgr -f --cluster ${CLUSTER} --id %i --setuser ceph --setgroup ceph
 ExecReload=/bin/kill -HUP $MAINPID
 Restart=on-failure
index 2d139730e60ff14b619f851212c4b90950fef4d0..db4995fb9ca8c5d7b1cbd1f6b8bd5b280c7da00b 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
-Wants=network-online.target local-fs.target time-sync.target ceph-mgr@%i.service
+Wants=network-online.target local-fs.target time-sync.target
 
 PartOf=ceph-mon.target