Ubuntu 16.04: Unattended-upgrades runs at random times

Multi tool use
I have configured unattended-upgrades to install security packages and notify by mail when it does so.
I have noticed that the installation happens at very random times. I know that the latest versions added a random delay up to 30 minutes starting from the cron.daily execution time.
However the delays I am experiencing are much bigger than that. I see unattended-upgrades executing at 9am, 3pm, 12am... The logs show the same, so it is not just the email delivery that takes longer.
The unattended upgrades task is the first one in cron.daily, meaning that there is no previous task with huge execution times.
Anybody experienced a similar thing?
16.04 cron unattended-upgrades
add a comment |
I have configured unattended-upgrades to install security packages and notify by mail when it does so.
I have noticed that the installation happens at very random times. I know that the latest versions added a random delay up to 30 minutes starting from the cron.daily execution time.
However the delays I am experiencing are much bigger than that. I see unattended-upgrades executing at 9am, 3pm, 12am... The logs show the same, so it is not just the email delivery that takes longer.
The unattended upgrades task is the first one in cron.daily, meaning that there is no previous task with huge execution times.
Anybody experienced a similar thing?
16.04 cron unattended-upgrades
The random behavior is deliberate - to smooth out demand instead of millions of systems hammering a few mirrors at the same times each day. Ordinary desktop users should not notice the behavior at all. Some enterprise users way wish to change the behavior to something a bit more predictable, and are certainly welcome to do so.
– user535733
Feb 5 at 13:50
Yes, the reason behind this choice is clear. It is just that this behavior is unacceptable for production systems. At the time i asked this question, this behavior (and the fix) was not documented anywhere
– daniel f.
Feb 5 at 14:06
add a comment |
I have configured unattended-upgrades to install security packages and notify by mail when it does so.
I have noticed that the installation happens at very random times. I know that the latest versions added a random delay up to 30 minutes starting from the cron.daily execution time.
However the delays I am experiencing are much bigger than that. I see unattended-upgrades executing at 9am, 3pm, 12am... The logs show the same, so it is not just the email delivery that takes longer.
The unattended upgrades task is the first one in cron.daily, meaning that there is no previous task with huge execution times.
Anybody experienced a similar thing?
16.04 cron unattended-upgrades
I have configured unattended-upgrades to install security packages and notify by mail when it does so.
I have noticed that the installation happens at very random times. I know that the latest versions added a random delay up to 30 minutes starting from the cron.daily execution time.
However the delays I am experiencing are much bigger than that. I see unattended-upgrades executing at 9am, 3pm, 12am... The logs show the same, so it is not just the email delivery that takes longer.
The unattended upgrades task is the first one in cron.daily, meaning that there is no previous task with huge execution times.
Anybody experienced a similar thing?
16.04 cron unattended-upgrades
16.04 cron unattended-upgrades
asked Sep 14 '16 at 8:06
daniel f.daniel f.
366313
366313
The random behavior is deliberate - to smooth out demand instead of millions of systems hammering a few mirrors at the same times each day. Ordinary desktop users should not notice the behavior at all. Some enterprise users way wish to change the behavior to something a bit more predictable, and are certainly welcome to do so.
– user535733
Feb 5 at 13:50
Yes, the reason behind this choice is clear. It is just that this behavior is unacceptable for production systems. At the time i asked this question, this behavior (and the fix) was not documented anywhere
– daniel f.
Feb 5 at 14:06
add a comment |
The random behavior is deliberate - to smooth out demand instead of millions of systems hammering a few mirrors at the same times each day. Ordinary desktop users should not notice the behavior at all. Some enterprise users way wish to change the behavior to something a bit more predictable, and are certainly welcome to do so.
– user535733
Feb 5 at 13:50
Yes, the reason behind this choice is clear. It is just that this behavior is unacceptable for production systems. At the time i asked this question, this behavior (and the fix) was not documented anywhere
– daniel f.
Feb 5 at 14:06
The random behavior is deliberate - to smooth out demand instead of millions of systems hammering a few mirrors at the same times each day. Ordinary desktop users should not notice the behavior at all. Some enterprise users way wish to change the behavior to something a bit more predictable, and are certainly welcome to do so.
– user535733
Feb 5 at 13:50
The random behavior is deliberate - to smooth out demand instead of millions of systems hammering a few mirrors at the same times each day. Ordinary desktop users should not notice the behavior at all. Some enterprise users way wish to change the behavior to something a bit more predictable, and are certainly welcome to do so.
– user535733
Feb 5 at 13:50
Yes, the reason behind this choice is clear. It is just that this behavior is unacceptable for production systems. At the time i asked this question, this behavior (and the fix) was not documented anywhere
– daniel f.
Feb 5 at 14:06
Yes, the reason behind this choice is clear. It is just that this behavior is unacceptable for production systems. At the time i asked this question, this behavior (and the fix) was not documented anywhere
– daniel f.
Feb 5 at 14:06
add a comment |
3 Answers
3
active
oldest
votes
After debugging this I found the solution.
The root cause of this issue resides in the fact that under Ubuntu 16.04 and newer, unattended-upgrades uses systemd - not cron - to schedule the updates with a huge randomized delay:
/lib/systemd/system/apt-daily.timer
is configured with
OnCalendar=*-*-* 6,18:00
RandomizedDelaySec=12h
This means that it will run twice a day, at 6:00 and 18:00, with a random delay of up to 12 hours. As this is not always acceptable for production environments, I had to override these settings.
In order to keep the package config files untouched, I defined my override in /etc/systemd/system/apt-daily.timer.d/override.conf
(I had to create the folder and file).
There I set
[Timer]
OnCalendar=
OnCalendar=06:00
RandomizedDelaySec=1h
to have unattended-upgrades run at 6:00 plus a random delay of up to an hour.
Then I simply restarted the timer with systemctl restart apt-daily.timer
(eventually need to reload the daemon).
Unattended-updates now runs at predictable times again!
Edit:
It would seem as if for Ubuntu 18.04 things changed a bit. The override should now be stored in /etc/systemd/system/apt-daily-upgrade.timer.d/override.conf
and look like this:
[Timer]
OnCalendar=*-*-* 6:00
RandomizedDelaySec=1h
Why do you clear OnCalendar first?
– jarno
Dec 14 '16 at 10:15
1
Because otherwise it would only ADD a new timer at 6am, leaving the existing one as well. Since I want unattended-upgrades to ONLY run at 6, I need to clear the schedule first.
– daniel f.
Dec 14 '16 at 10:19
I added "OnBootSec=5min" to enable running after boot as well, but it did not work. (also added OnUnitActiveSec=12h so that it is not run too frequently.)
– jarno
Dec 14 '16 at 15:09
systemd, or rather, the systemd mindset, strikes again. I may have to rethink upgrading to Xenial Xerus in production after this gem bit me.
– Joe
Jan 11 '17 at 11:30
1
@daniel f. I have an apt-daily.timer file in /lib/systemd/system/ as well as one in /etc/systemd/system/timers.target.wants/ However I don't have any in /etc/systemd/system/ itself like you. Would you know if I should be creating the apt-daily.timer.d directory and the override.conf under /lib/systemd/system instead? All advice gratefully recd with thx.
– Purvez
Apr 27 '17 at 10:24
|
show 1 more comment
The official debian documentation on https://wiki.debian.org/UnattendedUpgrades currently has a mistake in it that is misleading a lot of people.
It claims that you can override the upgrade time by creating a file called
/etc/systemd/system/apt-daily-upgrade.d/override.conf
However the correct path is
/etc/systemd/system/apt-daily-upgrade.timer.d/override.conf
1
Nice finding. IMHO the safest thing is to usesudo systemctl edit apt-daily.timer
. This will open an editor with the correct drop-in file.
– PerlDuck
Feb 5 at 10:39
1
Thank you PerlDuck, I edited the Debian Wiki page with your suggestion
– Rolf Wojtech
Feb 5 at 12:45
add a comment |
I tried Daniel's solution but the upgrade still ran at the wrong times. Turned out there two systemd overrides that are needed:
Used for downloads
/lib/systemd/system/apt-daily.timer - override with /etc/systemd/system/apt-daily.timer.d/override.conf
Used for upgrading
/lib/systemd/system/apt-daily-upgrade.timer - override with /etc/systemd/system/apt-daily-upgrade.timer.d/override.conf
1
Which version are you on? So you had to override both mentioned timers at the same time?
– daniel f.
Jan 23 at 7:48
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f824718%2fubuntu-16-04-unattended-upgrades-runs-at-random-times%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
After debugging this I found the solution.
The root cause of this issue resides in the fact that under Ubuntu 16.04 and newer, unattended-upgrades uses systemd - not cron - to schedule the updates with a huge randomized delay:
/lib/systemd/system/apt-daily.timer
is configured with
OnCalendar=*-*-* 6,18:00
RandomizedDelaySec=12h
This means that it will run twice a day, at 6:00 and 18:00, with a random delay of up to 12 hours. As this is not always acceptable for production environments, I had to override these settings.
In order to keep the package config files untouched, I defined my override in /etc/systemd/system/apt-daily.timer.d/override.conf
(I had to create the folder and file).
There I set
[Timer]
OnCalendar=
OnCalendar=06:00
RandomizedDelaySec=1h
to have unattended-upgrades run at 6:00 plus a random delay of up to an hour.
Then I simply restarted the timer with systemctl restart apt-daily.timer
(eventually need to reload the daemon).
Unattended-updates now runs at predictable times again!
Edit:
It would seem as if for Ubuntu 18.04 things changed a bit. The override should now be stored in /etc/systemd/system/apt-daily-upgrade.timer.d/override.conf
and look like this:
[Timer]
OnCalendar=*-*-* 6:00
RandomizedDelaySec=1h
Why do you clear OnCalendar first?
– jarno
Dec 14 '16 at 10:15
1
Because otherwise it would only ADD a new timer at 6am, leaving the existing one as well. Since I want unattended-upgrades to ONLY run at 6, I need to clear the schedule first.
– daniel f.
Dec 14 '16 at 10:19
I added "OnBootSec=5min" to enable running after boot as well, but it did not work. (also added OnUnitActiveSec=12h so that it is not run too frequently.)
– jarno
Dec 14 '16 at 15:09
systemd, or rather, the systemd mindset, strikes again. I may have to rethink upgrading to Xenial Xerus in production after this gem bit me.
– Joe
Jan 11 '17 at 11:30
1
@daniel f. I have an apt-daily.timer file in /lib/systemd/system/ as well as one in /etc/systemd/system/timers.target.wants/ However I don't have any in /etc/systemd/system/ itself like you. Would you know if I should be creating the apt-daily.timer.d directory and the override.conf under /lib/systemd/system instead? All advice gratefully recd with thx.
– Purvez
Apr 27 '17 at 10:24
|
show 1 more comment
After debugging this I found the solution.
The root cause of this issue resides in the fact that under Ubuntu 16.04 and newer, unattended-upgrades uses systemd - not cron - to schedule the updates with a huge randomized delay:
/lib/systemd/system/apt-daily.timer
is configured with
OnCalendar=*-*-* 6,18:00
RandomizedDelaySec=12h
This means that it will run twice a day, at 6:00 and 18:00, with a random delay of up to 12 hours. As this is not always acceptable for production environments, I had to override these settings.
In order to keep the package config files untouched, I defined my override in /etc/systemd/system/apt-daily.timer.d/override.conf
(I had to create the folder and file).
There I set
[Timer]
OnCalendar=
OnCalendar=06:00
RandomizedDelaySec=1h
to have unattended-upgrades run at 6:00 plus a random delay of up to an hour.
Then I simply restarted the timer with systemctl restart apt-daily.timer
(eventually need to reload the daemon).
Unattended-updates now runs at predictable times again!
Edit:
It would seem as if for Ubuntu 18.04 things changed a bit. The override should now be stored in /etc/systemd/system/apt-daily-upgrade.timer.d/override.conf
and look like this:
[Timer]
OnCalendar=*-*-* 6:00
RandomizedDelaySec=1h
Why do you clear OnCalendar first?
– jarno
Dec 14 '16 at 10:15
1
Because otherwise it would only ADD a new timer at 6am, leaving the existing one as well. Since I want unattended-upgrades to ONLY run at 6, I need to clear the schedule first.
– daniel f.
Dec 14 '16 at 10:19
I added "OnBootSec=5min" to enable running after boot as well, but it did not work. (also added OnUnitActiveSec=12h so that it is not run too frequently.)
– jarno
Dec 14 '16 at 15:09
systemd, or rather, the systemd mindset, strikes again. I may have to rethink upgrading to Xenial Xerus in production after this gem bit me.
– Joe
Jan 11 '17 at 11:30
1
@daniel f. I have an apt-daily.timer file in /lib/systemd/system/ as well as one in /etc/systemd/system/timers.target.wants/ However I don't have any in /etc/systemd/system/ itself like you. Would you know if I should be creating the apt-daily.timer.d directory and the override.conf under /lib/systemd/system instead? All advice gratefully recd with thx.
– Purvez
Apr 27 '17 at 10:24
|
show 1 more comment
After debugging this I found the solution.
The root cause of this issue resides in the fact that under Ubuntu 16.04 and newer, unattended-upgrades uses systemd - not cron - to schedule the updates with a huge randomized delay:
/lib/systemd/system/apt-daily.timer
is configured with
OnCalendar=*-*-* 6,18:00
RandomizedDelaySec=12h
This means that it will run twice a day, at 6:00 and 18:00, with a random delay of up to 12 hours. As this is not always acceptable for production environments, I had to override these settings.
In order to keep the package config files untouched, I defined my override in /etc/systemd/system/apt-daily.timer.d/override.conf
(I had to create the folder and file).
There I set
[Timer]
OnCalendar=
OnCalendar=06:00
RandomizedDelaySec=1h
to have unattended-upgrades run at 6:00 plus a random delay of up to an hour.
Then I simply restarted the timer with systemctl restart apt-daily.timer
(eventually need to reload the daemon).
Unattended-updates now runs at predictable times again!
Edit:
It would seem as if for Ubuntu 18.04 things changed a bit. The override should now be stored in /etc/systemd/system/apt-daily-upgrade.timer.d/override.conf
and look like this:
[Timer]
OnCalendar=*-*-* 6:00
RandomizedDelaySec=1h
After debugging this I found the solution.
The root cause of this issue resides in the fact that under Ubuntu 16.04 and newer, unattended-upgrades uses systemd - not cron - to schedule the updates with a huge randomized delay:
/lib/systemd/system/apt-daily.timer
is configured with
OnCalendar=*-*-* 6,18:00
RandomizedDelaySec=12h
This means that it will run twice a day, at 6:00 and 18:00, with a random delay of up to 12 hours. As this is not always acceptable for production environments, I had to override these settings.
In order to keep the package config files untouched, I defined my override in /etc/systemd/system/apt-daily.timer.d/override.conf
(I had to create the folder and file).
There I set
[Timer]
OnCalendar=
OnCalendar=06:00
RandomizedDelaySec=1h
to have unattended-upgrades run at 6:00 plus a random delay of up to an hour.
Then I simply restarted the timer with systemctl restart apt-daily.timer
(eventually need to reload the daemon).
Unattended-updates now runs at predictable times again!
Edit:
It would seem as if for Ubuntu 18.04 things changed a bit. The override should now be stored in /etc/systemd/system/apt-daily-upgrade.timer.d/override.conf
and look like this:
[Timer]
OnCalendar=*-*-* 6:00
RandomizedDelaySec=1h
edited Aug 20 '18 at 10:19
answered Sep 29 '16 at 13:59
daniel f.daniel f.
366313
366313
Why do you clear OnCalendar first?
– jarno
Dec 14 '16 at 10:15
1
Because otherwise it would only ADD a new timer at 6am, leaving the existing one as well. Since I want unattended-upgrades to ONLY run at 6, I need to clear the schedule first.
– daniel f.
Dec 14 '16 at 10:19
I added "OnBootSec=5min" to enable running after boot as well, but it did not work. (also added OnUnitActiveSec=12h so that it is not run too frequently.)
– jarno
Dec 14 '16 at 15:09
systemd, or rather, the systemd mindset, strikes again. I may have to rethink upgrading to Xenial Xerus in production after this gem bit me.
– Joe
Jan 11 '17 at 11:30
1
@daniel f. I have an apt-daily.timer file in /lib/systemd/system/ as well as one in /etc/systemd/system/timers.target.wants/ However I don't have any in /etc/systemd/system/ itself like you. Would you know if I should be creating the apt-daily.timer.d directory and the override.conf under /lib/systemd/system instead? All advice gratefully recd with thx.
– Purvez
Apr 27 '17 at 10:24
|
show 1 more comment
Why do you clear OnCalendar first?
– jarno
Dec 14 '16 at 10:15
1
Because otherwise it would only ADD a new timer at 6am, leaving the existing one as well. Since I want unattended-upgrades to ONLY run at 6, I need to clear the schedule first.
– daniel f.
Dec 14 '16 at 10:19
I added "OnBootSec=5min" to enable running after boot as well, but it did not work. (also added OnUnitActiveSec=12h so that it is not run too frequently.)
– jarno
Dec 14 '16 at 15:09
systemd, or rather, the systemd mindset, strikes again. I may have to rethink upgrading to Xenial Xerus in production after this gem bit me.
– Joe
Jan 11 '17 at 11:30
1
@daniel f. I have an apt-daily.timer file in /lib/systemd/system/ as well as one in /etc/systemd/system/timers.target.wants/ However I don't have any in /etc/systemd/system/ itself like you. Would you know if I should be creating the apt-daily.timer.d directory and the override.conf under /lib/systemd/system instead? All advice gratefully recd with thx.
– Purvez
Apr 27 '17 at 10:24
Why do you clear OnCalendar first?
– jarno
Dec 14 '16 at 10:15
Why do you clear OnCalendar first?
– jarno
Dec 14 '16 at 10:15
1
1
Because otherwise it would only ADD a new timer at 6am, leaving the existing one as well. Since I want unattended-upgrades to ONLY run at 6, I need to clear the schedule first.
– daniel f.
Dec 14 '16 at 10:19
Because otherwise it would only ADD a new timer at 6am, leaving the existing one as well. Since I want unattended-upgrades to ONLY run at 6, I need to clear the schedule first.
– daniel f.
Dec 14 '16 at 10:19
I added "OnBootSec=5min" to enable running after boot as well, but it did not work. (also added OnUnitActiveSec=12h so that it is not run too frequently.)
– jarno
Dec 14 '16 at 15:09
I added "OnBootSec=5min" to enable running after boot as well, but it did not work. (also added OnUnitActiveSec=12h so that it is not run too frequently.)
– jarno
Dec 14 '16 at 15:09
systemd, or rather, the systemd mindset, strikes again. I may have to rethink upgrading to Xenial Xerus in production after this gem bit me.
– Joe
Jan 11 '17 at 11:30
systemd, or rather, the systemd mindset, strikes again. I may have to rethink upgrading to Xenial Xerus in production after this gem bit me.
– Joe
Jan 11 '17 at 11:30
1
1
@daniel f. I have an apt-daily.timer file in /lib/systemd/system/ as well as one in /etc/systemd/system/timers.target.wants/ However I don't have any in /etc/systemd/system/ itself like you. Would you know if I should be creating the apt-daily.timer.d directory and the override.conf under /lib/systemd/system instead? All advice gratefully recd with thx.
– Purvez
Apr 27 '17 at 10:24
@daniel f. I have an apt-daily.timer file in /lib/systemd/system/ as well as one in /etc/systemd/system/timers.target.wants/ However I don't have any in /etc/systemd/system/ itself like you. Would you know if I should be creating the apt-daily.timer.d directory and the override.conf under /lib/systemd/system instead? All advice gratefully recd with thx.
– Purvez
Apr 27 '17 at 10:24
|
show 1 more comment
The official debian documentation on https://wiki.debian.org/UnattendedUpgrades currently has a mistake in it that is misleading a lot of people.
It claims that you can override the upgrade time by creating a file called
/etc/systemd/system/apt-daily-upgrade.d/override.conf
However the correct path is
/etc/systemd/system/apt-daily-upgrade.timer.d/override.conf
1
Nice finding. IMHO the safest thing is to usesudo systemctl edit apt-daily.timer
. This will open an editor with the correct drop-in file.
– PerlDuck
Feb 5 at 10:39
1
Thank you PerlDuck, I edited the Debian Wiki page with your suggestion
– Rolf Wojtech
Feb 5 at 12:45
add a comment |
The official debian documentation on https://wiki.debian.org/UnattendedUpgrades currently has a mistake in it that is misleading a lot of people.
It claims that you can override the upgrade time by creating a file called
/etc/systemd/system/apt-daily-upgrade.d/override.conf
However the correct path is
/etc/systemd/system/apt-daily-upgrade.timer.d/override.conf
1
Nice finding. IMHO the safest thing is to usesudo systemctl edit apt-daily.timer
. This will open an editor with the correct drop-in file.
– PerlDuck
Feb 5 at 10:39
1
Thank you PerlDuck, I edited the Debian Wiki page with your suggestion
– Rolf Wojtech
Feb 5 at 12:45
add a comment |
The official debian documentation on https://wiki.debian.org/UnattendedUpgrades currently has a mistake in it that is misleading a lot of people.
It claims that you can override the upgrade time by creating a file called
/etc/systemd/system/apt-daily-upgrade.d/override.conf
However the correct path is
/etc/systemd/system/apt-daily-upgrade.timer.d/override.conf
The official debian documentation on https://wiki.debian.org/UnattendedUpgrades currently has a mistake in it that is misleading a lot of people.
It claims that you can override the upgrade time by creating a file called
/etc/systemd/system/apt-daily-upgrade.d/override.conf
However the correct path is
/etc/systemd/system/apt-daily-upgrade.timer.d/override.conf
edited Feb 5 at 10:47


PerlDuck
6,74711535
6,74711535
answered Feb 5 at 10:17


Rolf WojtechRolf Wojtech
232
232
1
Nice finding. IMHO the safest thing is to usesudo systemctl edit apt-daily.timer
. This will open an editor with the correct drop-in file.
– PerlDuck
Feb 5 at 10:39
1
Thank you PerlDuck, I edited the Debian Wiki page with your suggestion
– Rolf Wojtech
Feb 5 at 12:45
add a comment |
1
Nice finding. IMHO the safest thing is to usesudo systemctl edit apt-daily.timer
. This will open an editor with the correct drop-in file.
– PerlDuck
Feb 5 at 10:39
1
Thank you PerlDuck, I edited the Debian Wiki page with your suggestion
– Rolf Wojtech
Feb 5 at 12:45
1
1
Nice finding. IMHO the safest thing is to use
sudo systemctl edit apt-daily.timer
. This will open an editor with the correct drop-in file.– PerlDuck
Feb 5 at 10:39
Nice finding. IMHO the safest thing is to use
sudo systemctl edit apt-daily.timer
. This will open an editor with the correct drop-in file.– PerlDuck
Feb 5 at 10:39
1
1
Thank you PerlDuck, I edited the Debian Wiki page with your suggestion
– Rolf Wojtech
Feb 5 at 12:45
Thank you PerlDuck, I edited the Debian Wiki page with your suggestion
– Rolf Wojtech
Feb 5 at 12:45
add a comment |
I tried Daniel's solution but the upgrade still ran at the wrong times. Turned out there two systemd overrides that are needed:
Used for downloads
/lib/systemd/system/apt-daily.timer - override with /etc/systemd/system/apt-daily.timer.d/override.conf
Used for upgrading
/lib/systemd/system/apt-daily-upgrade.timer - override with /etc/systemd/system/apt-daily-upgrade.timer.d/override.conf
1
Which version are you on? So you had to override both mentioned timers at the same time?
– daniel f.
Jan 23 at 7:48
add a comment |
I tried Daniel's solution but the upgrade still ran at the wrong times. Turned out there two systemd overrides that are needed:
Used for downloads
/lib/systemd/system/apt-daily.timer - override with /etc/systemd/system/apt-daily.timer.d/override.conf
Used for upgrading
/lib/systemd/system/apt-daily-upgrade.timer - override with /etc/systemd/system/apt-daily-upgrade.timer.d/override.conf
1
Which version are you on? So you had to override both mentioned timers at the same time?
– daniel f.
Jan 23 at 7:48
add a comment |
I tried Daniel's solution but the upgrade still ran at the wrong times. Turned out there two systemd overrides that are needed:
Used for downloads
/lib/systemd/system/apt-daily.timer - override with /etc/systemd/system/apt-daily.timer.d/override.conf
Used for upgrading
/lib/systemd/system/apt-daily-upgrade.timer - override with /etc/systemd/system/apt-daily-upgrade.timer.d/override.conf
I tried Daniel's solution but the upgrade still ran at the wrong times. Turned out there two systemd overrides that are needed:
Used for downloads
/lib/systemd/system/apt-daily.timer - override with /etc/systemd/system/apt-daily.timer.d/override.conf
Used for upgrading
/lib/systemd/system/apt-daily-upgrade.timer - override with /etc/systemd/system/apt-daily-upgrade.timer.d/override.conf
edited Feb 5 at 13:29


Rolf Wojtech
232
232
answered Jan 23 at 7:45


Niels RaskNiels Rask
12
12
1
Which version are you on? So you had to override both mentioned timers at the same time?
– daniel f.
Jan 23 at 7:48
add a comment |
1
Which version are you on? So you had to override both mentioned timers at the same time?
– daniel f.
Jan 23 at 7:48
1
1
Which version are you on? So you had to override both mentioned timers at the same time?
– daniel f.
Jan 23 at 7:48
Which version are you on? So you had to override both mentioned timers at the same time?
– daniel f.
Jan 23 at 7:48
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f824718%2fubuntu-16-04-unattended-upgrades-runs-at-random-times%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
anNygLNvMmHeJIGeTJOE1RhS T,Y 7nYK
The random behavior is deliberate - to smooth out demand instead of millions of systems hammering a few mirrors at the same times each day. Ordinary desktop users should not notice the behavior at all. Some enterprise users way wish to change the behavior to something a bit more predictable, and are certainly welcome to do so.
– user535733
Feb 5 at 13:50
Yes, the reason behind this choice is clear. It is just that this behavior is unacceptable for production systems. At the time i asked this question, this behavior (and the fix) was not documented anywhere
– daniel f.
Feb 5 at 14:06