Update consistency

I’ve two MiaB servers I’ve tried to keep identical (except for the domains they serve) and I keep updated as well as I can. When I update one, I update the other as well and reboot both. They only report being up to date for a few days, which is understandable, but what I cannot wrap my tiny head around is why they never report the same packages as upgradable. What am I missing?

Interesting question. Possible causes I can think of:

  • different vps providers having different images?
  • staggered updates from Ubuntu, not all servers get offered the same update at the same time
  • the package update process time is randomized, update might have become available inbetween.
1 Like

Not that one - I self-host on Proxmox VE and the two machiines VMs are even on the same host, in the same network segment running identical version of the Ubuntu 22.04.4 LTS.

Never heard about anything like that before. Microsoft and Apple, yes, but Ubuntu (not Pro) nope, as far as I can tell it’s a matter of what updates have propagated to the mirror you are using. Also as far as I can tell I am using the same local mirror to update from on both machines. It IS possible though that the mirror host is actually a load balanced set of machines that’s not all updated to the same extent. It would reek of really poor network and server design and my local mirrors are hosted either by one of the universities or by one of the oldest ISPs, so it would be a crying shame if neither of those two can design a proper repository mirror implementation. :slight_smile:

Are you guessing might be randomised or stating it is based on facts?

I’ve observed this pattern of behaviour for a long time now, eer since I first installed the second server. That’s why I’ve taken to make sure I do the same to both at the same time. That’s why when I had to move them to a different host I sat with two terminal windows next to each other and ran each damn command in both at the same time. Nothing made the slightest difference.

What I did notice though, is that the email I get after each morning’s check everything cron job if there’s a change from the previous day’s never arrives at the same time from both. Like the actual cron job is scheduled to run at some randomised time after the actual scheduled time. Which reminds me, I really should go and make triple sure both machines have NTP configured and update from the same URL (at least, even if the files are served from different sources at the same time).

It’s actually called phased updates.

Not guessing. If you look at the timer sudo systemctl show apt-daily.timer there is RandomizedDelayUSec which delays a random delay after the configured times.

This reminds me of another one. At installation, the mailinabox cron job gets a random minute assigned, such that it runs between 3:00 and 3:59. Compare /etc/cron.d/mailinabox-nightly

Now I know.

RandomizedDelayUSec=12h

That’s quite a window.

By coincidence mine randomly ended up so close to each other that the time variance could have been explained by how long the updates took to run.

It’s quite clear that a huge amount of effort has gone into spreading the network load and risk of breaking changes disrupting operational servers resulting in wide-spread panic and update storms that would overwhelm not only the people having to fix it but also networks and servers. Given all that, it’s actually more interesting that I was able to see any commonality between the two servers at all.

Thank you @KiekerJan, you really helped me come to grips with the forces at play which makes good sense in the bigger picture but never made it onto my radar as a problem domain Canonical could be bothered to consider.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.