Centos 7 Bond slave interfaces not configured when provisioning

When provisioning a new physical Centos 7 server in Foreman 1.9.2 the bond
slave interface configuration files are not generated. The bond master
interfaces are configured correctly but since the slaves are not applied to
the master the bond does not come online. Is there any special
configuration that needs to be done on the interfaces themselves to get
them to slave to the bond master?

I just configured a bonded interface on a centos7 via foreman and it works;
I copied the mac of the first member as the mac of the bond, the members
have their domain/subnet fields cleared but they have the "Managed"
checkbox checked.

hope it helps

··· On Saturday, October 17, 2015 at 7:10:22 PM UTC+2, James Green Jr wrote: > > When provisioning a new physical Centos 7 server in Foreman 1.9.2 the bond > slave interface configuration files are not generated. The bond master > interfaces are configured correctly but since the slaves are not applied to > the master the bond does not come online. Is there any special > configuration that needs to be done on the interfaces themselves to get > them to slave to the bond master? >

That's a broken way of doing it, shouldn't need to copy and paste a mac
around or add expenses like this to API calls to do similar.

Bonds are really broken if you add a vlan/virtual interface on top as the
regex then creates a bond0.vlan?.bond0.175 or something goofy like that.

i have a ticket open on this and have been experimenting around with the
snippet but not sure how i want to solve this. The provisioning gui is a
bit compilcated and i would love for defaults to be able to be setup in
host groups or something like what is done on the virtual provider side.

-byron

··· On Sunday, October 18, 2015 at 11:17:54 PM UTC-5, Alessandro Vozza wrote: > > I just configured a bonded interface on a centos7 via foreman and it > works; I copied the mac of the first member as the mac of the bond, the > members have their domain/subnet fields cleared but they have the "Managed" > checkbox checked. > > hope it helps > > On Saturday, October 17, 2015 at 7:10:22 PM UTC+2, James Green Jr wrote: >> >> When provisioning a new physical Centos 7 server in Foreman 1.9.2 the >> bond slave interface configuration files are not generated. The bond master >> interfaces are configured correctly but since the slaves are not applied to >> the master the bond does not come online. Is there any special >> configuration that needs to be done on the interfaces themselves to get >> them to slave to the bond master? >> >

That did the trick, I had to go in to each physical interface and check off
managed. I also had to modify the kickstart_networking_setup provisioning
template and change the hardcoded NM_CONTROLLED=no to NM_CONTROLLED=yes to
allow NetworkManager to bring the interfaces up on boot.

··· On Monday, October 19, 2015 at 12:17:54 AM UTC-4, Alessandro Vozza wrote: > > I just configured a bonded interface on a centos7 via foreman and it > works; I copied the mac of the first member as the mac of the bond, the > members have their domain/subnet fields cleared but they have the "Managed" > checkbox checked. > > hope it helps > > On Saturday, October 17, 2015 at 7:10:22 PM UTC+2, James Green Jr wrote: >> >> When provisioning a new physical Centos 7 server in Foreman 1.9.2 the >> bond slave interface configuration files are not generated. The bond master >> interfaces are configured correctly but since the slaves are not applied to >> the master the bond does not come online. Is there any special >> configuration that needs to be done on the interfaces themselves to get >> them to slave to the bond master? >> >

What's the correct way then? Indeed, the logic behind the creation of the
interface files is a bit fragile: if I don't add MAC address to the
bond.<vlan> interface as well I end up with:

bond0.105 interface

real=ip -o link | grep | awk &#39;{print $2;}&#39; | sed s/:$//
real=echo bond0.105 | sed s/bond0/$real/

which indeed result in a ifcfg-.<vlan> interface file.

what's the ticket number btw? I'd like to contribute if possible.

··· On Monday, October 19, 2015 at 2:59:27 PM UTC+2, Byron Miller wrote: > > That's a broken way of doing it, shouldn't need to copy and paste a mac > around or add expenses like this to API calls to do similar. > > Bonds are really broken if you add a vlan/virtual interface on top as the > regex then creates a bond0.vlan?.bond0.175 or something goofy like that. > > i have a ticket open on this and have been experimenting around with the > snippet but not sure how i want to solve this. The provisioning gui is a > bit compilcated and i would love for defaults to be able to be setup in > host groups or something like what is done on the virtual provider side. > > -byron > > > On Sunday, October 18, 2015 at 11:17:54 PM UTC-5, Alessandro Vozza wrote: >> >> I just configured a bonded interface on a centos7 via foreman and it >> works; I copied the mac of the first member as the mac of the bond, the >> members have their domain/subnet fields cleared but they have the "Managed" >> checkbox checked. >> >> hope it helps >> >> On Saturday, October 17, 2015 at 7:10:22 PM UTC+2, James Green Jr wrote: >>> >>> When provisioning a new physical Centos 7 server in Foreman 1.9.2 the >>> bond slave interface configuration files are not generated. The bond master >>> interfaces are configured correctly but since the slaves are not applied to >>> the master the bond does not come online. Is there any special >>> configuration that needs to be done on the interfaces themselves to get >>> them to slave to the bond master? >>> >>

Sorry, i didn't mean to come off like a jerk… i've just been flustered
with trying to get this to work without breaking every other type of
provisioning :slight_smile:

The ticket i had opened/closed (found my own internal solution through
brute force and simply assuming every machine of x type always had bonds
and ignored what the user provided) is:

http://projects.theforeman.org/issues/11887#change-49627

··· On Monday, October 19, 2015 at 9:46:39 AM UTC-5, Alessandro Vozza wrote: > > What's the correct way then? Indeed, the logic behind the creation of the > interface files is a bit fragile: if I don't add MAC address to the > bond. interface as well I end up with: > > # bond0.105 interface > real=`ip -o link | grep | awk '{print $2;}' | sed s/:$//` > real=`echo bond0.105 | sed s/bond0/$real/` > > > which indeed result in a ifcfg-. interface file. > > what's the ticket number btw? I'd like to contribute if possible. > > On Monday, October 19, 2015 at 2:59:27 PM UTC+2, Byron Miller wrote: >> >> That's a broken way of doing it, shouldn't need to copy and paste a mac >> around or add expenses like this to API calls to do similar. >> >> Bonds are really broken if you add a vlan/virtual interface on top as the >> regex then creates a bond0.vlan?.bond0.175 or something goofy like that. >> >> i have a ticket open on this and have been experimenting around with the >> snippet but not sure how i want to solve this. The provisioning gui is a >> bit compilcated and i would love for defaults to be able to be setup in >> host groups or something like what is done on the virtual provider side. >> >> -byron >> >> >> On Sunday, October 18, 2015 at 11:17:54 PM UTC-5, Alessandro Vozza wrote: >>> >>> I just configured a bonded interface on a centos7 via foreman and it >>> works; I copied the mac of the first member as the mac of the bond, the >>> members have their domain/subnet fields cleared but they have the "Managed" >>> checkbox checked. >>> >>> hope it helps >>> >>> On Saturday, October 17, 2015 at 7:10:22 PM UTC+2, James Green Jr wrote: >>>> >>>> When provisioning a new physical Centos 7 server in Foreman 1.9.2 the >>>> bond slave interface configuration files are not generated. The bond master >>>> interfaces are configured correctly but since the slaves are not applied to >>>> the master the bond does not come online. Is there any special >>>> configuration that needs to be done on the interfaces themselves to get >>>> them to slave to the bond master? >>>> >>>

I also noticed if i do copy the mac addr down through bond0 and bond0.vlan
that bond0.vlan gets created as interface.vlan instead…

i personally would love a feature that if you create a bond and type in the
bonded interfaces, that automatically manages those interfaces and then if
you create an interface/vlan on the bond it works correctly… trying to
figure this out is hurting my brain… if i fix bonding, i break regular
provisioning because the primary/master interface management stuff.

··· On Tuesday, October 20, 2015 at 7:20:33 AM UTC-5, Byron Miller wrote: > > Sorry, i didn't mean to come off like a jerk.. i've just been flustered > with trying to get this to work without breaking every other type of > provisioning :) > > The ticket i had opened/closed (found my own internal solution through > brute force and simply assuming every machine of x type always had bonds > and ignored what the user provided) is: > > http://projects.theforeman.org/issues/11887#change-49627 > > On Monday, October 19, 2015 at 9:46:39 AM UTC-5, Alessandro Vozza wrote: >> >> What's the correct way then? Indeed, the logic behind the creation of the >> interface files is a bit fragile: if I don't add MAC address to the >> bond. interface as well I end up with: >> >> # bond0.105 interface >> real=`ip -o link | grep | awk '{print $2;}' | sed s/:$//` >> real=`echo bond0.105 | sed s/bond0/$real/` >> >> >> which indeed result in a ifcfg-. interface file. >> >> what's the ticket number btw? I'd like to contribute if possible. >> >> On Monday, October 19, 2015 at 2:59:27 PM UTC+2, Byron Miller wrote: >>> >>> That's a broken way of doing it, shouldn't need to copy and paste a mac >>> around or add expenses like this to API calls to do similar. >>> >>> Bonds are really broken if you add a vlan/virtual interface on top as >>> the regex then creates a bond0.vlan?.bond0.175 or something goofy like >>> that. >>> >>> i have a ticket open on this and have been experimenting around with the >>> snippet but not sure how i want to solve this. The provisioning gui is a >>> bit compilcated and i would love for defaults to be able to be setup in >>> host groups or something like what is done on the virtual provider side. >>> >>> -byron >>> >>> >>> On Sunday, October 18, 2015 at 11:17:54 PM UTC-5, Alessandro Vozza wrote: >>>> >>>> I just configured a bonded interface on a centos7 via foreman and it >>>> works; I copied the mac of the first member as the mac of the bond, the >>>> members have their domain/subnet fields cleared but they have the "Managed" >>>> checkbox checked. >>>> >>>> hope it helps >>>> >>>> On Saturday, October 17, 2015 at 7:10:22 PM UTC+2, James Green Jr wrote: >>>>> >>>>> When provisioning a new physical Centos 7 server in Foreman 1.9.2 the >>>>> bond slave interface configuration files are not generated. The bond master >>>>> interfaces are configured correctly but since the slaves are not applied to >>>>> the master the bond does not come online. Is there any special >>>>> configuration that needs to be done on the interfaces themselves to get >>>>> them to slave to the bond master? >>>>> >>>>