Opensuse images failing to build on https://images.linuxcontainers.org/

It looks like opensuse images are failing to build and all the good images have expired, resulting in there being no opensuse images. I haven’t yet looked at the jenkins logs.

Cheers…
Bruce

$ incus image list -f csv images: > images.csv
$ for os in $(awk -F, '{print $4}' images.csv | awk '{print $1}' | tr [[:upper:]] [[:lower:]] | sort -u); do printf "%3d %s\n" $(grep -i $os images.csv | wc -l) $os; done | awk '{print; t=t+$1}END{print t}'
 60 almalinux
240 alpine
 72 alt
 18 amazonlinux
 27 archlinux
 12 busybox
 30 centos
180 debian
 72 devuan
108 fedora
  6 funtoo
 30 gentoo
 24 kali
 96 mint
 36 nixos
120 openeuler
 48 openwrt
 72 oracle
 12 plamo
 60 rockylinux
 12 slackware
 36 springdalelinux
204 ubuntu
 24 voidlinux
1599
$ wc -l images.csv
1599 images.csv

Took me a while to find the detailed build log of a failed build, but it looks like there is a problem determining the full path to the tarball from upstream?

build log for job 4176

Started by upstream project "image-opensuse" build number 4176
originally caused by:
 Started by timer
 Started by Naginator after build #4175 failure
Running as SYSTEM
Building remotely on stgraber-dcmtl-buildd03 (vm i386 native-amd64 remote amd64) in workspace /home/jenkins/workspace/image-opensuse/architecture/amd64/release/15.6/variant/desktop-kde
[desktop-kde] $ /bin/sh -xe /tmp/jenkins934124630348065484.sh
+ cd /lxc-ci
+ INCUS_ARCHITECTURE=amd64
+ ARCH=amd64
+ [ amd64 = arm64 ]
+ [ amd64 = amd64 ]
+ ARCH=x86_64
+ TYPE=container
+ [ amd64 = amd64 ]
+ TYPE=container,vm
+ [ desktop-kde = desktop ]
+ exec sudo /lxc-ci/bin/build-distro /lxc-ci/images/opensuse.yaml amd64 container,vm 1800 /home/jenkins/workspace/image-opensuse/architecture/amd64/release/15.6/variant/desktop-kde -o image.architecture=x86_64 -o image.release=15.6 -o image.variant=desktop-kde
+ incus file push /lxc-ci/images/opensuse.yaml distrobuilder-7bfcfee6-f061-4f6e-adc1-b569e2fa085b/root/image.yaml

Pushing /lxc-ci/images/opensuse.yaml to /root/image.yaml: 100% (16.54GB/s)
                                                                           
+ + incus file push - distrobuilder-7bfcfee6-f061-4f6e-adc1-b569e2fa085b/root/build.sh --mode=755
uname -m
+ uname -m
+ cat
+ incus exec distrobuilder-7bfcfee6-f061-4f6e-adc1-b569e2fa085b -- /root/build.sh -o image.architecture=x86_64 -o image.release=15.6 -o image.variant=desktop-kde
+ rm -f /run/dbus/system_bus_socket
+ mkdir /root/build /root/build/cache
+ [ x86_64 = x86_64 ]
+ echo /lxc-ci/images/opensuse.yaml
+ grep -q -E sabayon|gentoo|oracle|springdalelinux|openeuler|funtoo
+ [ container,vm != vm ]
+ mount -t tmpfs tmpfs /root/build -o size=6G,nr_inodes=10000000
+ mv /root/image.yaml /root/build/
+ cd /root/build/
+ date -u +%Y%m%d_%H:%M
+ SERIAL=20241119_04:25
+ distrobuilder --cache-dir /root/build/cache/ --timeout 1800 build-dir image.yaml rootfs -o image.serial=20241119_04:25 -o image.architecture=x86_64 -o image.release=15.6 -o image.variant=desktop-kde
time="2024-11-19T04:25:26Z" level=info msg="Downloading source"
Error: Error while downloading source: Failed to get tarball path: Failed to get tarball name: Failed to find tarball name
time="2024-11-19T04:25:27Z" level=error msg="Failed running distrobuilder" err="Error while downloading source: Failed to get tarball path: Failed to get tarball name: Failed to find tarball name"
time="2024-11-19T04:25:27Z" level=info msg="Removing cache directory"
Integration: cleanup
+ cleanup
+ incus delete --force distrobuilder-7bfcfee6-f061-4f6e-adc1-b569e2fa085b
Build step 'Execute shell' marked build as failure
Skipped archiving because build is not successful
[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
[WS-CLEANUP] done
Finished: FAILURE

Jenkins got a bit jammed up too so that didn’t help, it’s catching up now so we’ll see how things behave.

We’ve always had the problem that the OpenSUSE web servers are not reliable, especially for Tumbleweed we keep detecting the most recent image version just to then notice that half of the files we need are missing and give us 404s…

1 Like

For what it’s worth, I think I successfully tried to figure out how to do this manually and I get the same error as the jenkins job does. I tried to get more information about what opensuse URL it is hitting and not getting what it wants, but the debug options don’t give any extre info:

$ sudo distrobuilder --debug build-incus --debug opensuse.yaml
INFO   [2024-11-22T14:21:53-07:00] Downloading source
Error: Error while downloading source: Failed to get tarball path: Failed to get tarball name: Failed to find tarball name
ERROR  [2024-11-22T14:21:54-07:00] Failed running distrobuilder                  err="Error while downloading source: Failed to get tarball path: Failed to get tarball name: Failed to find tarball name"
INFO   [2024-11-22T14:21:54-07:00] Removing cache directory
1 Like

Found https://mirrorcache-us.opensuse.org/download hardcoded in distrobuilder/sources/opensuse-http.go.

Sure enough, that URL has the following message: “We are very sorry, but the requested service is currently not available.”

When I follow the status page link there are many US mirrors operational. On that status page when I search for “mirrorcache” then only hits are for Australia (mirrorcache-au). I don’t know enough about opensuse’s infrastructure to know if that means something or not.

Looking at sources/opensuse.go:

// Run downloads an OpenSUSE tarball.
func (s *opensuse) Run() error {
        var baseURL string
        var fname string

        if s.definition.Source.URL == "" {
                s.definition.Source.URL = "https://mirrorcache-us.opensuse.org/download"
        }

it suggests you might be able override the URL, perhaps in the yaml file… when I try to read distrobuilder/main.go, sources/source.go, and sources/opensuse-http.go and I see it “rendering” I get the impression there is some way to translate the “Source.URL” go code into perhaps a key in the opensuse.yaml:

source:
  downloader: opensuse.http
  url:https://mirror.xenyth.net/opensuse/

but I don’t know how to figure that out the translation.

I did naively try inserting such a key into the yaml and stracing the process I can see a socket open to the mirror hostname, so I guess that guess was good. But I get the same failure, possibly because I’m not specifying the base path correctly.

shrug

Switched URL to http so I could wireshark the paths being used. Looks like very few opensuse mirrors store appliances, which is one of the things distrobuilder relies on. Found one that did.

However, I could only build specific versions of leap, and only below 16.0 (in that case, it’s appliance directory is quite sparse and does not contain an lxc tarball). I can see now that tumbleweed requires a path structure (…/VIrtualization:/containers:/images:/…) that is only available on MirrorCache and not directly on mirrors, which explains the spotty buildability.

Using https://mirrorcache-eu.opensuse.org/ works but is slow for me.

I found out that they are doing a data centre migration that is taking longer than planned: https://lists.opensuse.org/archives/list/project@lists.opensuse.org/thread/UXFW5JKKYIC7523V2GYCUQ2WKRXBE6SK/