[DRBD-announce] drbd-reactor v0.5.1
Roland Kammerer <[email protected]> Tue, 30 Nov 2021 14:51:43 +0100
| Newsgroups | dev.linux.lists.drbd-announce |
|---|---|
| Message-ID | <[email protected]> |
Dear DRBD users, This is drbd-reactor v0.5.1, fixing a bug mainly relevant for LINBIT vSAN, and introducing a smaller feature, both in the promoter plugin. The feature is that we now also override the Description field in our service overrides, which makes reading logs/systemdctl status a bit nicer. drbd-reactor controlled services show up like this: mnt-test.mount - drbd-reactor controlled mnt-test The bug that was fixed occurs in combination with the "stop-services-on-exit" config option. If set, the controlled services (i.e., the [email protected]) is stopped whenever the plugin exits. This can be a `drbd-reactorctl disable ...`, or even a `systemctl stop drbd-reactor`. vSAN sets that option, which makes it easy to switch over all services by stopping the drbd-reactor service. And this is where it gets complicated, I just quote the commit message for this fix: Commit 27d798e0 introduced setting Before=drbd-reactor.service in the generated drbd-services@ target overrides. While a good idea in general (see that particular commit), it also can create a situation where the user issues a `systemctl stop drbd-reactor` (expecting switch-over), which then blocks as: drbd-reactor.service wants to shut down and promoter wants to `systemctl stop` the target unit. But this contains the mentioned Before= and wants drbd-reactor to be gone first. Blocks and timeouts. We can borrow Pacemaker behavior by writing the Before= in a extra override and when the plugin detects it is responsible for shutdown, it then can: - rm that particular Before= override file. - systemctl daemon-reload - systemctl stop the target (that now does not have the Before= dependency on drbd-reactor.service) All fine, but with that we saw another behavior becoming a show stopper: systemd.mount(5) automatically adds a Before= dependency on local-fs.target unless "nofail" is specified. That in combination with what was described above made systemd fail with a cyclic dependency on "reboot". That can be solved by setting "nofail" as an option, or what looks even a slightly better in our case by setting "DefaultDependencies=no". Regards, rck GIT: https://github.com/LINBIT/drbd-reactor/commit/3b521bacec0957725ed00e2ada0c691edbdde9d4 TGZ: https://pkg.linbit.com//downloads/drbd/utils/drbd-reactor-0.5.1.tar.gz PPA: https://launchpad.net/~linbit/+archive/ubuntu/linbit-drbd9-stack Changelog: * build: bump debian utils dep as well * promoter: fix stop-services-on-exit * promoter: override description
signature.asc
(application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEdesqw/S/2vE9wNKDRgmezyI6myIFAmGmLGsACgkQRgmezyI6 myKZCAf8DTN4j7ui0FHcJezsvNQv6FtWgpe1taFHaMrXRviWLYx2E3pH3XSK4c7n eMZWsRj7XDXCJPLO5zCuI7sfvlrqHdq+ykPmG7HOIfW6Cn4NR0DCPD7cJ9v688yu P2l1YEL9iWakKCp2zLmENnfmYECivmHxl6lnqKntOdLKwGY5xIt46Et0IHg1Z636 BArHKkFM/PpkaOkRHWKV/tNE3ZCUG0mWdR/Do06H8tLtlquaEOFjmESbo/6CRRo2 p1kcMuB1OF2V+6KS+7JwAETst4DErXui6hXEwWOUbIlBNGc+8UakUEsyFqceR/Po /HcypZwASq6O2f7+gjQG2ipgXoK0yQ== =ZzFa -----END PGP SIGNATURE-----