From a1fbd9680a66c6ea5c19566b188bd74366424d17 Mon Sep 17 00:00:00 2001 From: Richard W.M. Jones Date: Apr 01 2014 17:38:15 +0000 Subject: Fix race in systemd service startup (RHBZ#1059913). --- diff --git a/rabbitmq-server.service b/rabbitmq-server.service index e56171b..193661d 100644 --- a/rabbitmq-server.service +++ b/rabbitmq-server.service @@ -8,6 +8,9 @@ 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 diff --git a/rabbitmq-server.spec b/rabbitmq-server.spec index 51f0b9c..d1c3581 100644 --- a/rabbitmq-server.spec +++ b/rabbitmq-server.spec @@ -1,6 +1,6 @@ Name: rabbitmq-server Version: 3.1.5 -Release: 4%{?dist} +Release: 5%{?dist} License: MPLv1.1 Group: Development/Libraries Source: http://www.rabbitmq.com/releases/rabbitmq-server/v%{version}/%{name}-%{version}.tar.gz @@ -187,6 +187,9 @@ done rm -rf %{buildroot} %changelog +* Tue Apr 1 2014 Richard W.M. Jones - 3.1.5-5 +- Fix race in systemd service startup (RHBZ#1059913). + * Mon Mar 31 2014 Richard W.M. Jones - 3.1.5-4 - Use ephemeral port (32768 and up instead of 10000+) (RHBZ#998682).