0

I just discovered that this night both my mariadb server in cluster has been restarted by ap unattended upgrades. They are ubuntu 22.04 servers.

These servers are joined in a cluster and then I was lucky because the installation of the second server was delayed a bit and then the cluster stayed up.

Is there any way to delay upgrades by a couple of days from the package update availability? I was wondering if I can delay on of the two servers to avoid to upgrade both server at the same time/day.

Tobia
  • 1,426

1 Answers1

2

You can always modify apt-daily-upgrade.timer configuration (sudo systemctl edit apt-daily-upgrade.timer) to your needs and set it to run during different periods of time (e.g. days of the week in your case) on different nodes individually. See the documentation for systemd.timer OnCalendar and systemd.time Calendar Events

Alternatively, you can exclude mariadb packages from unattended-upgrades by modifying /etc/apt/apt.conf.d/50unattended-upgrades

Unattended-Upgrade::Package-Blacklist {
  "mariadb-server"
}

and disable automatic reboot

Unattended-Upgrade::Automatic-Reboot "false";

and monitor for /var/run/reboot-required and reboot manually.

AlexD
  • 11,191