Corosync/Pacemaker: Error when enabling Pacemaker service,Error when starting the cluster

Bug #1673579 reported by Akash Chandrashekar
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pcs (Ubuntu)
Fix Released
Low
Unassigned
Xenial
Fix Released
Low
Bryan Quigley

Bug Description

[Impact]

 * Low, requires users to change the config pcs just generated for them because the logging paths aren't correct on Debian/Ubuntu.
 * While easy to workaround it its broken by default.

[Test Case]

Install Pacemaker packages:
sudo apt-get install pcs

Set the password for the default user:
sudo passwd hacluster

#To clear files
sudo pcs cluster destroy

Enable and start pcsd/pacemaker:
#this is not needed on yakkety/zesty, why?
sudo systemctl start pcsd

sudo pcs cluster auth pacemaker-1 pacemaker-2 -u hacluster -p haclusterpassword

#this is not needed on yakkety/zesty, why?
sudo systemctl enable pacemaker

sudo pcs cluster setup --name hacluster pacemaker-1 pacemaker-2
sudo pcs cluster start
**FAILS***
Starting Cluster...
Job for corosync.service failed because the control process exited with error code. See "systemctl status corosync.service" and "journalctl -xe" for details.

Error: unable to start corosync

(Then to actually bring the cluster up you need to sudo systemctl start pacemaker)

__
Workaround
On both nodes, Replace the line:
logfile: /var/log/cluster/corosync.log
with
logfile: /var/log/corosync/corosync.log

[Regression Potential]

 * Seems unlikely this changes is only in the setup cluster function. This exact same fix is now in the Debian package, we just make the logging directory the right one.
 * The only potential I see is if someone has scripted creating a cluster using pcs and worked around this bug by making the corosync directory instead of changing the config file.

[Other Info]

 * This is already fixed in 16.10 and 17.04.

description: updated
Revision history for this message
Bryan Quigley (bryanquigley) wrote :

On zesty it all works without errors, namely:

Install Pacemaker packages:
sudo apt-get install pcs

Set the password for the default user:
sudo passwd hacluster

#To clear files
sudo pcs cluster destroy

sudo pcs cluster auth pacemaker-1 pacemaker-2 -u hacluster -p haclusterpassword
sudo pcs cluster setup --name hacluster pacemaker-1 pacemaker-2

(And start doesn't error out)

Revision history for this message
Bryan Quigley (bryanquigley) wrote :

Yakkety also works fine, so this looks to just be a bug on Xenial. (and pcs isn't in older releases).

description: updated
affects: ubuntu → pcs (Ubuntu)
Revision history for this message
Bryan Quigley (bryanquigley) wrote :

In yakkety the log file change is fixed in
$ cat debian/patches/0008-Fix-corosync-log.patch
--- a/pcs/cluster.py
+++ b/pcs/cluster.py
@@ -726,7 +726,7 @@
         quorum_section.add_attribute("two_node", "1")

     logging_section.add_attribute("to_logfile", "yes")
- logging_section.add_attribute("logfile", "/var/log/cluster/corosync.log")
+ logging_section.add_attribute("logfile", "/var/log/corosync/corosync.log")
     logging_section.add_attribute("to_syslog", "yes")

     return str(corosync_conf), messages

I'm going to review other bugs/fixes to see if there is anything else we would want to fix at the same time.

description: updated
description: updated
Revision history for this message
Bryan Quigley (bryanquigley) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "pcs_0.9.149-1ubuntu2.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Mathew Hodson (mhodson)
Changed in pcs (Ubuntu):
importance: Undecided → Low
tags: added: xenial
Changed in pcs (Ubuntu):
status: New → Fix Released
Changed in pcs (Ubuntu Xenial):
assignee: nobody → Bryan Quigley (bryanquigley)
Mathew Hodson (mhodson)
Changed in pcs (Ubuntu Xenial):
importance: Undecided → Low
Changed in pcs (Ubuntu Xenial):
status: New → Triaged
status: Triaged → In Progress
tags: added: sts
Revision history for this message
Bryan Quigley (bryanquigley) wrote :

I'm revisiting this with the perspective of NOT encouraging the use of pcs for 16.04.

Revision history for this message
Bryan Quigley (bryanquigley) wrote :

In any case, this simple fix is still worth it for making pcs a bit easier.

Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Akash, or anyone else affected,

Accepted pcs into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/pcs/0.9.149-1ubuntu1.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in pcs (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Bryan Quigley (bryanquigley) wrote :

Tested with pcs 0.9.149-1ubuntu1.1 from proposed repo (wget download of it). The issue is fixed.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Robie Basak (racb) wrote : Update Released

The verification of the Stable Release Update for pcs has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pcs - 0.9.149-1ubuntu1.1

---------------
pcs (0.9.149-1ubuntu1.1) xenial; urgency=medium

  * Patch d/p/0009-Fix-corosync-log.patch makes the generated config
    use the right log directory so it doesn't fail to start
    (LP: #1673579).

 -- Bryan Quigley <email address hidden> Thu, 27 Apr 2017 11:11:22 -0700

Changed in pcs (Ubuntu Xenial):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.