[DRBD-announce] drbd-reactor v0.4.0-rc.1

Roland Kammerer roland.kammerer at linbit.com
Tue Jun 1 11:00:10 CEST 2021

Dear DRBD users,

This is RC1 for drbd-reactor version 0.4.0, which brings some exciting
improvements to the promoter plugin as well as to the core, and
introduces a new ctl tool as well.

This requires drbd-utils >= 9.18.0-rc.1 (announced yesterday).

The first feature is that the core now reacts to HUP (i.e., systemctl
reload), where it stops plugins not having a configuration anymore,
starts the ones that got added, and keeps the ones running that did not
change. Plugin configurations should be put into separate .toml files in
/etc/drbd-reactor.d/. Every plugin can (and should) have an ID (user set
in the toml file). These IDs are the handle the core uses to decide if a
plugin is new, exists, or got removed.

While many users will have a static configuration and will not care
deeply about reloading instead of restarting, we intend to make use of
that feature in HA setups when we add/remove HA resources on the fly.
There it is important that we can add/remove promoter plugin instances
on the fly without disturbing the running ones.

Which brings me to the next feature, which is improved HA and OCF
resource agent support in the promoter plugin. So far one could specify
a start = [] list of systemd units that got started individually one
after the other. Now drbd-utils provides systemd templates that allow 
proper handling of DRBD resources as well as improved dependency
handling between units in the start list: For example the promoter
plugin creates an implicit systemd service override that waits for the
backing devices of a DRBD resource and then promotes it to Primary. The
promoter also generates overrides for ever service in the start list so
all of them depend on a promoted DRBD device, and every service depends
on the service before it. Finally, it generates an implicit systemd
target unit that lists all the dependencies. By then starting (or
stopping) this target unit, all the rest of the magic is handled by
systemd. This is explained in more details here[1]. One additional
feature documented there is support for OCF resource agents. With all
that in place, a HA setup for a HA linstor controller, or iSCSI, or NFS
is just a matter of specifying the service dependencies in the start =
[] list. In the future linstor-gateway and LINSTOR vSAN will be users
for that.

Last but not least this release contains a new tool named
"drbd-reactorctl", which makes enabling/disabling, editing, restarting,
creating a plugin configuration from a template, status querying,... 
simple tasks. It currently does not have a man page on its own, but the
'-h' output should give you a pretty good overview. These are just a few
examples one might do:

$ drbd-reactorctl edit -t promoter mylinstorha # which opens a promoter
template in your editor ready to fill in the required details. After
saving the plugin will be enabled.
$ drbd-reactorctl status --verbose mylinstorha # systemd status about
the target
$ drbd-reactorctl cat mylinstorha # shows the plugin configuration
$ drbd-reactorctl disable --now mylinstorha # disables the plugin and
stops the target unit, which is nice to switch the service to another
node while maintainance
$ drbd-reactorctl enable mylinstorha # enable a disabled plugin

What existing users should do:
- move plugin configuration (promoter, debugger, umh, prometheus) from
  drbd-reactor.toml to snippets in /etc/drbd-reactor.d/ and make sure
  'snippets' is set in the main config.
- add an 'id = "something"' to every plugin

Regards, rck

P.S.: the rpm provided here is built for RHEL8 alike systems and because
drbd-reactorctl is written in Python, requires python3-toml. On RHEL7
systems you should ignore the dependency on install and install
python36-toml (and python3). Both these packages are in EPEL. We will
provide that dependency in our customer repos after the final release.

[1] https://github.com/LINBIT/drbd-reactor/blob/master/doc/promoter.md
[DEB]: https://transfer.sh/1Ooh4x5/drbd-reactor_0.4.0-rc.1-1_amd64.deb
[RPM]: https://transfer.sh/1mh1wdm/drbd-reactor-0.4.0-rc.1-1.x86_64.rpm

[ Roland Kammerer ]
* README.md: mark prometheus as done
* drbd, Resource: add to_plugin_updates
* core: allow plugins to be reloaded
* systemd notify: unset NOTIFY_SOCKET
* doc,man,prometheus: Sx -> Sy
* core: don't fail if plugin fails to start
* doc: rm dummy placeholder
* promoter: make runner explicit
* promoter: switch to systemd templates
* promoter: add dependencies-as
* promoter: add target-as
* promoter: reload daemon only once
* promoter: use [String] in templates
* promoter: use contains
* promoter: use anonymous block for file write
* promoter: don't use map_err
* doc,promoter: document dependencies-as, target-as
* deps: bump drbd-utils to 9.18.0
* doc: mv from src/ to doc/
* doc,promoter: fix pragraph macro
* doc,promoter: fix .Sy macro
* allow daemon reloading via service
* core: add newlines between snippets
* promoter: wait a bit after stop
* drbd-reactorctl: add tool
* build: switch rpm to RHEL8 alike

[ Christoph Böhmwalder ]
* add example grafana dashboard
* example: amend grafana dashboard

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.linbit.com/pipermail/drbd-announce/attachments/20210601/ce8c0a31/attachment.pgp>

More information about the drbd-announce mailing list