Infrastructure

Patching 36 servers without unattended-upgrades

There are three doctrines: do nothing, automate everything blindly, or look first and then decide. We removed unattended-upgrades from the whole fleet and dismantled our own automatic patching with Ansible, in favour of a “visibility first” doctrine backed by PatchMon. Why, how, and the routine that goes with it.

Control tower overseeing rows of servers, each with its update status
Contents (4 sections)
  1. The problem with unattended-upgrades is not what it does, it is what it does not see
  2. An intermediate step: home-grown automation, and why we removed it too
  3. The current doctrine: PatchMon, look then decide
  4. The routine that makes patching boring (that is the point)

When it comes to security updates, a server fleet has only three possible doctrines. Do nothing, the most widespread and indefensible. Automate everything: unattended-upgrades everywhere, packages install themselves at night. Or look, then decide: continuous visibility on the state of each machine, and updates applied through a human decision backed by the right tools. We practised the second, then dismantled even our own home-grown automation to adopt the third. Here is why, and the complete setup.

The problem with unattended-upgrades is not what it does, it is what it does not see #

To be fair: on an isolated workstation or a personal server, unattended-upgrades is infinitely better than forgetting. Our objection applies to a production fleet: a patch is an untested change, applied at a time you do not choose, with no human to check the result. A service that restarts in the middle of the night and does not come back, a dependency that breaks an application, a fix requiring a full reboot left pending for weeks: blind automation turns every night into a deployment with nobody at the controls. And its failure is silent: the package that fails to install warns nobody, and the machine that is “up to date” in your mind drifts in reality. Across thirty machines with different roles, a random night-time outage costs more than the few days’ delay of a deliberate patch.

An intermediate step: home-grown automation, and why we removed it too #

Our first answer was centralised patching with Ansible: playbooks, a schedule, reports. Honest, but two structural flaws ended up weighing on it. First, no live inventory: between two runs, no idea of the fleet’s real state: how many fixes pending, where, since when. Second, the cron job patched without looking: the same blind automation, just written by us. The lesson: the problem was not the tool that applied the patches, it was the lack of permanent visibility between actions.

The current doctrine: PatchMon, look then decide #

Today, a lightweight agent on each of the 36 machines in the fleet reports continuously to a self-hosted (open-source) PatchMon instance: pending packages, security fixes, versions, history. The dashboard answers at any moment the question “where does the fleet stand?”, and patching becomes what it should always have been: an informed decision. From the same console, a patch run targets a machine or a group, at the chosen time, with its result recorded. More than eighty runs carried out to date, zero failures: not because the tool is magic, but because every run is done while watching.

The routine that makes patching boring (that is the point) #

  1. Look before: what is going to happen, which services are affected, will a service or machine restart be needed?
  2. Snapshot before any significant update: on a hypervisor, a machine snapshot costs a few seconds and turns the worst-case scenario into a five-minute rollback.
  3. Order of rollout: development environments and machines that do not matter first, production afterwards, never everything at once.
  4. Check after: the application health check: not “the package is installed” but “the service responds”. This is the step blind automation will never perform.
  5. Accepted exceptions: a major database version upgrade is a migration, not a patch: never automatic, never in a batch.

Visibility on the fleet, deliberate runs, snapshots before, checks after: that is the concrete content of our managed services. If your current answer is “unattended-upgrades and fingers crossed”, or worse “we will see later”, let us compare notes.

About
01/Read nextThree articles

Related articles

Infrastructure

Exploit foundries: your firewall has become the front line

Two undergraduates in Changsha ran an automated pipeline that decrypts firmware, decompiles it through thousands of calls, forms hypotheses about vulnerabilities, writes the exploit and tests it in a lab, in a loop, day and night. More than a dozen unknown vulnerabilities in a month on network devices, some fifty organisations targeted, thirteen collection agents on a scheduled task. What this means for an SME's inventory.

cybersecurityvulnerability
Infrastructure

Intermittent SERVFAIL: the orphaned DS record that broke 15% of lookups

A CI pipeline failing intermittently, two different error messages, an obvious suspect that had nothing to do with it, and an invisible cause: a DNSSEC record still published at the parent while the zone was no longer signed. Post-mortem of a nasty DNS failure, with the method that finally settled it.

dnssecdns
Infrastructure

Post-mortem of an NVMe failure: the dead capacitors that slowed everything down

For two and a half months, a hypervisor piled up replication timeouts without any disk being “dead”. The culprit: the Power Loss Protection capacitors of an NVMe drive, which had failed silently. A full post-mortem: from the symptom to smartctl, from the OVH replacement to the resilver that uncovered 20,000 latent errors.

nvmeplp

What next

Infrastructure that is managed and monitored day and night?

Bastion, SIEM, patches applied on purpose, tested backups: what we apply for our clients. First conversation free.

Discuss your project

Reply within 24 working hours, from one of the two founders. Or by phone: +33 7 59 96 14 99.