linuxcontainers.org icon indicating copy to clipboard operation
linuxcontainers.org copied to clipboard

List the keyserver used.

Open Dmole opened this issue 3 years ago • 1 comments

lxc-create -t download -n test
Setting up the GPG keyring
ERROR: Unable to fetch GPG key from keyserver
lxc-create: test: lxccontainer.c: create_run_template: 1616 Failed to create container from template
lxc-create: test: tools/lxc_create.c: main: 319 Failed to create container test

The URL;

grep -P "^DOWNLOAD_SERVER=" /usr/share/lxc/templates/lxc-download 
DOWNLOAD_SERVER="images.linuxcontainers.org"

looks 302;

curl -v https://images.linuxcontainers.org 2>&1 | grep -P "< location:|< HTTP/"
< HTTP/1.1 302 Moved Temporarily
< location: https://us.lxd.images.canonical.com/

but working. The command

gpg --keyserver "${DOWNLOAD_KEYSERVER}" ${DOWNLOAD_GPG_PROXY:-} --recv-keys "${DOWNLOAD_KEYID}"

resolves to

gpg --keyserver "hkp://pool.sks-keyservers.net"  --recv-keys "0xE7FB0CAEC8173D669066514CBAEFF88C22F6E216"
gpg: directory '/root/.gnupg' created
gpg: keybox '/root/.gnupg/pubring.kbx' created
gpg: keyserver receive failed: No name

the key matches what is listed on master; https://github.com/lxc/lxc/blob/master/templates/lxc-download.in#L36 but the DOWNLOAD_KEYSERVER is different so while this is an Ubuntu bug, lxc should give better error messages.

Dmole avatar Jan 10 '22 23:01 Dmole

https://github.com/lxc/lxc/pull/4055

Dmole avatar Jan 11 '22 00:01 Dmole