erlang-sd_notify is a small library that wraps the sd_notify function from libsystemd-daemon. There is an upstream Fedora bug (bug 1103524) that tracks switching the rabbitmq-server package to use erlang-sd_notify in order to change the rabbitmq-server.service unit to type=notify. This is the desired and correct behavior to remove several hacks in the current unit. The current unit looks like this: [Service] Type=simple User=rabbitmq Group=rabbitmq Environment=RABBITMQ_PID_FILE=/var/run/rabbitmq/pid WorkingDirectory=/var/lib/rabbitmq # Ensure cookie is created to avoid race # See https://bugzilla.redhat.com/show_bug.cgi?id=1059913 ExecStartPre=-/bin/sh -c "/usr/lib/rabbitmq/bin/rabbitmqctl status > /dev/null 2>&1" ExecStart=/usr/lib/rabbitmq/bin/rabbitmq-server ExecStartPost=/usr/lib/rabbitmq/bin/rabbitmqctl wait /var/run/rabbitmq/pid ExecStop=/usr/lib/rabbitmq/bin/rabbitmqctl stop ExecStopPost=/usr/bin/rm /var/run/rabbitmq/pid Some notes: - The ExecStartPost is needed because this service is of type=simple. Simple services are expected to be available via managed sockets, and that once the ExecStart process has been executed, the service can be considered started. Any interaction with the service during boot time is to be done via the managed socket and processed once the service finishes starting. That is not the case with rabbitmq-server. It does not support inheriting sockets from systemd, so the service must artificially wait before the unit is considered started. Thus the "rabbitmqctl wait" command. - The ExecStartPre is needed because of a race between ExecStart and ExecStartPost. See bug 1059913 for details. - ExecStopPost is needed to ensure the pidfile is removed, since ExecStartPost will wait on that file during the next startup. So all of these things are interrelated, and they're all hacks to paper over the fact that simple services aren't really supposed to work like this. Switching over to using sd_notify allows the service unit to look like this instead: [Service] Type=notify User=rabbitmq Group=rabbitmq WorkingDirectory=/var/lib/rabbitmq ExecStart=/usr/lib/rabbitmq/bin/rabbitmq-server ExecStop=/usr/lib/rabbitmq/bin/rabbitmqctl stop Which is much simpler and correct. It also avoids the pacemaker issue where it does not wait on ExecStartPost, although pacemaker seems to have a separate issue with sd_notify as well, as I've noted in the pacemaker bug. So even this alone will not truly fix the issue. This is not absolutely critical for GA. I am working on some workarounds in the pacemaker puppet code right now that should hopefully make this work with the current service. This should definitely be fixed for A1, but it would still be nice to fix it sooner.
I've got a scratch build of this that does not require erlang-rebar in order to build. That package brings in a bunch of extra build dependencies that really are overkill. With my build it doesn't require any extra packages beyond itself.
verified using the latest tempest automation tests on rabbitmq # rpm -qa |grep erlang-sd erlang-sd_notify-0.1-2.el7ost.x86_64
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2014-1935.html