LXC: lxc-create fails due to missing SSL support

Hi,

Trying to set up a new LXC container fails due to the image repo being unavailable:

root@router:~# lxc-create -t download -n test
Setting up the GPG keyring
Downloading the image index
ERROR: Failed to download http://repo.turris.cz/lxc//meta/1.0/index-system
lxc-create: lxccontainer.c: create_run_template: 1201 container creation template for test failed
lxc-create: lxc_create.c: main: 274 Error creating container test
root@router:~# cat /etc/turris-version 
3.8.5
root@omnia:~#

Looking at the repository, it looks like the .2 suffix has been added to the index file, causing the downloader not to find them. Also, I wasn’t able to locate any config which would allow to configure the full repository URL. Would be great if someone from the Omnia team could share their thoughts.

Thanks!

Thought is that is is most probably bug and that file is there just as some sort of collision or something. @miska should look at it.

Thanks for your reply!

lxc-create/wget sends the request GET /lxc//meta/1.0/index-system HTTP/1.1. The server responds with a 302 code, Location: https://repo.turris.cz/lxc//meta/1.0/index-system, but that location simply doesn’t exist (404). Let’s see what @miska thinks.

Hi, URL to the whole repository is in config /etc/config/lxc, but it points to the whole repository, not just to one image. And it should try downloading index-system only if it can’t find index-system.2. Does it happen consistently? Because it could be that your internet was not working well at that moment or you just hit the exact moment when we were replacing old images with new ones.

Thanks for your reply!

I resolved the issue: You are right that lxc-create actually first tries to fetch index-system.2, I somehow missed that at first. The server responds with a 302 status code and a location header which points to the https URL. And here’s the problem: The system used the busybox version of wget which doesn’t come with SSL support. Installing the wget package solves the problem. Would it make sense to add it as a dependency for lxc?

1 Like

Yep, definitely. Will be in 3.9