razorsedge / puppet-network

Puppet module to manage Red Hat/Fedora traditional network configuration.
http://forge.puppetlabs.com/razorsedge/network
Other
55 stars 139 forks source link

bond slaves no default mac address #34

Open jeffNagra opened 10 years ago

jeffNagra commented 10 years ago

I started a pull request for this but github hates me and it went horribly wrong. Anyway, I note that some resources (eg network::if::static) auto set the mac address of an interface based on the macaddress_ethX fact. Is there a reason this is not done for the network::bond::slave resource?

razorsedge commented 10 years ago

GitHub was acting up last night. :-(

I believe it is because NIC MACs start to change once more than one interface becomes a slave to a bond.

jeffNagra commented 10 years ago

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...

ifconfig bond0 Link encap:Ethernet HWaddr 00:50:56:B1:62:82
inet addr:172.16.1.31 Bcast:172.16.1.255 Mask:255.255.255.0 inet6 addr: fe80::250:56ff:feb1:6282/64 Scope:Link UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1 RX packets:1212 errors:0 dropped:0 overruns:0 frame:0 TX packets:792 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1158671 (1.1 MiB) TX bytes:369508 (360.8 KiB)

eth0 Link encap:Ethernet HWaddr 00:50:56:B1:62:82
UP BROADCAST SLAVE MULTICAST MTU:1500 Metric:1 RX packets:453 errors:0 dropped:0 overruns:0 frame:0 TX packets:453 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:397975 (388.6 KiB) TX bytes:230113 (224.7 KiB)

eth1 Link encap:Ethernet HWaddr 00:50:56:B1:62:82
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1 RX packets:759 errors:0 dropped:0 overruns:0 frame:0 TX packets:339 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:760696 (742.8 KiB) TX bytes:139395 (136.1 KiB)

facter | grep macaddress_ macaddress_bond0 => 00:50:56:B1:62:82 macaddress_eth0 => 00:50:56:B1:62:82 macaddress_eth1 => 00:50:56:B1:70:9E

I have been using a forked version of your code with the patch applied and everything works fine

razorsedge commented 10 years ago

That is good news. May I ask what versions of Puppet and Facter you are using?

jeffNagra commented 10 years ago

puppet-3.4.2-1.el6.noarch facter-1.7.5-1.el6.x86_64

razorsedge commented 10 years ago

For the life of me, I can not remember why I left that feature out. Feel free to send a PR against the develop branch.

jeffNagra commented 10 years ago

hopefully that PR is better, still getting used to github

riton commented 8 years ago

:+1: for this PR