corosync hangs due to missing pacemaker shutdown scripts

Bug #1052449 reported by Kai Bojens
80
This bug affects 13 people
Affects Status Importance Assigned to Milestone
pacemaker (Ubuntu)
Fix Released
Undecided
Unassigned
Precise
Won't Fix
Undecided
Unassigned
Trusty
Won't Fix
Undecided
Unassigned
Xenial
Fix Released
Undecided
Unassigned

Bug Description

The pacemaker package installs the right init script but doesn't link it to the according runlevels. If corosync is activated and started on the system this leads to a hanging shutdown / reboot because corosync only ends if pacemaker is stopped beforehand. In addition to this the pacemaker daemon has to start after corosync but has to stop before corosync.

A possible solution would be to link the init script accordingly an enable it throug /etc/default/

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

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in pacemaker (Ubuntu):
status: New → Confirmed
Revision history for this message
Robert Sander (gurubert) wrote :

The pacemaker init.d script misses corosync in the "Required-Stop: " line.

This causes corosync to be tried to stop before pacemaker as the dependency is not there.

Revision history for this message
mig5 (mig5) wrote :

I reproduce this issue. When I go to reboot my machine I see this message:

pcmk_shutdown: Preventing Corosync shutdown. Please ensure Pacemaker is stopped first.

If I manually re-run /etc/init.d/pacemaker stop, everything follows and shuts down as expected.

Adding 'corosync' to the Required-Stop: line in the pacemaker init script doesn't appear to solve the issue for me though.

Revision history for this message
Marco Gabriel (mgabriel-inett) wrote :

Just let pacemaker stop before corosync gets stopped:

# mv /etc/rc6.d/K01corosync /etc/rc6.d/K02corosync

That worked for me.

Revision history for this message
Robert Sander (gurubert) wrote :

comment #4 is only a temporary solution as symlinks are reorganized when insserv is run the next time.

Revision history for this message
Dane Elwell (dane-elwell) wrote :

Still experiencing this bug on Ubuntu 12.04.4 (http://i.imgur.com/C7q5XRu.png). Stopping Pacemaker manually will cause the system to reboot normally.

Revision history for this message
openMDP (perrinmarcus) wrote :

Some of us are still experiencing this issue. Any idea would be helpful. :-)

Revision history for this message
Brendan McGrath (redmcg) wrote :

I got a bit confused reading through this bug and the comments so I'm writing this in the hope it'll help future visitors.

Some of the comments are relevant to a work-around for this bug. But the bug itself is about the missing update-rc.d command in the postinst (and preinst) scripts of the install package.

The suggestion in the original bug report is to follow a pattern similar to corosync where the update-rc.d is in the postinst and preinst scripts but you still need to edit /etc/default/corosync to enable corosync to start on boot.

The workaround in the meantime requires one to manually run update-rc.d. When doing this - it's important that corosync starts before pacemaker and shuts down after.

To do this, we can run:
sudo update-rc.d pacemaker defaults 99 00

I'm running 14.04.02 LTS - so:
#2 is no longer the case ('Required-Stop: corosync' is now in the /etc/init.d/pacemaker script)
#5 won't be a problem as insserv has been disabled (by .legacy-bootordering in /etc/init.d)

Revision history for this message
Brendan McGrath (redmcg) wrote :

Please note that the installation scripts I meant to refer to are postinst and postrm (not postinst and preinst).

Revision history for this message
James Page (james-page) wrote :

See related bug 1727063

Changed in pacemaker (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → High
tags: added: ubuntu-ha
Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

I'm marking Precise and Trusty as affected.

The suggested fix is currently implemented by Xenial already:

mcp/pacemaker.in:

...
# Required-Start: $network corosync
# Should-Start: $syslog
# Required-Stop: $network corosync
...

Changed in pacemaker (Ubuntu Xenial):
status: New → Fix Released
Changed in pacemaker (Ubuntu Trusty):
status: New → Confirmed
Changed in pacemaker (Ubuntu Precise):
status: New → Confirmed
Changed in pacemaker (Ubuntu):
status: Triaged → Fix Released
importance: High → Undecided
Changed in pacemaker (Ubuntu Trusty):
status: Confirmed → Triaged
Changed in pacemaker (Ubuntu Precise):
status: Confirmed → Triaged
Revision history for this message
Steve Langasek (vorlon) wrote :

The Precise Pangolin has reached end of life, so this bug will not be fixed for that release

Changed in pacemaker (Ubuntu Precise):
status: Triaged → Won't Fix
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Trusty has reached its end of standard support, so this bug will not be fixed for that release.

Changed in pacemaker (Ubuntu Trusty):
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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