ceph/systemd/rbdmap.service.in
Ilya Dryomov 37da5d8af9 systemd/rbdmap.service: order us before remote-fs-pre.target
If "/usr/bin/rbdmap unmap-all" notices a file system mounted on top of
an rbd device, it will call umount, interfering with systemd shutdown
logic.  Make sure we aren't invoked until all _netdev mounts are dealt
with by systemd.

Fixes: http://tracker.ceph.com/issues/24713
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2018-06-29 16:36:05 +02:00

19 lines
395 B
SYSTEMD

[Unit]
Description=Map RBD devices
After=network-online.target
Before=remote-fs-pre.target
Wants=network-online.target remote-fs-pre.target
[Service]
EnvironmentFile=-@SYSTEMD_ENV_FILE@
Environment=RBDMAPFILE=/etc/ceph/rbdmap
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/rbdmap map
ExecReload=/usr/bin/rbdmap map
ExecStop=/usr/bin/rbdmap unmap-all
[Install]
WantedBy=multi-user.target