New Question
0

cloudbase-ini fails intermittently configuring DNS on network adapter

asked 2015-08-27 00:07:56 +0300

elfner gravatar image

We are seeing intermittent failures with a Windows 2012 R2 image deployed on VMware. The error is in cloud-init not being able to configure DNS on the network adapter. We suspect a timing issue where the adapter is not always ready for configuration when attempted. Has anyone else observed this behavior? The cloud-init log looks like this:

2015-08-19 11:53:00.397 1404 INFO cloudbaseinit.utils.debiface [-] Parsing Debian config...

# Injected by Nova on instance boot
#
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
        address 172.23.143.161
        netmask 255.255.255.0
        broadcast 172.23.143.255
        gateway 172.23.143.1
        dns-nameservers 172.22.124.101 172.30.189.21


2015-08-19 11:53:00.397 1404 DEBUG cloudbaseinit.utils.debiface [-] Found new interface: {'netmask6': None, 'name': u'eth0', 'mac': None, 'address6': None, 'broadcast': u'172.23.143.255', 'dnsnameservers': [u'172.22.124.101', u'172.30.189.21'], 'gateway6': None, 'address': u'172.23.143.161', 'netmask': u'255.255.255.0', 'gateway': u'172.23.143.1'} _add_nic C:\Program Files (x86)\Cloudbase Solutions\Cloudbase-Init\Python27\lib\site-packages\cloudbaseinit\utils\debiface.py:103
2015-08-19 11:53:00.538 1404 INFO cloudbaseinit.plugins.common.networkconfig [-] Configuring network adapter FA:16:3E:1D:C7:4A
2015-08-19 11:53:00.834 1404 DEBUG cloudbaseinit.osutils.windows [-] Setting static IP address set_static_network_config C:\Program Files (x86)\Cloudbase Solutions\Cloudbase-Init\Python27\lib\site-packages\cloudbaseinit\osutils\windows.py:557
2015-08-19 11:53:01.177 1404 DEBUG cloudbaseinit.osutils.windows [-] Setting static gateways set_static_network_config C:\Program Files (x86)\Cloudbase Solutions\Cloudbase-Init\Python27\lib\site-packages\cloudbaseinit\osutils\windows.py:565
2015-08-19 11:53:01.240 1404 DEBUG cloudbaseinit.osutils.windows [-] Setting static DNS servers set_static_network_config C:\Program Files (x86)\Cloudbase Solutions\Cloudbase-Init\Python27\lib\site-packages\cloudbaseinit\osutils\windows.py:573
2015-08-19 11:53:01.256 1404 ERROR cloudbaseinit.init [-] plugin 'NetworkConfigPlugin' failed with error 'Cannot set DNS on network adapter'
2015-08-19 11:53:01.256 1404 ERROR cloudbaseinit.init [-] Cannot set DNS on network adapter
2015-08-19 11:53:01.256 1404 TRACE cloudbaseinit.init Traceback (most recent call last):
2015-08-19 11:53:01.256 1404 TRACE cloudbaseinit.init   File "C:\Program Files (x86)\Cloudbase Solutions\Cloudbase-Init\Python27\lib\site-packages\cloudbaseinit\init.py", line 67, in _exec_plugin
2015-08-19 11:53:01.256 1404 TRACE cloudbaseinit.init     shared_data)
2015-08-19 11:53:01.256 1404 TRACE cloudbaseinit.init   File "C:\Program Files (x86)\Cloudbase Solutions\Cloudbase-Init\Python27\lib\site-packages\cloudbaseinit\plugins\common\networkconfig.py", line 154, in execute
2015-08-19 11:53:01.256 1404 TRACE cloudbaseinit.init     nic.dnsnameservers
2015-08-19 11:53:01.256 1404 TRACE cloudbaseinit.init   File "C:\Program Files (x86)\Cloudbase Solutions\Cloudbase-Init\Python27\lib\site-packages\cloudbaseinit\osutils\windows.py", line 577, in set_static_network_config
2015-08-19 11:53:01.256 1404 TRACE cloudbaseinit.init     "Cannot set DNS on network adapter")
2015-08-19 11:53:01.256 ...
(more)
edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2015-09-01 18:51:22 +0300

updated 2015-09-01 19:07:06 +0300

Hello,

We are doing many tests on WS2012 R2 (W8 X64) and we couldn't observe such behavior (on VMWare and on OpenStack (with devstack)). If the DHCP is disabled (through the custom IP and broadcast addresses which are set first), then there should be no problem for "ready" state of the NIC when setting DNSes. Also, there is no default validation (ping/request) for the custom addresses (only basic checks) from the OS API when setting them, so you don't have to worry if that DNS address is valid and reachable in that particular moment.

One solution for the moment is to:

  1. Provide additional and extensive information regarding the environment you are currently using for your windows image and a full cloudbase-init log. (infrastructure, type of deployment, versions, configuration files, metadata content etc.)

  2. Make some tests until the error is reproduced using the beta installer found here: https://www.cloudbase.it/downloads/Cl... with this patch applied: https://review.openstack.org/#/c/219305/ if it's not present there yet (because it may take a little time for the merge and the lastest build) and you should see in the logs the error code for which the DNS setting has failed.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

1 follower

Stats

Asked: 2015-08-27 00:07:56 +0300

Seen: 238 times

Last updated: Sep 01 '15