THANK YOU!  That fixed it, I certainly appreciate the help.

-----Original Message-----
From: Ryan Harper [mailto:[email protected]] 
Sent: Tuesday, March 27, 2018 3:12 PM
To: Leroy Tennison <[email protected]>
Cc: [email protected]
Subject: [EXTERNAL] Re: LSB job for "raise network interfaces" times out but 
configuration works

On Mon, Mar 26, 2018 at 10:38 AM, Leroy Tennison <[email protected]> wrote:
> I’ve found numerous posts on the web about this but all solutions fix 
> the symptom, not the issue (adjust the networking timeout).  
> Admittedly, the situation is more complex (bonding and bridging) but I 
> would prefer something other than a work-around on production 
> hypervisors.  The
> configuration:
>
>
>
> /etdc/modprobe.d/bonding.conf:
>
>                options bonding mode=1 miimon=100 downdelay=200 
> updelay=200
>
>
>
> /etc/network/interfaces:
>
> source /etc/network/interfaces.d/*          (empty directory)
>
>
>
> # The loopback network interface
>
> auto lo
>
> iface lo inet loopback
>
>
>
> # The primary network interface
>
> auto bond0 br0 enp2s0 enp3s0
>
>
>
> iface enp2s0 inet manual
>
>         bond-master     bond0
>
>
>
> iface enp3s0 inet manual
>
>         bond-master     bond0
>
>
>
> iface bond0 inet manual
>
>         bond-primary    enp2s0 enp3s0
>
>         post-up         ifenslave bond0 enp2s0 enp3s0
>
>         pre-down        ifenslave -d bond0 enp2s0 enp3s0
>
>
>
> iface br0 inet static
>
>         address 10.222.110.95/24
>
>         gateway 10.222.110.1
>
>         up ip route add default via 10.222.110.1 dev br0
>
> #       dns-nameservers 10.222.110.1
>
>         dns-search ofc.datavoiceint.com colo.datavoiceint.com 
> client.datavoiceint.com wifi.datavoiceint.com
>
>         bridge_ports    bond0
>
>         bridge stp      off
>
>         bridge_fd       0
>
>         bridge_maxwait  0
>
>
>
> Because of the timeout, the DNS entries in /etc/network/interfaces 
> aren’t applied to the system.  I have worked around this by using 
> /etc/resolvconf/resolv.conf.d/tail.
>
>
>
> Questions:
>
>                Why is this happening?
>
>                Is there anything I can do to prevent it while 
> maintaining the bonding/bridging configuration?

This may help:

Ensure you've bridge-utils and ifenslave packages installed, and then I suggest 
this restructuring of the interfaces file:

auto lo
iface lo inet loopback
    dns-nameservers 10.222.110.1
    dns-search ofc.datavoiceint.com colo.datavoiceint.com 
client.datavoiceint.com wifi.datavoiceint.com

auto enp2s0
iface enp2s0 inet manual
    bond-master bond0
    bond-mode active-backup
    bond-primary enp2s0

auto enp3s0
iface enp3s0 inet manual
    bond-master bond0
    bond-mode active-backup
    bond-primary enp2s0

auto bond0
iface bond0 inet manual
    bond-mode active-backup
    bond-slaves none
    bond-primary enp2s0

auto br0
iface br0 inet static
    address 10.222.110.95/24
    gateway 10.222.110.1
    bridge_ports bond0
    bridge_stp off


The changes I've made here are

1) drop up-down hooks, the bridge-utils/ifenslave packages already provide 
scripts to do this
2) set mode to active-backup, I suspect with bond-primary this is what you want
3) bond-primary takes a single interface, this interface is always preferred 
over any other, in active-backup, it'll fail over to any other interface that's 
been enslaved
    I'm not aware of bond-primary accepting a list in case you've enslaved more 
than two interfaces
4) make use of bond-slaves none to deal with parallel ifup on physical 
interfaces
5) best-practices for bonding replicate the bond configration on slaves in case 
one fails to come up, the config is always present
6) drop use of bridge_maxwait as you don't have an anonymous bridge (no ip 
address) so you must wait for the underlying device (bond0) to come up

I'm not entirely sure why resolveconf wasn't picking up the dns-* settings from 
the bridge, but I do think that the maxwait 0 mean that the bridge wasn't 
waiting for the underlying interface (bond0) to be come available.  In general 
it's going to take non-zero amount of time for the bond to become active after 
the interfaces are cold-plugged; so I think it's worth letting the ifupdown 
hook scripts run with the defaults to see if that gets everything configured.  
If it comes up fine, then from there you can see about tweaking settings to 
lower the amount of time it's waiting.

Hope that helps,
Ryan
-- 
ubuntu-server mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam

Reply via email to