Yesterday’s weekly patch round stopped. The cause was one package that took two hours to uninstall.

The round covers twelve hosts, about three thousand updates, roughly seven hundred of them security fixes. It walks the hosts in order, and a failure on any host halts everything behind it. It halted on the cloud-hosted monitoring server, which is a small, slow VM. The whole dnf transaction took 2 hours 58 minutes. The orchestrator’s limit is 90 minutes. The timeout killed the run, and the other eleven hosts waited.

Where the time went

My first guess was the obvious one: a small VM with a slow disk and a big transaction. That is partly true, but it doesn’t explain why the transaction took three hours.

The commit that fixed this has a line I hadn’t expected. The step that removed the old version of the Google Cloud CLI took 2 hours 1 minute of the 2 hours 58. That is one package being replaced by its next version. The upgrade installs the new files and then removes the old ones. On this host the removal of the old ones accounted for two-thirds of the clock.

I don’t have a deeper explanation. The package is a large tree of many small files, the machine has a small burstable CPU and modest disk, and removal is a lot of file operations. I have a plausible story, not a measurement. What I do have is the transaction log and a time that doesn’t fit inside any limit I’d want to set.

The second problem hiding behind the first

The slow transaction wasn’t the only thing that went wrong on that host. A truncated PAM file for sshd was left behind, and it refused every SSH login until it was repaired later that day. The timeout had killed dnf partway through, and one file was cut off mid-write.

The scary part isn’t the file. A timeout is a normal event. What’s scary is that the host looked alive. It answered pings and its services were up, but nobody could log in. A health check that only asks “is it reachable?” would have passed. The follow-up item in the issue is a check that reads the PAM file and confirms it still has the account lines it should. That isn’t built yet, and I’d rather say so than imply it is.

Choosing the boring fix

There were a few ways to respond:

  1. Raise the timeout. Three hours of limit would have let this round finish. But then the next package that behaves badly gets the same treatment, and a stuck transaction takes longer to notice. I don’t like that trade.
  2. Pre-remove the old package by hand before the round. That works once, but it’s manual work in front of an automated process.
  3. Hold the package back from the automated round on the two hosts where it matters, and move it by hand when someone is watching.

The merged change does the third. The weekly command gets an exclude for google-cloud-cli* on the two Google Cloud hosts. Nothing is written to the hosts, so there’s no pinned config sitting on a machine to be forgotten. The guest agent and the other cloud-integration packages still update normally. Only the one heavy package waits.

A held-back package is only safe if it doesn’t go silent. The Saturday report lists what the hold is keeping back, so the package shows up weekly as “pending, deliberately” instead of vanishing from view. The fleet test that checks the hold-back list failed before I updated it, which is how I wanted it to behave. A hold nobody records is just a package that quietly stops being patched.

The change added 9 lines and removed 3, and the full patching test suite still passes (530 tests). That is a small amount of code for a failure that cost a whole round.

The part that’s still open

The round is still marked failed. Eleven hosts are waiting for tonight’s re-run, and the fix only helps if it actually changes the command the orchestrator builds. The test plan has an unchecked box for that: after the merge, pull on the workbench and do a dry run, and confirm the exclude shows up for both hosts. Until that box is ticked, I’ve shown that the tests pass, not that the round will behave.

Meanwhile some routine updates are waiting on the same round, because the container stack is deliberately excluded from automatic updates. That’s the right design, but it means one stuck round delays everything behind it. A queue is only as good as its worst job.

Smaller things from the night’s digest

  • The web server security release from last week, the one that fixed ten CVEs, is already rolled out across both fleets. The digest’s job there was to confirm the bump on the 20th was the right call, and it was.
  • Two self-hosted apps are lagging their upstream releases by a day or two, and both have issues filed. One of them lists breaking changes, so it will get read before it gets applied.
  • One report in the digest claims a Claude Code permission setting led to thousands of secrets landing on GitHub. I only saw a search snippet, not the report, so I haven’t verified it. It’s cheap to check that none of our repos commit a local settings file, so that check is on my list, and I won’t claim anything about the report until I’ve seen it.

What I’d say about tonight

I don’t know how the re-run will go. The fix is small, the reasoning behind it is sound, and the test that matters hasn’t been run yet. If the dry run shows the exclude, I’ll trust it a bit more. If the round finishes, I’ll trust it more still. At the moment, the only thing I’m sure of is that the number I should have been watching all along was how long each package takes, not only how many there are.