Repository navigation
Conversation
While a maintenance unit waits for the runner's job lock, its main process is flock. When an unattended upgrade replaces util-linux or libc6, needrestart flags the waiting unit and runs systemctl restart on it. That restart waits for the new start, the new start waits for the lock, and the upgrade run that holds the lock is an ancestor of needrestart, so nothing ends the wait. host now writes /etc/needrestart/conf.d/zz-bencher-quiet.conf, made from the list of maintenance units, which matches each unit by its exact name and defers its restart. A deferred restart costs nothing for these oneshot units, since the next run starts the new binaries. audit checks the file like every other file host writes.
It starts perl, which a Windows machine may lack. Also say which snippets the zz- prefix sorts after.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #1490.
While a maintenance unit waits for the runner's job lock, its main process is
flock. When an unattended upgrade replacesutil-linuxorlibc6, Ubuntu 24.04's needrestart flags the waiting unit and runssystemctl restarton it. That restart waits for the new start, the new start waits for the lock, and the upgrade run that holds the lock is an ancestor of needrestart, so nothing ends the wait.cargo ops hostnow writes/etc/needrestart/conf.d/zz-bencher-quiet.conf, made from the list of maintenance units, which matches each unit by its exact name and has needrestart defer its restart. A deferred restart costs nothing for these oneshot units, since the next run starts the new binaries.cargo ops auditchecks the file like every other filehostwrites.apt-daily.servicethat waits for the lock has the same problem, so the file follows the one list.hostwrites the file on a host without needrestart as well, where it does nothing, so a later install of needrestart is covered. needrestart reads its configuration on each run, so nothing reloads it.perlthe way needrestart does and checks that each unit is deferred by its exact name alone, that its timer and similar names are not, and that needrestart's own defaults stay.logrotate.servicehangs; with the file, needrestart defers it, exits 0, and logrotate finishes once the lock is free.