Closed blackboxsw closed 7 months ago
Downstream MR put up for Ubuntu https://bugs.launchpad.net/ubuntu/+source/needrestart/+bug/2059337 for discussion on this.
Downstream MR released in needrestart deb package version 3.6-7ubuntu4 for Ubuntu. This is not an issue in cloud-init specifically.
@blackboxsw thanks for working through this and getting this fixed in needsrestart!
Bug report
When #cloud-config userdata contains
package_upgrade: true
on debian-based environments, cloud-final.service runs apt-get dist-upgrade. On Ubuntu Noble needrestart may get involved and indicate that cloud-final.service is one of those services needing a restart.A forced restart of cloud-final.service will send a SIGTERM to the oneshot cloud-final.service and avoid to remaining configuration operations such as additional APT package installs on the system leaving cloud-init in a state where it hasn't fully performed all system configuration.
Tracebacks can be seen in /var/log/cloud-init.log representing this condition and cloud-init-output.log will represent that needrestart targets cloud-final.service.
Steps to reproduce the problem
Environment details
cloud-init logs
Provided above