Re: unattended-upgrades downloaded package information only from the sources in sources.list.d directory ignoring sources.list file
> Looks like the "apt update" or equivalent ran by unattended-upgrades
> ignored the /etc/apt/sources.list file and used only
> /etc/apt/sources.list.d/digitalocean-agent.list as a source for
> repositories.
> What might cause this behavior?
I did some further debugging and it is the
/usr/lib/apt/apt.systemd.daily script executed by apt-daily systemd
service unit which updates the package index from the sources:
# update package lists
UPDATED=0
UPDATE_STAMP=/var/lib/apt/periodic/update-stamp
if check_stamp $UPDATE_STAMP $UpdateInterval; then
if eval apt-get $XAPTOPT -y update $XSTDERR; then
/* output removed fro brevity */
Now I set the APT::Periodic::Verbose value to "2":
$ apt-config dump APT::Periodic::Verbose
APT::Periodic::Verbose "2";
$
..and actually the entries in /etc/apt/sources.list file are not ignored:
$ sudo journalctl --since today --no-pager -u apt-daily
-- Logs begin at Mon 2019-05-13 19:38:07 UTC, end at Thu 2019-06-06
08:40:31 UTC. --
Jun 06 00:49:10 vps systemd[1]: Starting Daily apt download activities...
Jun 06 00:49:10 vps apt.systemd.daily[31062]: verbose level 2
Jun 06 00:49:10 vps apt.systemd.daily[31062]: Reading package lists...
Jun 06 00:49:10 vps apt.systemd.daily[31062]: Building dependency tree...
Jun 06 00:49:10 vps apt.systemd.daily[31062]: Reading state information...
Jun 06 00:49:10 vps apt.systemd.daily[31062]: check_stamp:
interval=86400, now=1559779200, stamp=1559692800, delta=86400 (sec)
Jun 06 00:49:10 vps apt.systemd.daily[31062]: Get:1
http://security.debian.org stretch/updates InRelease [94.3 kB]
Jun 06 00:49:10 vps apt.systemd.daily[31062]: Ign:2
http://mirrors.digitalocean.com/debian stretch InRelease
Jun 06 00:49:10 vps apt.systemd.daily[31062]: Get:3
http://mirrors.digitalocean.com/debian stretch-updates InRelease [91.0
kB]
Jun 06 00:49:10 vps apt.systemd.daily[31062]: Hit:4
http://mirrors.digitalocean.com/debian stretch Release
Jun 06 00:49:10 vps apt.systemd.daily[31062]: Get:5
http://security.debian.org stretch/updates/main Sources [205 kB]
Jun 06 00:49:10 vps apt.systemd.daily[31062]: Get:6
http://security.debian.org stretch/updates/main amd64 Packages [492
kB]
Jun 06 00:49:10 vps apt.systemd.daily[31062]: Get:7
https://repos.insights.digitalocean.com/apt/do-agent main InRelease
[5,132 B]
Jun 06 00:49:10 vps apt.systemd.daily[31062]: Fetched 888 kB in 0s (1,643 kB/s)
Jun 06 00:49:11 vps apt.systemd.daily[31062]: Reading package lists...
Jun 06 00:49:11 vps apt.systemd.daily[31062]: download updated
metadata (success).
Jun 06 00:49:11 vps apt.systemd.daily[31062]: send dbus signal (success)
Jun 06 00:49:11 vps apt.systemd.daily[31062]: check_stamp: interval=0
Jun 06 00:49:11 vps apt.systemd.daily[31062]: download upgradable (not run)
Jun 06 00:49:11 vps apt.systemd.daily[31062]: unattended-upgrade -d (not run)
Jun 06 00:49:11 vps systemd[1]: Started Daily apt download activities.
$
However, again, at the morning "apt policy" listed only the repository
in /etc/apt/sources.list.d/digitalocean-agent.list file:
$ apt policy
Package files:
100 /var/lib/dpkg/status
release a=now
500 https://repos.insights.digitalocean.com/apt/do-agent main/main
amd64 Packages
release o=. main,a=main,n=main,l=. main,c=main,b=amd64
origin repos.insights.digitalocean.com
Pinned packages:
$
After running manually the "sudo apt update" command, the apt
downloaded >50MiB of packages data and output of "apt policy" listed
all the repositories.
Log files in /var/log/apt/ directory have not been updated.
What could cause such behavior? How to debug this further?
thanks,
Martin
Reply to: