ceph/systemd
Wong Hoi Sing Edison d88c834ea4
systemd: Support Graceful Reboot for AIO Node
Ceph AIO installation with single/multiple node is not friendly for
loopback mount, especially always get deadlock issue during graceful
system reboot.

We already have `rbdmap.service` with graceful system reboot friendly as
below:

    [Unit]
    After=network-online.target
    Before=remote-fs-pre.target
    Wants=network-online.target remote-fs-pre.target

    [Service]
    ExecStart=/usr/bin/rbdmap map
    ExecReload=/usr/bin/rbdmap map
    ExecStop=/usr/bin/rbdmap unmap-all

This PR introduce:

  - `ceph-mon.target`: Ensure startup after `network-online.target` and
    before `remote-fs-pre.target`
  - `ceph-*.target`: Ensure startup after `ceph-mon.target` and before
    `remote-fs-pre.target`
  - `rbdmap.service`: Once all `_netdev` get unmount by
    `remote-fs.target`, ensure unmap all RBD BEFORE any Ceph components
    under `ceph.target` get stopped during shutdown

The logic is concept proof by
<https://github.com/alvistack/ansible-role-ceph_common/tree/develop>;
also works as expected with Ceph + Kubernetes deployment by
<https://github.com/alvistack/ansible-collection-kubernetes/tree/develop>.
No more deadlock happened during graceful system reboot, both AIO
single/multiple no de with loopback mount.

Also see:

  - <https://github.com/ceph/ceph/pull/36776>
  - <https://github.com/etcd-io/etcd/pull/12259>
  - <https://github.com/cri-o/cri-o/pull/4128>
  - <https://github.com/kubernetes/release/pull/1504>

Fixes: https://tracker.ceph.com/issues/47528
Signed-off-by: Wong Hoi Sing Edison <hswong3i@gmail.com>
2020-09-18 11:02:26 +08:00
..
50-ceph.preset systemd: enable ceph-rbd-mirror.target 2018-11-05 18:58:43 +01:00
ceph-crash.service.in add ceph-crash service 2018-08-08 18:37:43 -07:00
ceph-fuse.target systemd: Support Graceful Reboot for AIO Node 2020-09-18 11:02:26 +08:00
ceph-fuse@.service.in systemd: lock down more privileges 2020-05-09 14:53:05 -07:00
ceph-immutable-object-cache.target systemd: Support Graceful Reboot for AIO Node 2020-09-18 11:02:26 +08:00
ceph-immutable-object-cache@.service.in systemd: lock down more privileges 2020-05-09 14:53:05 -07:00
ceph-mds.target systemd: Support Graceful Reboot for AIO Node 2020-09-18 11:02:26 +08:00
ceph-mds@.service.in systemd: Support Graceful Reboot for AIO Node 2020-09-18 11:02:26 +08:00
ceph-mgr.target systemd: Support Graceful Reboot for AIO Node 2020-09-18 11:02:26 +08:00
ceph-mgr@.service.in systemd: Support Graceful Reboot for AIO Node 2020-09-18 11:02:26 +08:00
ceph-mon.target systemd: Support Graceful Reboot for AIO Node 2020-09-18 11:02:26 +08:00
ceph-mon@.service.in systemd: Support Graceful Reboot for AIO Node 2020-09-18 11:02:26 +08:00
ceph-osd.target systemd: Support Graceful Reboot for AIO Node 2020-09-18 11:02:26 +08:00
ceph-osd@.service.in systemd: Support Graceful Reboot for AIO Node 2020-09-18 11:02:26 +08:00
ceph-radosgw.target systemd: Support Graceful Reboot for AIO Node 2020-09-18 11:02:26 +08:00
ceph-radosgw@.service.in systemd: Support Graceful Reboot for AIO Node 2020-09-18 11:02:26 +08:00
ceph-rbd-mirror.target systemd: Support Graceful Reboot for AIO Node 2020-09-18 11:02:26 +08:00
ceph-rbd-mirror@.service.in systemd: lock down more privileges 2020-05-09 14:53:05 -07:00
ceph-volume@.service
ceph.target systemd: Support Graceful Reboot for AIO Node 2020-09-18 11:02:26 +08:00
ceph.tmpfiles.d
CMakeLists.txt build/ops: adding build spec for immutable object cache daemon 2019-03-22 00:16:26 +08:00
rbdmap.service.in systemd: Support Graceful Reboot for AIO Node 2020-09-18 11:02:26 +08:00