Following on from this thread, I'd like to hear how others handle security updates, especially on an HA pair.
My setup: two FS PBX nodes in an HA pair, Debian 12 (bookworm), FreeSWITCH built by the FS PBX installer, PostgreSQL 17 from the PGDG repo, PHP 8.1/8.5 from the third-party PHP repo.
What I found when I checked:
- Node A has unattended-upgrades running. It has been quietly installing things like imagemagick, apt and rsync (rsync went to 3.5.0, a big security release with behaviour changes).
- Node B never had unattended-upgrades installed. It is now 152 packages behind, including a kernel, nginx security fixes and the old rsync. It had been up 42 days.
- Because Node A only allows Debian origins, PHP and PostgreSQL (third-party repos) are NOT auto-updated. Only Debian packages are. So the two nodes have drifted apart without me noticing.
This is Node A's config (/etc/apt/apt.conf.d/50unattended-upgrades, comments removed):
Code:
Unattended-Upgrade::Origins-Pattern {
"origin=Debian,codename=${distro_codename},label=Debian";
"origin=Debian,codename=${distro_codename},label=Debian-Security";
"origin=Debian,codename=${distro_codename}-security,label=Debian-Security";
};
Unattended-Upgrade::Package-Blacklist {
};
Note the first line also lets point-release updates through, not just security fixes, and the blacklist is empty.
My worry with auto on a live HA node: some library updates (libc, libssl) can restart other services when they install, and if both nodes patch on the same night you could restart both at once. If I did go auto, I'd tighten it to something like this:
Code:
Unattended-Upgrade::Origins-Pattern {
"origin=Debian,codename=${distro_codename},label=Debian-Security";
"origin=Debian,codename=${distro_codename}-security,label=Debian-Security";
};
Unattended-Upgrade::Package-Blacklist {
"php";
"postgresql";
"keepalived";
};
Unattended-Upgrade::Automatic-Reboot "false";
(security-only, call-path packages excluded, no auto-reboot, and the two nodes set to patch on different days).
Questions for you:
1. Do you run unattended security updates, or do you only get notified and apply them by hand?
2. If you run an HA pair, do you stagger the nodes or patch the standby first and fail over?
3. Has anyone had an automatic update restart FreeSWITCH, PostgreSQL or keepalived at a bad moment?
4. Do you hold PHP and PostgreSQL the way suggested earlier in this thread, and if so how do you remember to patch them?
Thanks, curious what people actually do in production.