-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
random_sleep is ignored on machines using systemd #175
Comments
can someone confirm if this is the same for Ubuntu? |
The upstream bug I opened. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=965997 I'm 90% sure this is also the case on Ubuntu, as the main apt dev also does a lot of Ubuntu work :) |
The benefit of letting systemd do this is that you don't have a process just sleeping for some time. Instead, systemd will spawn the process at some time. To modify this, you would indeed need a systemd drop in. |
mumbles something about augeas |
That's IMHO a bad idea. You don't want to modify |
All in all, this should really be fixed in apt, everything else is a hot glue patch. That doesn't mean people using this module shouldn't be aware of the issue though :) Temporarily deprecating |
I think short term it's sufficient to change the parameter documentation to mention it's only effective on non-systemd systems, linking to the upstream bug. |
Well, the apt upstream closed the bug report with a Upstream says:
From that I understand we should be replacing |
No, this is not what a systemd drop-in is. You can easily see how it works by running [Timer]
RandomizedDelaySec=8h Then you can run See man systemd.unit https://github.com/camptocamp/puppet-systemd/blob/master/manifests/dropin_file.pp would be a type that easily allows you to create one. |
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=965997 was closed and also says a systemd drop in is the right way to go. |
I'm not sure I understand the issue here: is it that:
I am not sure why you'd need to change that parameter in the first place, in any case, so I'm genuinely curious about the use case here. |
@anarcat This is a pretty old issue, but the use case is not to have systems update at a random time and instead run u-u at the same time. This simplifies planned reboots for me, as I can be sure all the systems I manage have been upgraded when time comes to reboot them (instead of having them upgrade at different times). As per the issue:
|
On 2023-12-15 10:57:17, Louis-Philippe Véronneau wrote:
the use case is not to have systems update at a random time and instead run u-u at the same time
[...]
See, I'm not sure that's a good idea in the first place. We don't *want*
to have fleets all checking in at the same time, that's a bad idea for
numerous reasons, the first of which is overload on the mirror network,
but it also makes your systems possibly more brittle, as a botched
upgrade will scrap the entire fleet...
As per the issue:
1. It would be nice to be able to do that yes. That would require
systemd drop-ins.
But does that need to be in this module? You could deploy that drop-in
yourself...
2. This parameter is currently deprecated (at least, for all systems using systemd...) but the documentation doesn't reflect this.
That, on the other hand, seem like something that should be fixed. :)
|
Hi!
It seems that on Debian machines running systemd (at least on Debian Buster), the
random_sleep
parameter is ignored.Indeed, apt transitioned from a cronjob to a systemd timer.
/etc/cron.daily/apt-compat
now starts with:This means the cronjob exits if systemd is running. If that's the case, the machine uses
/lib/systemd/system/apt-daily.timer
instead to manage automated updates. On Buster, this file looks like:It also seems
RandomizedDelaySec
is hard coded. I don't see a bug on apt for this issue, but I'll open one shortly.To fix this issue, this module would need to modify the timer using the value passed to
random_sleep
and reload systemd daemons.Cheers,
The text was updated successfully, but these errors were encountered: