apt-key add fails in overlayfs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Xenial |
Fix Released
|
High
|
Andy Whitcroft |
Bug Description
Sending a custom APT config to cloud-init fails to:
1. add keys
2. configure sources
3. configura additional repository.
The same config is being sent to curtin, and curtin doesn't seem to fail (curtin install log http://
config sent by maas = http://
cloud-init.log = http://
cloud-init-
sources.list = http://
ubuntu@
total 0
ubuntu@
Hit:2 http://
Get:3 http://
Err:2 http://
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
Ign:3 http://
Hit:4 http://
Get:1 http://
Err:4 http://
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
Err:1 http://
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
Fetched 339 kB in 0s (388 kB/s)
Reading package lists... Error!
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://
W: GPG error: http://
W: The repository 'http://
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://
W: Failed to fetch http://
W: Failed to fetch http://
W: Failed to fetch http://
W: Some index files failed to download. They have been ignored, or old ones used instead.
E: Problem renaming the file /var/cache/
E: Problem renaming the file /var/cache/
W: You may want to run apt-get update to correct these problems
E: The package cache file is corrupted
summary: |
- cloud-init failing to configure additional repository + cloud-init failing to configure sources and additional repository |
tags: | added: maas |
Changed in linux (Ubuntu): | |
status: | Incomplete → Confirmed |
Changed in cloud-init: | |
status: | New → Confirmed |
Changed in linux (Ubuntu): | |
importance: | Undecided → Medium |
tags: | added: kernel-da-key |
summary: |
- cloud-init failing to configure sources and additional repository + cloud-init failing to configure sources and additional repository in + overlayfs |
summary: |
- cloud-init failing to configure sources and additional repository in - overlayfs + apt-key add fails in overlayfs |
Changed in linux (Ubuntu): | |
importance: | Medium → High |
tags: |
added: kernel-key removed: kernel-da-key |
tags: |
added: kernel-da-key removed: kernel-key |
Changed in linux (Ubuntu Xenial): | |
status: | In Progress → Fix Committed |
tags: | added: oil |
no longer affects: | cloud-init |
Changed in linux (Ubuntu): | |
status: | Confirmed → Fix Released |
From cloud-init.log:
Aug 30 17:42:59 node03 [CLOUDINIT] util.py[DEBUG]: Running command ['apt-key', 'add', '-'] with allowed return codes [0] (shell=False, capture=True) configure. py[ERROR] : failed to add apt GPG Key to apt keyring# 012Traceback (most recent call last):#012 File "/usr/lib/ python3/ dist-packages/ cloudinit/ config/ cc_apt_ configure. py", line 333, in add_apt_key_raw#012 util.subp( ['apt-key' , 'add', '-'], data=key.encode(), target=target)#012 File "/usr/lib/ python3/ dist-packages/ cloudinit/ util.py" , line 1832, in subp#012 cmd=args) #012cloudinit. util.ProcessExe cutionError: Unexpected error while running command. #012Command: ['apt-key', 'add', '-']#012Exit code: 1#012Reason: -#012Stdout: ''#012Stderr: 'Warning: apt-key output should not be parsed (stdout is not a terminal)\ngpg: renaming `/etc/apt/ trusted. gpg.tmp\ ' to `/etc/apt/ trusted. gpg\' failed: Stale file handle\ngpg: error writing keyring `/etc/apt/ trusted. gpg\': file rename error\ngpg: can\'t open `/etc/apt/ trusted. gpg\'\ngpg: keydb_search failed: file open error\ngpg: key 93EE8CC5: public key "[User ID not found]" imported\ngpg: error reading `[stdin]\': file rename error\ngpg: import from `[stdin]\' failed: file rename error\ngpg: Total number processed: 0\ngpg: imported: 1 (RSA: 1)\n' config/ config- apt-configure: FAIL: running config
Aug 30 17:42:59 node03 [CLOUDINIT] cc_apt_
Aug 30 17:42:59 node03 [CLOUDINIT] handlers.py[DEBUG]: finish: modules-