Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macaddress should be optional in network::bond::slave #89

Open
ghost opened this issue Feb 2, 2016 · 2 comments
Open

macaddress should be optional in network::bond::slave #89

ghost opened this issue Feb 2, 2016 · 2 comments
Assignees

Comments

@ghost
Copy link

ghost commented Feb 2, 2016

With Facter 3 running on EL 6.x, this statement (from #34) is no longer true:

I have been reading the kernel docs on bonding and whilst the bonding module does change the mac addresses of the slave devices it doesnt cause an issue for facter, it still reports the actual physical mac...

As soon as the bonding interface resets slave mac addresses, facter starts reporting the new mac addresses:

[root@ri7dx0101 ~]# grep . /sys/class/net/eth[23]/address
/sys/class/net/eth2/address:00:10:e0:71:8d:0a
/sys/class/net/eth3/address:00:10:e0:71:8d:0b
[root@ri7dx0101 ~]# puppet apply -t --noop -e 'fail("${::networking['\''interfaces'\'']['\''eth3'\'']}")'
Info: Loading facts
Error: Evaluation Error: Error while evaluating a Function Call, {mac => 00:10:e0:71:8d:0b, mtu => 1500}  at line 1:1 on node ri7dx0101.ri7.ord12.responsys.com

After bonding kicks in:

[root@ri7dx0101 ~]# grep . /sys/class/net/eth[23]/address
/sys/class/net/eth2/address:00:10:e0:71:8d:0a
/sys/class/net/eth3/address:00:10:e0:71:8d:0a
[root@ri7dx0101 ~]# puppet apply -t --noop -e 'fail("${::networking['\''interfaces'\'']['\''eth3'\'']}")'
Info: Loading facts
Error: Evaluation Error: Error while evaluating a Function Call, {mac => 00:10:e0:71:8d:0a, mtu => 1500}  at line 1:1 on node ri7dx0101.ri7.ord12.responsys.com

Which means as soon as bonding kicks in and puppet runs again, the ifcfg-eth3 file gets rewritten with the eth2 mac address, which causes problems next time the system reloads the network config.

In EL6, the mac address is not even required in the slave interface of a bonded config. Would it be possible to make the macaddress parameter optional for the network::bond::slave defined type?

@amoghpatel
Copy link

I'm also experiencing this same issue. When I pass $::facts['networking']['interfaces']['eth1']['mac'] to network::bond::slave, on first run it creates ifcfg-eth1 file with initial permanent mac but when I run puppet second time it changes the ifcfg-eth1 mac to bonded primary mac. So, basically it's taking two puppet run. I think, I can pass the primary fact $::facts['networking']['mac'] for all the slaves because that's what bonding will eventually do.

Also, some how network module is not kicking "network" service restart in my environment (RHEL6.7) when file changes.

@amoghpatel
Copy link

FYI @jearls @razorsedge - Puppetlabs has opened a bug ticket https://tickets.puppetlabs.com/browse/FACT-1379 to address the bug in slave interface facter values with Facter3.1 when Network bond takes place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants