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: