I'm marking this bug as Invalid. cloud-init is working as expected for NoCloud datasource. Changes to the network-config during execution can't affect cloud-inits behavior during boot with the NoCloud datasource.
** Changed in: cloud-init Status: New => Invalid -- 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/1925454 Title: Update Ubuntu 20.04 default network-config by cloud-config Status in cloud-init: Invalid Bug description: This is a follow-up on the case https://bugs.launchpad.net/cloud- init/+bug/1924922 I cannot update default Ubuntu network-config by writing user-data file in cloud-config. Attached are logs. Below is a snippet from the cloud-config #cloud-config write_files: - path: /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg permissions: '0644' content: | network: config: disabled - path: /etc/netplan/50-cloud-init.yaml permissions: '0644' content: | network: version: 2 ethernets: eth0: dhcp4: true addresses: - 192.168.53.3/26 gateway4: 192.168.53.62 nameservers: addresses: - 1.1.1.1 - 8.8.8.8 runcmd: - [sudo, netplan, try] - [sudo, netplan, generate] - [sudo, netplan, apply] power_state: mode: 'reboot' message: 'reboot triggered by cloud-init' ----- Result is such that the hardcoded network-config ('optional': True, not waiting for DHCP server) is attached/generated with IP as, for an example - 192.168.53.4, not the IP I really want 192.168.53.3. This leads to couple of problems, one as specified in bug/1924922, that ssh_import_id is not working (for the time is not sync up) Is there a way to overwrite this default with user-data, and not to go to the config partition and manually change it? To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1925454/+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