Comment 1 for bug 1618572

Revision history for this message
Jon Grimm (jgrimm) wrote : Re: cloud-init failing to configure sources and additional repository

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)
Aug 30 17:42:59 node03 [CLOUDINIT] cc_apt_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.ProcessExecutionError: 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'
Aug 30 17:42:59 node03 [CLOUDINIT] handlers.py[DEBUG]: finish: modules-config/config-apt-configure: FAIL: running config