DataSourceAzure doesn't rebuild network-config after reboot
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
High
|
Unassigned |
Bug Description
After merge 365065 (commit 0dc3a77f4), when an Azure VM (previously provisioned via cloud-init) is rebooted, DataSourceAzure fails to recreate a NetworkConfig, with multiple exceptions raised and caught.
When the ds is restored from obj.pkl in the instance directory, self._network_
Related branches
- Server Team CI bot: Needs Fixing (continuous-integration)
- Ryan Harper: Approve
-
Diff: 2904 lines (+1300/-449)34 files modifiedcloudinit/cmd/main.py (+5/-4)
cloudinit/config/cc_ubuntu_advantage.py (+116/-109)
cloudinit/config/cc_ubuntu_drivers.py (+112/-0)
cloudinit/config/tests/test_ubuntu_advantage.py (+191/-156)
cloudinit/config/tests/test_ubuntu_drivers.py (+174/-0)
cloudinit/net/eni.py (+11/-5)
cloudinit/net/network_state.py (+33/-8)
cloudinit/net/sysconfig.py (+25/-9)
cloudinit/sources/DataSourceAzure.py (+168/-89)
cloudinit/sources/DataSourceEc2.py (+6/-2)
cloudinit/sources/DataSourceNoCloud.py (+3/-1)
cloudinit/sources/DataSourceScaleway.py (+2/-1)
cloudinit/sources/__init__.py (+3/-3)
cloudinit/sources/helpers/azure.py (+31/-0)
cloudinit/sources/tests/test_init.py (+15/-0)
cloudinit/util.py (+15/-0)
config/cloud.cfg.tmpl (+3/-0)
debian/changelog (+29/-0)
doc/rtd/topics/datasources/azure.rst (+35/-22)
doc/rtd/topics/datasources/nocloud.rst (+1/-1)
doc/rtd/topics/modules.rst (+1/-0)
tests/cloud_tests/testcases/modules/apt_pipelining_disable.yaml (+1/-2)
tests/cloud_tests/testcases/modules/apt_pipelining_os.py (+3/-3)
tests/cloud_tests/testcases/modules/apt_pipelining_os.yaml (+4/-5)
tests/data/azure/non_unicode_random_string (+1/-0)
tests/unittests/test_datasource/test_azure.py (+22/-2)
tests/unittests/test_datasource/test_nocloud.py (+42/-0)
tests/unittests/test_datasource/test_scaleway.py (+7/-0)
tests/unittests/test_distros/test_netconfig.py (+2/-0)
tests/unittests/test_ds_identify.py (+17/-0)
tests/unittests/test_handler/test_schema.py (+1/-0)
tests/unittests/test_net.py (+209/-15)
tools/ds-identify (+4/-3)
tox.ini (+8/-9)
- Ryan Harper: Approve
- Server Team CI bot: Approve (continuous-integration)
-
Diff: 13 lines (+1/-1)1 file modifiedcloudinit/sources/DataSourceAzure.py (+1/-1)
2019-04-03 21:17:42,117 - stages.py[INFO]: Applying network configuration from ds bringup=False: _unset python2. 7/site- packages/ cloudinit/ cmd/main. py", line 652, in status_wrapper python2. 7/site- packages/ cloudinit/ cmd/main. py", line 362, in main_init apply_network_ config( bring_up= bool(mode != sources. DSMODE_ LOCAL)) python2. 7/site- packages/ cloudinit/ stages. py", line 671, in apply_network_ config apply_network_ config( netcfg, bring_up=bring_up) python2. 7/site- packages/ cloudinit/ distros/ __init_ _.py", line 178, in apply_network_ config network_ config( netconfig) python2. 7/site- packages/ cloudinit/ distros/ rhel.py" , line 65, in _write_ network_ config _write_ network_ config( netconfig) python2. 7/site- packages/ cloudinit/ distros/ __init_ _.py", line 93, in _supported_ write_network_ config render_ network_ config( network_ config) python2. 7/site- packages/ cloudinit/ net/renderer. py", line 55, in render_ network_ config state=parse_ net_config_ data(network_ config) , python2. 7/site- packages/ cloudinit/ net/network_ state.py" , line 63, in parse_net_ config_ data get('version' )
2019-04-03 21:17:42,118 - __init__.py[DEBUG]: Selected renderer 'sysconfig' from priority list: None
2019-04-03 21:17:42,118 - util.py[WARNING]: failed stage init-local
2019-04-03 21:17:42,118 - util.py[DEBUG]: failed stage init-local
Traceback (most recent call last):
File "/usr/lib/
ret = functor(name, args)
File "/usr/lib/
init.
File "/usr/lib/
return self.distro.
File "/usr/lib/
dev_names = self._write_
File "/usr/lib/
return self._supported
File "/usr/lib/
renderer.
File "/usr/lib/
network_
File "/usr/lib/
version = net_config.
AttributeError: 'str' object has no attribute 'get'