Comment 8 for bug 1546947

Revision history for this message
Artem Panchenko (apanchenko-8) wrote : Re: Corosync doesn't start on boot if balance-rr bonding is configured: 'No nodelist defined or our node is not in the nodelist'

Dmitry, I think I've found why 'static-network-up' event is emitted too early, there is a regression in Ubuntu ifupdown package (see bug #1545302 ). Briefly what happens:

1. Corosync is started by rc-sysinit, because it has old style init script, while rc-sysinit is started after umm and umm after 'static-network-up' event. Corosync has the highest priority in RC, so basically it's executed right after networking.

2. The 'networking' service just executes `ifup -a` command while starting. The 'ifup' goes over all network configuration files and starts 'auto' interfaces. At the end of each interface start 'ifup' executes '/etc/network/if-up.d/upstart' [0] script which does emit 'static-network-up' if *all* interfaces are UP.

3. The event 'static-network-up' is emitted during 'bond.101' configuration due to bug in ifupdown code - command on line #32 in [0] returns only 2 interfaces (it *must* always print *all* auto interfaces) and as was mentioned above 'ifquery' prints to warnings stderr:

root@node-2:~# env IFUPDOWN_bond1.101=post-up > /dev/null
root@node-2:~# ifquery --list
lo
bond0
ifquery: recursion detected for interface bond1 in parent-lock phase
ifquery: recursion detected for parent interface bond1 in parent-lock phase

4. Since network is "ready", corosync is started, but br-mgmt is still not configured, so the service fails.

Here is a patch were recursion detection was added to ifupdown (see bug #1532722): http://launchpadlibrarian.net/235926320/ifupdown_0.7.47.2ubuntu4.1_0.7.47.2ubuntu4.3.diff.gz In the comment [1] to the bug #1545302 @dgadomski suggests a patch which fixes the regression. I installed his ifupdown package (see instructions here [2]) and confirm that it helps, corosync starts fine on boot.

Also I checked old ifupdown [3] package, with it the problem is gone too.

[0] http://paste.openstack.org/show/487460/
[1] https://bugs.launchpad.net/ubuntu/+source/wpa/+bug/1545302/comments/12
[2] https://bugs.launchpad.net/ubuntu/+source/wpa/+bug/1545302/comments/11
[3] http://launchpadlibrarian.net/175234326/ifupdown_0.7.47.2ubuntu4.1_amd64.deb