Actions
tickets #161777
closedRootless zypper metrics broken on Tumbleweed
Start date:
2024-06-04
Due date:
% Done:
0%
Estimated time:
Description
Our monitoring collects Zypper metrics such as the needs-rebooting status and pending updates using a zypper-metrics
timer. This timer does not run as root, because we already refresh as part of os-update daily, and do not needs fully accurate pending updates numbers.
It seems this no longer works on Tumbleweed however, even after a root initiated zypper refresh
:
discourse01 (discourse):~ # zypper ref
Repository 'darix:apps' is up to date.
Repository 'openSUSE:infrastructure' is up to date.
Repository 'openSUSE:infrastructure:discourse' is up to date.
Repository 'repo-oss' is up to date.
Repository 'repo-update' is up to date.
All repositories have been refreshed.
discourse01 (discourse):~ # sudo -u monitor zypper --no-refresh lu
Error building the cache:
[darix:apps|http://download-prg.infra.opensuse.org/repositories/home:/darix:/apps/openSUSE_Tumbleweed/] Valid metadata not found at specified URL
History:
- Can't create /var/cache/zypp/raw/darix:apps
Warning: The metadata cache needs to be built for the 'darix:apps' repository. You can run 'zypper refresh' as root to do this.
Warning: Skipping repository 'darix:apps' because of the above error.
Error building the cache:
[openSUSE:infrastructure|http://download-prg.infra.opensuse.org/repositories/openSUSE:/infrastructure/openSUSE_Tumbleweed/] Valid metadata not found at specified URL
History:
- Can't create /var/cache/zypp/raw/openSUSE:infrastructure
Warning: The metadata cache needs to be built for the 'openSUSE:infrastructure' repository. You can run 'zypper refresh' as root to do this.
Warning: Skipping repository 'openSUSE:infrastructure' because of the above error.
Error building the cache:
[openSUSE:infrastructure:discourse|http://download-prg.infra.opensuse.org/repositories/openSUSE:/infrastructure:/discourse/openSUSE_Tumbleweed/] Valid metadata not found at specified URL
History:
- Can't create /var/cache/zypp/raw/openSUSE:infrastructure:discourse
Warning: The metadata cache needs to be built for the 'openSUSE:infrastructure:discourse' repository. You can run 'zypper refresh' as root to do this.
Warning: Skipping repository 'openSUSE:infrastructure:discourse' because of the above error.
Error building the cache:
[repo-oss|http://download-prg.infra.opensuse.org/tumbleweed/repo/oss] Valid metadata not found at specified URL
History:
- Can't create /var/cache/zypp/raw/repo-oss
Warning: The metadata cache needs to be built for the 'repo-oss' repository. You can run 'zypper refresh' as root to do this.
Warning: Skipping repository 'repo-oss' because of the above error.
Error building the cache:
[repo-update|http://download-prg.infra.opensuse.org/update/tumbleweed/] Valid metadata not found at specified URL
History:
- Can't create /var/cache/zypp/raw/repo-update
Warning: The metadata cache needs to be built for the 'repo-update' repository. You can run 'zypper refresh' as root to do this.
Warning: Skipping repository 'repo-update' because of the above error.
Some of the repositories have not been refreshed because of an error.
Loading repository data...
Reading installed packages...
No updates found.
Updated by crameleon 7 months ago
Full rebuild does not help either:
discourse01 (discourse):~ # rpm --rebuilddb
discourse01 (discourse):~ # zypper ref -f
Forcing raw metadata refresh
Retrieving repository 'darix:apps' metadata ............................................................................................................................[done]
Forcing building of repository cache
Building repository 'darix:apps' cache .................................................................................................................................[done]
Forcing raw metadata refresh
Retrieving repository 'openSUSE:infrastructure' metadata ...............................................................................................................[done]
Forcing building of repository cache
Building repository 'openSUSE:infrastructure' cache ....................................................................................................................[done]
Forcing raw metadata refresh
Retrieving repository 'openSUSE:infrastructure:discourse' metadata .....................................................................................................[done]
Forcing building of repository cache
Building repository 'openSUSE:infrastructure:discourse' cache ..........................................................................................................[done]
Forcing raw metadata refresh
Retrieving repository 'repo-oss' metadata ..............................................................................................................................[done]
Forcing building of repository cache
Building repository 'repo-oss' cache ...................................................................................................................................[done]
Forcing raw metadata refresh
Retrieving repository 'repo-update' metadata ...........................................................................................................................[done]
Forcing building of repository cache
Building repository 'repo-update' cache ................................................................................................................................[done]
All repositories have been refreshed.
Updated by crameleon 7 months ago
The cache seems to contain broken repo_gpgcheck symlinks, unsure if related, but is not the case on my personal Tumbleweed system:
Example for repo-update, but is the case for all repo directories under raw/:
discourse01 (discourse):~ # ls -al /var/cache/zypp/raw/repo-update/
total 12
drwxr-xr-x 3 root root 4096 Jun 4 18:50 .
drwxr-x--- 7 root root 4096 Jun 4 18:50 ..
lrwxrwxrwx 1 root root 6 Jun 4 18:50 .repo_gpgcheck -> ./true
drwxr-xr-x 2 root root 4096 Jun 4 18:50 repodata
Actions