osbuild / osbuild-composer

An HTTP service for building bootable OS images.
https://www.osbuild.org
Apache License 2.0
166 stars 107 forks source link

Build fails because of out of sync mirrors #4427

Open jbenc opened 1 month ago

jbenc commented 1 month ago

See https://github.com/osbuild/osbuild-composer/issues/1031 (I can't reopen that one).

The build is failing every single time for me. journalctl -u osbuild-worker@1 shows:

osbuild-worker.log

Those two mirrors that it picked on random(?) are out of sync and do not have the newest packages.

jbenc commented 1 month ago

This is on Fedora 40.

bcl commented 1 month ago

The metadata should get refreshed on restart of the system. If that fails you can remove it manually by deleting the rpmmd cache directories under /var/cache/osbuild-worker and /var/cache/osbuild-compose

jbenc commented 1 month ago

This was on a freshly installed system. Between the two different mirrors in the log I rebooted the system. So no, this doesn't help. The https://github.com/osbuild/osbuild-composer/issues/1031 states that the mirror from which the metadata were downloaded is not saved and the RPM fetch selects the mirror independently. Meaning the metadata and the data are fetched from a different mirror. This obviously can't work.

teodor-pripoae commented 1 month ago

I'm having the same issue on fedora 40.

Oct 28 18:41:52 localhost osbuild-worker[41346]:   File "/usr/lib/python3.12/site-packages/osbuild/host.py", line 384, in call_with_fds
Oct 28 18:41:52 localhost osbuild-worker[41346]:     raise error
Oct 28 18:41:52 localhost osbuild-worker[41346]: osbuild.host.RemoteError: RuntimeError: curl: error downloading https://mirrors.nxthost.com/fedora/updates/40/Everything/x86_64/Packages/e/edk2-ovmf-20240813-2.fc40.noarch.rpm: error code 22,https://mirrors.nxthost.com/fedora/updates/40/Everything/x86_64/Packages/d/daxctl-libs-80-1.fc40.x86_64.rpm: error code 22,https://mirrors.nxthost.com/fedora/updates/40/Everything/x86_64/Packages/n/ndctl-libs-80-1.fc40.x86_64.rpm: error code 22

It's trying to download ndctl-libs-80-1 while the mirror is still having only ndctl-libs-79-1.

teodor-pripoae commented 1 month ago

I fixed it temporary by hardcoding the mirror in /usr/share/osbuild-composer/repositories/fedora-40.json and removing rpmmd cache.