Merge ~chad.smith/ubuntu/+source/needrestart:lp-2059337-dont-autorestart-cloud-final into ubuntu/+source/needrestart:ubuntu/devel
Status: | Merged |
---|---|
Merged at revision: | b0b6a532481236954b72394bea4e9accf42250f6 |
Proposed branch: | ~chad.smith/ubuntu/+source/needrestart:lp-2059337-dont-autorestart-cloud-final |
Merge into: | ubuntu/+source/needrestart:ubuntu/devel |
Diff against target: |
59 lines (+37/-0) 3 files modified
debian/changelog (+8/-0) debian/patches/series (+1/-0) debian/patches/ubuntu-avoid-restart-cloud-final.patch (+28/-0) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Athos Ribeiro (community) | Approve | ||
Brett Holman (community) | Approve | ||
Simon Chopin | Pending | ||
Review via email: mp+463236@code.launchpad.net |
Description of the change
d/p/
Ensure needrestart skips automatic restart of cloud-init systemd
services representing the cloud-init boot stages:
- cloud-init-
- cloud-init.service
- cloud-config.
- cloud-final.service
A restart of these oneshot services may cause cloud-init to be unable to
setup apt repositories or install packages requested by cloud-init user-data.
Version 3.6-7ubuntu1 introduced a downstream change in behavior for Ubuntu
where needrestart will automatically restart services across
non-interactive apt-get dist-upgrade.
When cloud-init user-data provides both package_upgrade: true and requests
for either package installs or PPA setup, cloud-final.service will
call apt-get dist-upgrade in non-interactive mode and follow up with any
number of add-apt-repository or apt-get install commands. If cloud-init
is also a package being upgraded by dist-upgrade, needrestart to suggests that
the running cloud-final.service is a candidate for automatic restart.
This results in a SIGTERM to cloud-final.service that prevents the rest
of cloud-init's APT configuration from completing.
Given that /etc/cloud/
module to be configured to run in other boot stages, we need to skip
restart on any of the 4 cloud-init boot stage services mentioned above.
LP: #2059337
We need to skip the other cloud-init services as well.