Here is complete workaround, that we applied on customer deployment:
--- /tmp/i/usr/lib/python2.6/site-packages/fuel_agent/manager.orig 2016-05-23 17:45:52.424936068 +0000
+++ /tmp/i/usr/lib/python2.6/site-packages/fuel_agent/manager.py 2016-05-20 21:48:08.180124582 +0000
@@ -446,8 +446,8 @@
for mapping in self.driver.configdrive_scheme.\ common.udevrules.split(','): mac_addr, nic_name = mapping.split('_')
- f.write('SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", '
- 'ATTR{address}=="%s", ATTR{type}=="1", KERNEL=="eth*",'
+ f.write('SUBSYSTEM=="net", DRIVERS=="?*", '
+ 'ATTR{address}=="%s", ATTR{type}=="1",' ' NAME="%s"\n' % (mac_addr, nic_name)) f.write('# Generated by fuel-agent during provisioning: END\n')
# FIXME(agordeev): Disable net-generator that will add new etries to
But that was not enough - for some unknown race, 1 reboot always provide wrong interface names, even with correct udev rules generated.
Here is second hack, that actually fix problem with first boot:
--- /tmp/i/usr/share/fuel-agent/cloud-init-templates/boothook_ubuntu.jinja2.orig 2016-05-23 17:50:49.651719024 +0000
+++ /tmp/i/usr/share/fuel-agent/cloud-init-templates/boothook_ubuntu.jinja2 2016-05-21 04:43:33.326960788 +0000
@@ -16,6 +16,10 @@
ADMIN_MAC={{ common.admin_mac }}
ADMIN_IF=$(echo {{ common.udevrules }} | sed 's/[,=]/\n/g' | grep "$ADMIN_MAC" | cut -d_ -f2 | head -1)
And of course it customer specific, due to Intel and Broadcom NICs.
Here is complete workaround, that we applied on customer deployment:
--- /tmp/i/ usr/lib/ python2. 6/site- packages/ fuel_agent/ manager. orig 2016-05-23 17:45:52.424936068 +0000 usr/lib/ python2. 6/site- packages/ fuel_agent/ manager. py 2016-05-20 21:48:08.180124582 +0000 configdrive_ scheme. \
common. udevrules. split(' ,'):
mac_ addr, nic_name = mapping.split('_') 'SUBSYSTEM= ="net", ACTION=="add", DRIVERS=="?*", ' =="%s", ATTR{type}=="1", KERNEL=="eth*",' 'SUBSYSTEM= ="net", DRIVERS=="?*", ' =="%s", ATTR{type}=="1",'
' NAME="%s"\n' % (mac_addr, nic_name))
f. write(' # Generated by fuel-agent during provisioning: END\n')
+++ /tmp/i/
@@ -446,8 +446,8 @@
for mapping in self.driver.
- f.write(
- 'ATTR{address}
+ f.write(
+ 'ATTR{address}
# FIXME(agordeev): Disable net-generator that will add new etries to
But that was not enough - for some unknown race, 1 reboot always provide wrong interface names, even with correct udev rules generated.
Here is second hack, that actually fix problem with first boot: usr/share/ fuel-agent/ cloud-init- templates/ boothook_ ubuntu. jinja2. orig 2016-05-23 17:50:49.651719024 +0000 usr/share/ fuel-agent/ cloud-init- templates/ boothook_ ubuntu. jinja2 2016-05-21 04:43:33.326960788 +0000
--- /tmp/i/
+++ /tmp/i/
@@ -16,6 +16,10 @@
# udev persistent net _net1 /etc/init. d/networking stop
cloud-init-per instance udev_persistent
+cloud-init-per instance unload_module_igb /bin/sh -c "rmmod igb || true"
+cloud-init-per instance unload_module_bnx2x /bin/sh -c "rmmod bnx2x || true"
+cloud-init-per instance load_module_igb /bin/sh -c "modprobe igb || true"
+cloud-init-per instance load_module_bnx2x /bin/sh -c "modprobe bnx2x || true"
ADMIN_MAC={{ common.admin_mac }}
ADMIN_IF=$(echo {{ common.udevrules }} | sed 's/[,=]/\n/g' | grep "$ADMIN_MAC" | cut -d_ -f2 | head -1)
And of course it customer specific, due to Intel and Broadcom NICs.