cloud init multiple NICs in Ubuntu and CentOS
Hi everyone, I am working on the cloud init setting for ubuntu & centos cloud images .
Environment:
machine: 3 controller + 2 network + 2 compute Liberty
setting: user-data + config drive + template from this web http://blog.oddbit.com/2015/06/26/openstack-networking-without-dhcp/ (http://blog.oddbit.com/2015/06/26/ope...)
network: pub-network(flat) + private (vxlan) cloud-img: CentOS1701, Ubuntu1604
Test:
- both pub & pri network disable dhcp, the network interfaces would grow in interface.d or network-script/, but sometimes failed in CentOS
- both pub & pri network enable dhcp, the network interfaces would grow only in interface.d on Ubuntu; the root login, ssh seems fine for CentOS, but network interfaces no good. Also, couldn't curl http://169.254.169.254/openstack
because log shows as below
CentOS Linux 7 (Core)
Kernel 3.10.0-514.6.1.el7.x86_64 on an x86_64
localhost login: [ 303.352248] cloud-init[780]: Cloud-init v. 0.7.5 running 'init' at Fri, 17 Feb 2017 09:45:05 +0000. Up 303.31 seconds.
[ 303.373464] cloud-init[780]: ci-info: +++++++++++++++++++++++Net device info++++++++++++++++++++++++
[ 303.373788] cloud-init[780]: ci-info: +--------+-------+-----------+-----------+-------------------+
[ 303.374167] cloud-init[780]: ci-info: | Device | Up | Address | Mask | Hw-Address |
[ 303.374482] cloud-init[780]: ci-info: +--------+-------+-----------+-----------+-------------------+
[ 303.374804] cloud-init[780]: ci-info: | lo: | True | 127.0.0.1 | 255.0.0.0 | . |
[ 303.375152] cloud-init[780]: ci-info: | eth1: | False | . | . | fa:16:3e:56:62:6d |
[ 303.375471] cloud-init[780]: ci-info: | eth0: | True | . | . | fa:16:3e:42:2d:b2 |
[ 303.375790] cloud-init[780]: ci-info: +--------+-------+-----------+-----------+-------------------+
[ 303.376136] cloud-init[780]: ci-info: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Route info failed!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[ 304.668380] cloud-init[2576]: Cloud-init v. 0.7.5 running 'modules:config' at Fri, 17 Feb 2017 09:45:07 +0000. Up 304.58 seconds.
[ 305.133694] cloud-init[3181]: Cloud-init v. 0.7.5 running 'modules:final' at Fri, 17 Feb 2017 09:45:07 +0000. Up 305.04 seconds.
=================================
Any one has ideas about how to deal with the network configuration for CenOS cloud img? The time it take a couple minutes