Comment 0 for bug 2034656

Revision history for this message
Haw Loeung (hloeung) wrote : Update Ubuntu ESM cache only once daily?

Hi,

We're seeing frequent alerts on the Ubuntu ESM archive servers due to surges in requests. On two systems, I'm seeing this:

| Sep 6 05:47:16 machine-2 systemd[1]: Starting Update the local ESM caches...
| Sep 6 05:47:17 machine-2 systemd[1]: Finished Update the local ESM caches.
| Sep 6 10:49:35 machine-2 systemd[1]: Starting Update the local ESM caches...
| Sep 6 10:49:35 machine-2 systemd[1]: Finished Update the local ESM caches.
| Sep 6 17:17:16 machine-2 systemd[1]: Starting Update the local ESM caches...
| Sep 6 17:17:17 machine-2 systemd[1]: Finished Update the local ESM caches.
| Sep 6 23:47:16 machine-2 systemd[1]: Starting Update the local ESM caches...
| Sep 6 23:47:17 machine-2 systemd[1]: Finished Update the local ESM caches.
| Sep 7 01:55:02 machine-2 systemd[1]: Starting Update the local ESM caches...
| Sep 7 01:55:02 machine-2 systemd[1]: Finished Update the local ESM caches.

On another:

| Sep 6 02:41:02 is-bastion-ps5 systemd[1]: Starting Update the local ESM caches...
| Sep 6 02:41:03 is-bastion-ps5 systemd[1]: Finished Update the local ESM caches.
| Sep 6 09:02:40 is-bastion-ps5 systemd[1]: Starting Update the local ESM caches...
| Sep 6 09:02:41 is-bastion-ps5 systemd[1]: Finished Update the local ESM caches.
| Sep 6 15:32:40 is-bastion-ps5 systemd[1]: Starting Update the local ESM caches...
| Sep 6 15:32:41 is-bastion-ps5 systemd[1]: Finished Update the local ESM caches.
| Sep 6 22:02:40 is-bastion-ps5 systemd[1]: Starting Update the local ESM caches...
| Sep 6 22:02:41 is-bastion-ps5 systemd[1]: Finished Update the local ESM caches.
| Sep 7 04:32:40 is-bastion-ps5 systemd[1]: Starting Update the local ESM caches...
| Sep 7 04:32:42 is-bastion-ps5 systemd[1]: Finished Update the local ESM caches.

This is all from `/usr/lib/systemd/system/esm-cache.service` which calls `/usr/lib/ubuntu-advantage/esm_cache.py`.

Can we please have this run less frequent? Perhaps only once daily which aligns with APT and apt-daily-upgrade.service / unattended-upgrades?

Perhaps check existence of a file and run if not, then age of that same file and only run if it's older than a day?