:) Thanks again David for the context on your immediate workarounds you
would pursue here in the meantime while needrestart folks determine best
course of action for Ubuntu.

While I think one solution could be hard-appending all critical or
oneshot services of the world into upstream's ex/needrestart.conf,  just
like my linked Merge request suggested for ubuntu downstream, it's
probably better to pursue individual packages delivering their own
supplemental /etc/needrstart/conf.d/<pkg>.conf as you alluded to.

I had a hard time understanding how to use /etc/needrestart/conf.d but
happened upon
https://github.com/liske/needrestart/issues/184#issuecomment-650402676
which explained pushing another element onto the default config's
$nrconfi{nblacklist_interp} array.

It was a small step further for cloud-init to deliver a file to
/etc/needrestart/config/cloud-init.conf with the content:

# Add a needrestart skip for cloud-final.service across APT upgrade operations.
# This avoids SIGTERMs disrupting cloud-init before it is able to install
# packages and/or setup PPAs. LP: #2059337
$nrconf{override_rc}->{qr(^cloud-final\.service$)} = 0;


Just tested and that this ensures cloud-final.service will be skipped instead 
of autorestarted anytime it happens to be running as needrestart is invoked. 
Then we can allow Ubuntu's needrestart definitions of default behavior get 
sorted separately than the cloud-init specific issue. And cloud-init doesn't 
necessarily have to await either a downstream ubuntu fix for needrestart 
auto-restarting or upstream's default ex/needrestart.conf changes. 

** Bug watch added: github.com/liske/needrestart/issues #184
   https://github.com/liske/needrestart/issues/184

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2059337

Title:
  noble: needrestart triggering SIGTERM of cloud-final.service
  preventing apt packages from being installed when cloud-init is also
  being upgraded

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/2059337/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to