In foundations leadership sync on this today. I believe we determined that the best course of action we should take at the moment is to pursue an Ubuntu downstream needrestart patch to register cloud-init system services as skipped during automatic restarts when apt commands are run in non-interactive mode as it would break the rest of cloud-init configuration being performed by that boot stage.
We also would prefer to avoid each package maintainer having to extend the $nrconf{override_rc} for their systemd services as those behaviors would be better advertized and maintained in the ubuntu downstream package needrestart.conf as a single-source of truth for "automated restart skips"
In foundations leadership sync on this today. I believe we determined that the best course of action we should take at the moment is to pursue an Ubuntu downstream needrestart patch to register cloud-init system services as skipped during automatic restarts when apt commands are run in non-interactive mode as it would break the rest of cloud-init configuration being performed by that boot stage.
We also would prefer to avoid each package maintainer having to extend the $nrconf{ override_ rc} for their systemd services as those behaviors would be better advertized and maintained in the ubuntu downstream package needrestart.conf as a single-source of truth for "automated restart skips"
As a result, I've closed https:/ /github. com/canonical/ cloud-init/ pull/5111 as we will not package our own restart skip extensions/ overrides in cloud-init deb.