Cloud-init does not configure properly a second network interface
Issue
Starting Virtual Machines ('Instances' in Openstack terms) with more than one network interface gets only the first interface configured. The second one never gets configured properly:
[[32m OK [0m] Started Network Manager Script Dispatcher Service.
[ 4.338220] alg: No test for crc32 (crc32-pclmul)
Starting Hostname Service...
[ 4.381829] intel_rapl: no valid rapl domains found in package 0
[ 4.445412] intel_rapl: no valid rapl domains found in package 0
[ 4.452120] intel_powerclamp: No package C-state available[[32m OK [0m] Started Hostname Service.
[ 4.478450] intel_powerclamp: No package C-state available[ 4.479741] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 4.489561] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[ 4.644843] cloud-init[487]: Cloud-init v. 0.7.6 running 'init-local' at Thu, 15 Jun 2017 14:18:17 +0000. Up 4.62 seconds.
[[32m OK [0m] Started Initial cloud-init job (pre-networking).
Red Hat Enterprise Linux Server 7.3 (Maipo)
Kernel 3.10.0-514.el7.x86_64 on an x86_64
host-192-168-40-15 login: [ 10.823843] cloud-init[834]: Cloud-init v. 0.7.6 running 'init' at Thu, 15 Jun 2017 14:18:23 +0000. Up 10.79 seconds.
[ 10.880467] cloud-init[834]: ci-info: +++++++++++++++++++++++++++Net device info+++++++++++++++++++++++++++
[ 10.880656] cloud-init[834]: ci-info: +--------+------+---------------+---------------+-------------------+
[ 10.880935] cloud-init[834]: ci-info: | Device | Up | Address | Mask | Hw-Address |
[ 10.881283] cloud-init[834]: ci-info: +--------+------+---------------+---------------+-------------------+
[ 10.881538] cloud-init[834]: ci-info: | lo: | True | 127.0.0.1 | 255.0.0.0 | . |
[ 10.881800] cloud-init[834]: ci-info: | eth1: | True | . | . | fa:16:3e:10:7f:b8 |
[ 10.882084] cloud-init[834]: ci-info: | eth0: | True | 192.168.40.15 | 255.255.255.0 | fa:16:3e:77:3e:ee |
[ 10.882329] cloud-init[834]: ci-info: +--------+------+---------------+---------------+-------------------+
[ 10.882590] cloud-init[834]: ci-info: +++++++++++++++++++++++++++++++++++Route info+++++++++++++++++++++++++++++++++++
[ 10.882850] cloud-init[834]: ci-info: +-------+-----------------+--------------+-----------------+-----------+-------+
[ 10.883133] cloud-init[834]: ci-info: | Route | Destination | Gateway | Genmask | Interface | Flags |
[ 10.883387] cloud-init[834]: ci-info: +-------+-----------------+--------------+-----------------+-----------+-------+
[ 10.883652] cloud-init[834]: ci-info: | 0 | 0.0.0.0 | 192.168.40.1 | 0.0.0.0 | eth0 | UG |
[ 10.883931] cloud-init[834]: ci-info: | 1 | 169.254.169.254 | 192.168.40.1 | 255.255.255.255 | eth0 | UGH |
[ 10.884284] cloud-init[834]: ci-info: | 2 | 192.168.40.0 | 0.0.0.0 | 255.255.255.0 | eth0 | U |
[ 10.884545] cloud-init[834]: ci-info: +-------+-----------------+--------------+-----------------+-----------+-------+
[ 11.942255] cloud-init[2153]: Cloud-init v. 0.7.6 running 'modules:config' at Thu, 15 Jun 2017 14:18:25 +0000. Up 11.89 seconds.
[ 12.266130] cloud-init[2408]: Cloud-init v. 0.7.6 running 'modules:final' at Thu, 15 Jun 2017 14:18:25 +0000. Up 12.22 seconds.
ci-info: +++++++Authorized keys from /home/cloud-user/.ssh/authorized_keys for user cloud-user++++++++
ci-info: +---------+-------------------------------------------------+---------+---------------------+
ci-info: | Keytype | Fingerprint (md5) | Options | Comment |
ci-info: +---------+-------------------------------------------------+---------+---------------------+
ci-info: | ssh-rsa | b7:96:65:4d:6f:7d:8f:7e:f5:1e:84:79:80:58:28:b4 | - | arvydas@arvydas-teo |
ci-info: +---------+-------------------------------------------------+---------+---------------------+
ec2:
ec2: #############################################################
Result: eth1 does not have an IP or Network mask.
Environment
rhel-guest-image-7.3-36.x86_64.qcow2 and earlier
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.