openSUSE / open-build-service

Build and distribute Linux packages from sources in an automatic, consistent and reproducible way #obs
https://openbuildservice.org
GNU General Public License v2.0
920 stars 437 forks source link

cannot use DoD feature for remote container registries when using a Proxy #15431

Open azouhr opened 8 months ago

azouhr commented 8 months ago

Issue Description

When using a proxy to connect to the internet, the download feature for registries is not working. The only message i get in /srv/obs/log/dodup.log is:

unknown host 'registry.suse.com'

Looking into the code reveals, that the OBS tries to convert registry.suse.com into an ip address before accesssing it. However with an active proxy, I can only access the DNS name and thus, the connection must fail.

Expected Result

Connect to the remote registry with a FQDN to make the DoD Feature work

How to Reproduce

  1. Get behind a proxy with an OBS
  2. Setup a project, e.g. SUSE:Registry like this:
    <project name="SUSE:Registry">
    ...
    <repository name="standard">
    <download arch="x86_64" url="https://registry.suse.com" repotype="registry"/>
    <arch>x86_64</arch>
    </repository>
    </project>
  3. Try to access an image there

Further Information

using obs-server 2.11~alpha.20231228T114200.a195c475a

azouhr commented 7 months ago

Update to this: The error has changed. It does not seem to download the images. The only thing I currently see in the scheduler log is, that it tries to access "https //registry.suse.com/...". Note the missing colon ":". @mlschroe I hope that helps.

azouhr commented 6 months ago

At the moment, I am in the situation, that I had to resolve a "have choice" between 15.5 and sle images. However, after resolving this, the state is in
blocked "downloading 1 dod packages"
for more than 24h and the package needed obviously is the base image from registry.suse.com. @mlschroe : Is there a way to further debug the behavior?