We have encountered an issue on a system with a fresh installation of Ubuntu 22.04.5 LTS, where editing /etc/netplan/50-cloud-init.yaml and applying the changes with netplan apply does not persist after a reboot. After restarting the system, the network configuration reverts to the initial settings used during installation.
It appears that the contents of 50-cloud-init.yaml are being regenerated and overwritten upon each reboot. As a result, even if incorrect network settings were specified during installation, they are restored every time the system restarts. This makes it difficult to apply and retain changes such as bridge network configurations.
This behavior was not observed in previous versions (e.g., 22.04.1–22.04.4), so we suspect that a change in the behavior of cloud-init may have been introduced in this minor version update.
We would appreciate it if you could clarify whether this behavior is due to a specification change in cloud-init or provide guidance on how to prevent this regeneration from occurring.
Thank you for your attention, and we look forward to your response.