This bug is believed to be fixed in cloud-init in version 22.1. If this is still a problem for you, please make a comment and set the state back to New
Thank you. ** Changed in: cloud-init Status: Fix Committed => Fix Released -- 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/1949407 Title: crash in cloud-init when using set-name on networkd renderer Status in cloud-init: Fix Released Bug description: When using set-name with a networkd renderer, we are hitting the following crash: Traceback (most recent call last): File "/usr/lib/python3.7/site-packages/cloudinit/cmd/main.py", line 682, in status_wrapper ret = functor(name, args) File "/usr/lib/python3.7/site-packages/cloudinit/cmd/main.py", line 391, in main_init init.apply_network_config(bring_up=bool(mode != sources.DSMODE_LOCAL)) File "/usr/lib/python3.7/site-packages/cloudinit/stages.py", line 825, in apply_network_config netcfg, bring_up=bring_up) File "/usr/lib/python3.7/site-packages/cloudinit/distros/__init__.py", line 222, in apply_network_config self._write_network_state(network_state) File "/usr/lib/python3.7/site-packages/cloudinit/distros/__init__.py", line 125, in _write_network_state renderer.render_network_state(network_state) File "/usr/lib/python3.7/site-packages/cloudinit/net/networkd.py", line 220, in render_network_state ret_dict = self._render_content(network_state) File "/usr/lib/python3.7/site-packages/cloudinit/net/networkd.py", line 245, in _render_content self.dhcp_domain(ns.config['ethernets'][name], cfg) KeyError: 'eth0' 1. Tell us your cloud provider DataSourceVMware 2. Any appropriate cloud-init configuration you can provide us instance-id: "management-appliance-control-plane-0" local-hostname: "management-appliance-control-plane-0" wait-on-network: ipv4: false ipv6: false network: version: 2 ethernets: id0: match: macaddress: "00:50:56:9d:14:42" set-name: "eth0" wakeonlan: true addresses: - "192.168.20.30/24" gateway4: "192.168.20.1" nameservers: addresses: - "127.0.0.53" - "" - "" 3. Perform the following on the system and attach it to this bug: Attached is the output of cloud-init collect-logs To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1949407/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp