Failed to install GPG key:
Metadata
Current evaluation
Closed as user error. The author identified a local DNS misconfiguration blocking GPG key retrieval. A follow-up bug was filed in craft-archives to improve error messaging for easier diagnosis.
Suggested action: —
No scores available.
Issue body
### Bug Description
Build fail with error
```
Installing package repositories
gpg error: tru::1:1685570558:0:3:1:5
Failed to install GPG key:
craft-providers error: Failed to execute pack in instance.
```
### To Reproduce
Build the given rockcraft.yaml
### Environment
Rockcraft: 0+git.f8cd8b9
Rockcraft command: rockcraft -v pack
lsb_release: Ubuntu 22.04.2 LTS
Using LXD
### rockcraft.yaml
```shell
name: cinder-scheduler
summary: Openstack cinder-scheduler
license: Apache-2.0
description: |
Ubuntu distribution of OpenStack cinder-scheduler
version: 2023.1
base: ubuntu:22.04
platforms:
amd64:
package-repositories:
- type: apt
cloud: antelope
priority: always
services:
cinder-scheduler:
override: replace
command: cinder-scheduler --use-syslog
parts:
cinder-user:
plugin: nil
# 42407:42407 for kolla compatibility
overlay-script: |
groupadd --root $CRAFT_OVERLAY --gid 42407 --system cinder
useradd \
--gid 42407 \
--uid 42407 \
--no-create-home \
--home /var/lib/cinder \
--root $CRAFT_OVERLAY \
--system \
--shell /bin/false \
cinder
cinder-scheduler:
after: [cinder-user]
plugin: nil
overlay-packages:
- sudo
- cinder-scheduler
```
### Relevant log output
```shell
2023-06-01 00:05:29.444 :: 2023-05-31 22:05:19.138 Installing package repositories
2023-06-01 00:05:29.444 :: 2023-05-31 22:05:29.180 Failed to install GPG key:
2023-06-01 00:05:29.444 :: 2023-05-31 22:05:29.186 Traceback (most recent call last):
2023-06-01 00:05:29.444 :: 2023-05-31 22:05:29.186 File "/snap/rockcraft/834/lib/python3.8/site-packages/craft_archives/repo/apt_key_manager.py", line 226, in install_key_from_keyserver
2023-06-01 00:05:29.444 :: 2023-05-31 22:05:29.186 _call_gpg(
2023-06-01 00:05:29.444 :: 2023-05-31 22:05:29.186 File "/snap/rockcraft/834/lib/python3.8/site-packages/craft_archives/repo/apt_key_manager.py", line 53, in _call_gpg
2023-06-01 00:05:29.444 :: 2023-05-31 22:05:29.186 process = subprocess.run(
2023-06-01 00:05:29.444 :: 2023-05-31 22:05:29.186 File "/snap/rockcraft/834/usr/lib/python3.8/subprocess.py", line 516, in run
2023-06-01 00:05:29.444 :: 2023-05-31 22:05:29.186 raise CalledProcessError(retcode, process.args,
2023-06-01 00:05:29.444 :: 2023-05-31 22:05:29.186 subprocess.CalledProcessError: Command '['gpg', '--batch', '--no-default-keyring', '--with-colons', '--keyring', 'gnupg-ring:/etc/apt/keyrings/craft-EC4926EA.gpg', '--homedir', '/tmp/tmpsczvgx4y', '--keyserver', 'keyserver.ubuntu.com', '--recv-keys', '391A9AA2147192839E9DB0315EDB1B62EC4926EA']' returned non-zero exit status 2.
2023-06-01 00:05:29.444 :: 2023-05-31 22:05:29.186
2023-06-01 00:05:29.444 :: 2023-05-31 22:05:29.186 During handling of the above exception, another exception occurred:
2023-06-01 00:05:29.444 :: 2023-05-31 22:05:29.186 Traceback (most recent call last):
2023-06-01 00:05:29.444 :: 2023-05-31 22:05:29.186 File "/snap/rockcraft/834/lib/python3.8/site-packages/rockcraft/parts.py", line 151, in run
2023-06-01 00:05:29.444 :: 2023-05-31 22:05:29.186 self._install_package_repositories()
2023-06-01 00:05:29.444 :: 2023-05-31 22:05:29.186 File "/snap/rockcraft/834/lib/python3.8/site-packages/rockcraft/parts.py", line 197, in _install_package_repositories
2023-06-01 00:05:29.444 :: 2023-05-31 22:05:29.186 refresh_required = repo.install(
2023-06-01 00:05:29.444 :: 2023-05-31 22:05:29.186 File "/snap/rockcraft/834/lib/python3.8/site-packages/craft_archives/repo/installer.py", line 44, in install
2023-06-01 00:05:29.444 :: 2023-05-31 22:05:29.186 return _install_repos(
2023-06-01 00:05:29.444 :: 2023-05-31 22:05:29.186 File "/snap/rockcraft/834/lib/python3.8/site-packages/craft_archives/repo/installer.py", line 91, in _install_repos
2023-06-01 00:05:29.444 :: 2023-05-31 22:05:29.186 refresh_required |= key_manager.install_package_repository_key(
2023-06-01 00:05:29.444 :: 2023-05-31 22:05:29.186 File "/snap/rockcraft/834/lib/python3.8/site-packages/craft_archives/repo/apt_key_manager.py", line 285, in install_package_repository_key
2023-06-01 00:05:29.444 :: 2023-05-31 22:05:29.186 self.install_key_from_keyserver(key_id=key_id, key_server=key_server)
2023-06-01 00:05:29.444 :: 2023-05-31 22:05:29.186 File "/snap/rockcraft/834/lib/python3.8/site-packages/craft_archives/repo/apt_key_manager.py", line 237, in install_key_from_keyserver
2023-06-01 00:05:29.444 :: 2023-05-31 22:05:29.186 raise errors.AptGPGKeyInstallError(
2023-06-01 00:05:29.444 :: 2023-05-31 22:05:29.186 craft_archives.repo.errors.AptGPGKeyInstallError: Failed to install GPG key:
2023-06-01 00:05:30.913 craft-providers error: Failed to execute pack in instance.
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Closed as user error. The author identified a local DNS misconfiguration blocking GPG key retrieval. A follow-up bug was filed in craft-archives to improve error messaging for easier diagnosis. | |
| qwen/qwen3.6-35b-a3b | — | — | Resolved as user error. The author identified a local DNS configuration problem preventing GPG key retrieval. A separate bug was filed in craft-archives to improve error messaging for future diagnosis. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed as user error. Reporter found a local DNS issue blocking GPG key retrieval. A maintainer filed a separate craft-archives bug to improve error messaging for future cases. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed as user error caused by local DNS misconfiguration. A separate upstream bug was filed in craft-archives to improve error messaging for GPG keyserver failures. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed as user error. The failure resulted from a local DNS misconfiguration blocking GPG key retrieval. The reporter resolved it locally. Maintainers filed a separate bug in craft-archives to improve error messaging for network timeouts. |
Update history
No update history recorded yet.
Related issues
No related issues found above the similarity threshold.