[Bug 1007529] New: Cloud:Tools/cloud-init: Bug network configuration fails
http://bugzilla.opensuse.org/show_bug.cgi?id=1007529 Bug ID: 1007529 Summary: Cloud:Tools/cloud-init: Bug network configuration fails Classification: openSUSE Product: openSUSE.org Version: unspecified Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: 3rd party software Assignee: jdsn@suse.com Reporter: eblock@nde.ag QA Contact: opensuse-communityscreening@forge.provo.novell.com CC: rjschwei@suse.com Found By: --- Blocker: --- Testing cloud-init version 0.7.8 on a Leap 42.1 VM in Openstack Mitaka, I try to configure the network interface via config-drive because the required network is external. After cloud-init has finished eth0 has no ip address: leap-mini:~ # ifconfig eth0 Link encap:Ethernet HWaddr FA:16:3E:52:51:7E inet6 addr: fe80::f816:3eff:fe52:517e/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:109 errors:0 dropped:0 overruns:0 frame:0 TX packets:86 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:27292 (26.6 Kb) TX bytes:27324 (26.6 Kb) journalctl reports: Oct 28 16:00:00 leap-mini cloud-init[598]: [CLOUDINIT] stages.py[INFO]: Applying network configuration from ds bringup=False: {'version': 1, 'config': [{'subnets': [{u'routes': [{u'netmask': u'0.0.0.0', u'network': u'0.0.0.0', u'gateway': u'192.168.168.1'}], u'netmask': u'255.255.255.0', u'type': 'static', 'ipv4': True, 'address': u'192.168.168.143'}], 'mac_address': u'fa:16:3e:52:51:7e', u'type': 'physical', 'name': 'eth0', u'mtu': 1500}]} Oct 28 16:00:00 leap-mini cloud-init[598]: [CLOUDINIT] util.py[DEBUG]: Writing to /etc/sysconfig//network-scripts/route-eth0 - wb: [420] 128 bytes Oct 28 16:00:00 leap-mini cloud-init[598]: [CLOUDINIT] util.py[DEBUG]: Writing to /etc/sysconfig//network-scripts/ifcfg-eth0 - wb: [420] 267 bytes The information from config-drive is written to /etc/sysconfig/network-scripts instead of /etc/sysconfig/network. leap-mini:~ # cat /etc/sysconfig/network/ifcfg-eth0 BOOTPROTO='dhcp' STARTMODE='auto' BROADCAST='' ETHTOOL_OPTIONS='' IPADDR='' MTU='' NAME='' NETWORK='' REMOTE_IPADDR='' PREFIXLEN='24' leap-mini:~ # cat /etc/sysconfig/network-scripts/ ifcfg-eth0 route-eth0 leap-mini:~ # cat /etc/sysconfig/network-scripts/ifcfg-eth0 # Created by cloud-init on instance boot automatically, do not edit. # BOOTPROTO=static DEFROUTE=yes DEVICE=eth0 GATEWAY=192.168.168.1 HWADDR=fa:16:3e:52:51:7e IPADDR=192.168.168.143 MTU=1500 NETMASK=255.255.255.0 NM_CONTROLLED=no ONBOOT=yes TYPE=Ethernet USERCTL=no cloud-init version: cloud-init-0.7.8-13.1.x86_64 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1007529
http://bugzilla.opensuse.org/show_bug.cgi?id=1007529#c1
Robert Schweikert
http://bugzilla.opensuse.org/show_bug.cgi?id=1007529
http://bugzilla.opensuse.org/show_bug.cgi?id=1007529#c2
--- Comment #2 from Eugen Block
Can you please test with build cloud-init-0.7.8-14.1. There was a self reference issue in the unit files and parts of the code were not executed. I am surprised you were able to login.
After an update on the test vm I have now cloud-init version: cloud-init-0.7.8-21.1.x86_64 The result is the same, it's writing its network information to /etc/sysconfig/network-scripts/ instead of /etc/sysconfig/network/. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1007529
http://bugzilla.opensuse.org/show_bug.cgi?id=1007529#c3
--- Comment #3 from Robert Schweikert
http://bugzilla.opensuse.org/show_bug.cgi?id=1007529
Robert Schweikert
http://bugzilla.opensuse.org/show_bug.cgi?id=1007529
http://bugzilla.opensuse.org/show_bug.cgi?id=1007529#c4
--- Comment #4 from Eugen Block
Can you please try again, applied a new patch.
I tried cloud-init version 0.7.8-22.1 with the following results: Now there is no information written in /etc/sysconfig/networks-scripts, in fact this directory doesn't exist (which is great). But the interface still won't come up, I think it's misconfigured: ---cut here--- test-vm1:~ # cat /etc/sysconfig/network/ifcfg-eth0 # Created by cloud-init on instance boot automatically, do not edit. # BOOTPROTO=static DEFROUTE=yes DEVICE=eth0 GATEWAY=192.168.168.1 HWADDR=fa:16:3e:a3:92:9a IPADDR=192.168.168.101 MTU=1500 NETMASK=255.255.255.0 NM_CONTROLLED=no ONBOOT=yes TYPE=Ethernet USERCTL=no test-vm1:~ # cat /etc/sysconfig/network/route-eth0 # Created by cloud-init on instance boot automatically, do not edit. # ADDRESS0=0.0.0.0 GATEWAY0=192.168.168.1 NETMASK0=0.0.0.0 test-vm1:~ # cat /etc/sysconfig/network/routes test-vm1:~ # ---cut here--- I compared the output to a working vm with cloud-init-0.7.7: ---cut here--- test-vm2:~ # cat /etc/sysconfig/network/ifcfg-eth0 BOOTPROTO=static STARTMODE=auto BROADCAST= ETHTOOL_OPTIONS= IPADDR=192.168.168.102 MTU= NAME= NETMASK=255.255.255.0 NETWORK= REMOTE_IPADDR= USERCONTROL=no GATEWAY=192.168.168.1 test-vm2:~ # cat /etc/sysconfig/network/ifroute-eth0 default 192.168.168.1 test-vm2:~ # ---cut here--- If you need more information, please let me know. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1007529
http://bugzilla.opensuse.org/show_bug.cgi?id=1007529#c5
Robert Schweikert
http://bugzilla.opensuse.org/show_bug.cgi?id=1007529
http://bugzilla.opensuse.org/show_bug.cgi?id=1007529#c6
--- Comment #6 from Eugen Block
OK, I switched the patch back to fall back to the deprecated but still supported version of writing the network configuration.
I have to check with upstream on the though process to customize the new implementation.
Network setup should be working again. Sorry for triggering this issue by switching to the new implementation pre-maturely.
Please report back.
I retried with cloud-init-0.7.8-23.1.x86_64 and now the instance is getting its network configuration correctly again. At least for the one test I ran. Thanks for switching it back. Let me know if there's more to test. :-) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1007529
http://bugzilla.opensuse.org/show_bug.cgi?id=1007529#c7
Robert Schweikert
participants (1)
-
bugzilla_noreply@novell.com