Public bug reported: Cloud Provider: OpenStack (Mitaka) Distro: Ubuntu 16.04 Cloud-init version: 0.7.9 (cloud-init cfg is distro provider)
Other Info: Nova Instance booted with Config Drive on a Neutron Network (without DHCP) Problem: when a nova instance is booted with config drive on a network with DHCP disabled, the global DNS servers passed in the network_data.json are not rendered to the eth0 interface in the /etc/network/interface.d/50-cloud-init.cfg file. It is only available on the 'lo' interface. As a result, /etc/resolv.conf is empty and all name resolutions fail. /etc/network/interface.d/50-cloud-init.cfg looks like this auto lo iface lo inet loopback dns-nameservers 8.8.8.8 auto eth0 iface eth0 inet static address 192.168.111.183 netmask 255.255.255.0 post-up route add default gw 192.168.111.1 || true pre-down route del default gw 192.168.111.1 || true instead, IMO, it should probably look like this:- auto lo iface lo inet loopback dns-nameservers 8.8.8.8 auto eth0 iface eth0 inet static address 192.168.111.183 dns-nameservers 8.8.8.8 // Notice this additional dns info in eth0 netmask 255.255.255.0 post-up route add default gw 192.168.111.1 || true pre-down route del default gw 192.168.111.1 || true I tried the fix in bug 1693265 i.e https://review.openstack.org/#/c/467699/ but it still didn't add the dns-nameservers in the eth0 of the ENI file. Then, I tried a custom fix (attached nova.diff) to pass the dns_namesevers in the "networks" value of the network_data.json and that seems to fix the problem for me. At this point, I am not clear if this is a bug in Nova or Cloud-Init to render the dns servers in ENI file correctly. Please let me know if you need more info. ** Affects: cloud-init Importance: Undecided Status: New ** Attachment added: "nova.diff" https://bugs.launchpad.net/bugs/1712440/+attachment/4937249/+files/nova.diff ** Description changed: - Cloud Provider: OpenStack (Mitaka) - Distro: Ubuntu 16.04 + Distro: Ubuntu 16.04 Cloud-init version: 0.7.9 (cloud-init cfg is distro provider) Other Info: Nova Instance booted with Config Drive on a Neutron Network (without DHCP) - Problem: - when a nova instance is booted with config drive on a network with DHCP disabled, - the global DNS servers passed in the network_data.json are not rendered to the - eth0 interface in the /etc/network/interface.d/50-cloud-init.cfg file. It is only - available on the 'lo' interface. As a result, /etc/resolv.conf is empty. + Problem: + when a nova instance is booted with config drive on a network with DHCP disabled, the global DNS servers passed in the network_data.json are not rendered to the eth0 interface in the /etc/network/interface.d/50-cloud-init.cfg file. It is only available on the 'lo' interface. As a result, /etc/resolv.conf is empty. /etc/network/interface.d/50-cloud-init.cfg looks like this auto lo iface lo inet loopback - dns-nameservers 8.8.8.8 + dns-nameservers 8.8.8.8 auto eth0 iface eth0 inet static - address 192.168.111.183 - netmask 255.255.255.0 - post-up route add default gw 192.168.111.1 || true - pre-down route del default gw 192.168.111.1 || true - + address 192.168.111.183 + netmask 255.255.255.0 + post-up route add default gw 192.168.111.1 || true + pre-down route del default gw 192.168.111.1 || true instead, IMO, it should probably look like this:- auto lo iface lo inet loopback - dns-nameservers 8.8.8.8 + dns-nameservers 8.8.8.8 auto eth0 iface eth0 inet static - address 192.168.111.183 - dns-nameservers 8.8.8.8 // Notice this additional dns info in eth0 - netmask 255.255.255.0 - post-up route add default gw 192.168.111.1 || true - pre-down route del default gw 192.168.111.1 || true - + address 192.168.111.183 + dns-nameservers 8.8.8.8 // Notice this additional dns info in eth0 + netmask 255.255.255.0 + post-up route add default gw 192.168.111.1 || true + pre-down route del default gw 192.168.111.1 || true I tried the fix in bug 1693265 i.e https://review.openstack.org/#/c/467699/ but it still didn't add the dns-nameservers in the eth0 of the ENI file. Then, I tried a custom fix (attached nova.diff) to pass the dns_namesevers - in the "networks" value of the network_data.json and that seems to fix the problem - for me. + in the "networks" value of the network_data.json and that seems to fix the problem for me. - At this point, I am not clear if this is a bug in Nova or Cloud-Init to render - the dns servers in ENI file correctly. Please let me know if you need more info. + At this point, I am not clear if this is a bug in Nova or Cloud-Init to + render the dns servers in ENI file correctly. Please let me know if you + need more info. ** Description changed: Cloud Provider: OpenStack (Mitaka) Distro: Ubuntu 16.04 Cloud-init version: 0.7.9 (cloud-init cfg is distro provider) Other Info: Nova Instance booted with Config Drive on a Neutron Network (without DHCP) Problem: - when a nova instance is booted with config drive on a network with DHCP disabled, the global DNS servers passed in the network_data.json are not rendered to the eth0 interface in the /etc/network/interface.d/50-cloud-init.cfg file. It is only available on the 'lo' interface. As a result, /etc/resolv.conf is empty. + when a nova instance is booted with config drive on a network with DHCP disabled, the global DNS servers passed in the network_data.json are not rendered to the eth0 interface in the /etc/network/interface.d/50-cloud-init.cfg file. It is only available on the 'lo' interface. As a result, /etc/resolv.conf is empty and all name resolutions fail. /etc/network/interface.d/50-cloud-init.cfg looks like this auto lo iface lo inet loopback dns-nameservers 8.8.8.8 auto eth0 iface eth0 inet static address 192.168.111.183 netmask 255.255.255.0 post-up route add default gw 192.168.111.1 || true pre-down route del default gw 192.168.111.1 || true instead, IMO, it should probably look like this:- auto lo iface lo inet loopback dns-nameservers 8.8.8.8 auto eth0 iface eth0 inet static address 192.168.111.183 dns-nameservers 8.8.8.8 // Notice this additional dns info in eth0 netmask 255.255.255.0 post-up route add default gw 192.168.111.1 || true pre-down route del default gw 192.168.111.1 || true I tried the fix in bug 1693265 i.e https://review.openstack.org/#/c/467699/ but it still didn't add the dns-nameservers in the eth0 of the ENI file. Then, I tried a custom fix (attached nova.diff) to pass the dns_namesevers in the "networks" value of the network_data.json and that seems to fix the problem for me. At this point, I am not clear if this is a bug in Nova or Cloud-Init to render the dns servers in ENI file correctly. Please let me know if you need more info. -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to cloud-init. https://bugs.launchpad.net/bugs/1712440 Title: Missing dns-nameservers in eth0 with config drive on openstack instance Status in cloud-init: New Bug description: Cloud Provider: OpenStack (Mitaka) Distro: Ubuntu 16.04 Cloud-init version: 0.7.9 (cloud-init cfg is distro provider) Other Info: Nova Instance booted with Config Drive on a Neutron Network (without DHCP) Problem: when a nova instance is booted with config drive on a network with DHCP disabled, the global DNS servers passed in the network_data.json are not rendered to the eth0 interface in the /etc/network/interface.d/50-cloud-init.cfg file. It is only available on the 'lo' interface. As a result, /etc/resolv.conf is empty and all name resolutions fail. /etc/network/interface.d/50-cloud-init.cfg looks like this auto lo iface lo inet loopback dns-nameservers 8.8.8.8 auto eth0 iface eth0 inet static address 192.168.111.183 netmask 255.255.255.0 post-up route add default gw 192.168.111.1 || true pre-down route del default gw 192.168.111.1 || true instead, IMO, it should probably look like this:- auto lo iface lo inet loopback dns-nameservers 8.8.8.8 auto eth0 iface eth0 inet static address 192.168.111.183 dns-nameservers 8.8.8.8 // Notice this additional dns info in eth0 netmask 255.255.255.0 post-up route add default gw 192.168.111.1 || true pre-down route del default gw 192.168.111.1 || true I tried the fix in bug 1693265 i.e https://review.openstack.org/#/c/467699/ but it still didn't add the dns-nameservers in the eth0 of the ENI file. Then, I tried a custom fix (attached nova.diff) to pass the dns_namesevers in the "networks" value of the network_data.json and that seems to fix the problem for me. At this point, I am not clear if this is a bug in Nova or Cloud-Init to render the dns servers in ENI file correctly. Please let me know if you need more info. To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1712440/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

