Transient error in apt-add-repository can lead to missing apt keys

Bug #1655366 reported by Francis Ginther
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Autopilot Log Analyser
New
Undecided
Unassigned
Charm Helpers
New
Undecided
Unassigned
landscape-client-charm
New
Undecided
Unassigned

Bug Description

Hit this with the landscape-client charm, which uses charm helpers for setting up apt repositories and installing packages.

[from unit-landscape-client-31.log]
017-01-06 04:19:06 INFO install gpg: requesting key 4652B4E6 from hkp server keyserver.ubuntu.com
2017-01-06 04:19:06 INFO install gpgkeys: key 35F77D63B5CEC106C577ED856E85A86E4652B4E6 can't be retrieved
2017-01-06 04:19:06 INFO install gpg: no valid OpenPGP data found.
2017-01-06 04:19:06 INFO install gpg: Total number processed: 0
2017-01-06 04:19:06 INFO install gpg: keyserver communications error: keyserver helper general error
2017-01-06 04:19:06 INFO install gpg: keyserver communications error: unknown pubkey algorithm
2017-01-06 04:19:06 INFO install gpg: keyserver receive failed: unknown pubkey algorithm
2017-01-06 04:19:07 INFO install Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease
2017-01-06 04:19:07 INFO install Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
2017-01-06 04:19:07 INFO install Ign:3 http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-updates/newton InRelease
2017-01-06 04:19:07 INFO install Get:4 http://ppa.launchpad.net/landscape/trunk/ubuntu xenial InRelease [17.6 kB]
2017-01-06 04:19:07 INFO install Get:5 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
2017-01-06 04:19:08 INFO install Get:6 http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-updates/newton Release [7881 B]
2017-01-06 04:19:08 INFO install Get:7 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
2017-01-06 04:19:08 INFO install Get:8 http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-updates/newton Release.gpg [543 B]
2017-01-06 04:19:08 INFO install Ign:4 http://ppa.launchpad.net/landscape/trunk/ubuntu xenial InRelease
2017-01-06 04:19:08 INFO install Get:9 http://ppa.launchpad.net/landscape/trunk/ubuntu xenial/main amd64 Packages [1244 B]
2017-01-06 04:19:08 INFO install Get:10 http://ppa.launchpad.net/landscape/trunk/ubuntu xenial/main Translation-en [484 B]
2017-01-06 04:19:10 INFO install Fetched 334 kB in 1s (308 kB/s)
2017-01-06 04:19:11 INFO install Reading package lists...
2017-01-06 04:19:11 INFO install W: GPG error: http://ppa.launchpad.net/landscape/trunk/ubuntu xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6E85A86E4652B4E6
2017-01-06 04:19:11 INFO install W: The repository 'http://ppa.launchpad.net/landscape/trunk/ubuntu xenial InRelease' is not signed.
2017-01-06 04:19:11 INFO juju-log Installing ['landscape-client'] with options: ['--option=Dpkg::Options::=--force-c
onfold']
2017-01-06 04:19:11 INFO install Reading package lists...
2017-01-06 04:19:12 INFO install Building dependency tree...
2017-01-06 04:19:12 INFO install Reading state information...
2017-01-06 04:19:12 INFO install The following additional packages will be installed:
2017-01-06 04:19:12 INFO install bc landscape-common python-attr python-configobj python-gdbm python-pam
2017-01-06 04:19:12 INFO install python-pyasn1-modules python-pycurl python-serial python-service-identity
2017-01-06 04:19:12 INFO install python-twisted-bin python-twisted-core python-twisted-web
2017-01-06 04:19:12 INFO install Suggested packages:
2017-01-06 04:19:12 INFO install python-configobj-doc python-gdbm-dbg python-pam-dbg libcurl4-gnutls-dev
2017-01-06 04:19:12 INFO install python-pycurl-dbg python-pycurl-doc python-wxgtk3.0 | python-wxgtk
2017-01-06 04:19:12 INFO install python-twisted-bin-dbg python-tk python-gtk2 python-glade2 python-qt3
2017-01-06 04:19:12 INFO install python-wxgtk3.0
2017-01-06 04:19:12 INFO install The following NEW packages will be installed:
2017-01-06 04:19:12 INFO install bc landscape-client landscape-common python-attr python-configobj
2017-01-06 04:19:12 INFO install python-gdbm python-pam python-pyasn1-modules python-pycurl python-serial
2017-01-06 04:19:12 INFO install python-service-identity python-twisted-bin python-twisted-core
2017-01-06 04:19:12 INFO install python-twisted-web
2017-01-06 04:19:12 INFO install 0 upgraded, 14 newly installed, 0 to remove and 9 not upgraded.
2017-01-06 04:19:12 INFO install Need to get 2525 kB of archives.
2017-01-06 04:19:12 INFO install After this operation, 15.6 MB of additional disk space will be used.
2017-01-06 04:19:12 INFO install WARNING: The following packages cannot be authenticated!
2017-01-06 04:19:12 INFO install landscape-common landscape-client
2017-01-06 04:19:12 INFO install E: There were unauthenticated packages and -y was used without --allow-unauthenticated

It looks like the original attempt to fetch the key "4652B4E6" failed and was not retried. This was probably part of an apt-add-repository. Since the key wasn't added, the next 'apt-get update' failed to verify the packages in the newly added archive. Then the landscape-common and landscape-client packages failed to installed because the archive signature wasn't available.

Key retrieval can be a transient issue and is often recovered by an "apt-get update". I suspect the original apt-add-repository returned some error code and it was ignored. Retrying the command should resolve the problem in this case.

summary: - Transient error in apt-get can lead to missing apt keys
+ Transient error in apt-add-repository can lead to missing apt keys
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.