[Cloud-init 18.5][CentOS 7 on vSphere] Crash when configuring static dual-stack (IPv4 + IPv6) networking
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
Medium
|
Ryan Harper |
Bug Description
Environment:
- Stock CentOS 7 image template (comes with OpenVM tools) with cloud-init 18.5 installed
- Single NIC VM
- vSphere 6.5 hypervisor
Repro steps:
- Customize the VM with a vSphere customization spec that has NIC setting with static IPv4 and IPv6 information
- OpenVM tools running inside guest will delegate guest customization to cloud-init
- Cloud-init crashes with ValueError: Unknown subnet type 'static6' found for interface 'ens192' . See the following relevant excerts and stacktrace (found in /var/log/
[...snip...]
2019-11-01 02:23:41,899 - DataSourceOVF.
2019-11-01 02:23:41,899 - config_
2019-11-01 02:23:41,900 - config_
2019-11-01 02:23:41,900 - config_
2019-11-01 02:23:41,900 - config_
2019-11-01 02:23:41,900 - config_
2019-11-01 02:23:41,900 - config_
2019-11-01 02:23:41,900 - config_
2019-11-01 02:23:41,900 - config_
2019-11-01 02:23:41,900 - config_
2019-11-01 02:23:41,902 - config_
2019-11-01 02:23:41,902 - config_
2019-11-01 02:23:41,902 - config_
2019-11-01 02:23:41,902 - config_
2019-11-01 02:23:41,902 - config_
2019-11-01 02:23:41,902 - config_
2019-11-01 02:23:41,902 - config_
2019-11-01 02:23:41,902 - config_
2019-11-01 02:23:41,903 - config_
2019-11-01 02:23:41,903 - config_
2019-11-01 02:23:41,903 - config_
2019-11-01 02:23:41,904 - config_
2019-11-01 02:23:41,904 - config_
2019-11-01 02:23:41,904 - config_
2019-11-01 02:23:41,904 - config_
2019-11-01 02:23:41,904 - config_
2019-11-01 02:23:41,904 - config_
2019-11-01 02:23:41,904 - DataSourceOVF.
2019-11-01 02:23:41,907 - util.py[DEBUG]: Running command ['ip', 'addr', 'show'] with allowed return codes [0] (shell=False, capture=True)
2019-11-01 02:23:41,926 - config_
2019-11-01 02:23:41,927 - config_
2019-11-01 02:23:41,927 - util.py[DEBUG]: Recursively deleting /var/run/vmware-imc
[...snip...]
2019-11-01 02:23:43,225 - stages.py[INFO]: Applying network configuration from ds bringup=False: {'version': 1, 'config': [{'subnets': [{'control': 'auto', 'netmask': '255.255.255.0', 'type': 'static', 'address': '1.1.1.4'}, {'netmask': '64', 'type': 'static6', 'address': '2600::10'}], 'type': 'physical', 'name': u'ens192', 'mac_address': '00:50:
2019-11-01 02:23:43,226 - __init__.py[DEBUG]: Selected renderer 'sysconfig' from priority list: None
2019-11-01 02:23:43,244 - util.py[WARNING]: failed stage init-local
2019-11-01 02:23:43,249 - 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/
templates=
File "/usr/lib/
templates=
File "/usr/lib/
cls.
File "/usr/lib/
cls.
File "/usr/lib/
iface_
ValueError: Unknown subnet type 'static6' found for interface 'ens192'
Related branches
- Ryan Harper: Needs Fixing
- Server Team CI bot: Needs Fixing (continuous-integration)
-
Diff: 66 lines (+30/-1)2 files modifiedcloudinit/net/eni.py (+2/-0)
tests/unittests/test_distros/test_netconfig.py (+28/-1)
Changed in cloud-init: | |
importance: | Undecided → Medium |
status: | New → Triaged |
Hi,
Thank you for triaging this bug.
It looks like the fix is pending, which is great.
Until the fix is makes it in, are there any known/reasonable and scalable workarounds for this? For example, can cloud-init be parameterized to run a script on boot (before networking is configured) and patch some files on the target system? Any other suggestions are welcome.
Thanks,
P.