Trove: Unable to locate package ubuntu-cloud-keyring

asked 2018-05-03 03:09:05 -0600

ICBeter gravatar image

I set up Trove an now try to create a guest image via cloud-init according to this documentation. When I start a new database instance I get the following errors in the startup log of the instance:

[  437.346139] cloud-init[1095]: 2018-04-30 21:41:03,609 -[ERROR]: add-apt-repository failed.
[  437.371922] cloud-init[1095]: Traceback (most recent call last):
[  437.402786] cloud-init[1095]:   File "/usr/lib/python3/dist-packages/cloudinit/config/", line 615, in add_apt_sources
[  437.427157] cloud-init[1095]:     util.subp(["add-apt-repository", source], target=target)
[  437.446281] cloud-init[1095]:   File "/usr/lib/python3/dist-packages/cloudinit/", line 1957, in subp
[  437.486109] cloud-init[1095]:     cmd=args)
[  437.517475] cloud-init[1095]: cloudinit.util.ProcessExecutionError: Unexpected error while running command.
[  437.546221] cloud-init[1095]: Command: ['add-apt-repository', 'cloud-archive:queens']
[  437.578697] cloud-init[1095]: Exit code: 1
[  437.602570] cloud-init[1095]: Reason: -
[  437.638407] cloud-init[1095]: Stdout:  Ubuntu Cloud Archive for OpenStack Queens
[  437.674750] cloud-init[1095]:          More info:
[  437.693931] cloud-init[1095]:         Reading package lists...
[  437.721120] cloud-init[1095]:         Building dependency tree...
[  437.742770] cloud-init[1095]:         Reading state information...
[  437.754358] cloud-init[1095]:         Failed to add key.
[  437.790756] cloud-init[1095]: Stderr: E: Unable to locate package ubuntu-cloud-keyring

and later:

[  771.137018] cloud-init[1372]: E: There were unauthenticated packages and -y was used without --allow-unauthenticated
[  771.166616] cloud-init[1372]: Cloud-init v. 18.2 running 'modules:final' at Mon, 30 Apr 2018 21:41:20 +0000. Up 454.31 seconds.
[  771.185561] cloud-init[1372]: 2018-04-30 21:47:06,204 -[WARNING]: Failed to install packages: ['trove-guestagent', 'mysql-server-5.7']
[  771.225740] cloud-init[1372]: 2018-04-30 21:47:06,457 -[WARNING]: 1 failed with exceptions, re-raising the last one
[  771.264518] cloud-init[1372]: 2018-04-30 21:47:06,537 -[WARNING]: Running module package-update-upgrade-install (<module 'cloudinit.config.cc_package_update_upgrade_install' from '/usr/lib/python3/dist-packages/cloudinit/config/'>) failed

It seems that cloud-init cannot find the package ubuntu-cloud-keyring and therefore it is unable to install some packages. Is this a bug or am I doing something wrong? The only difference in my /etc/trove/cloudinit/mysql.cloudinit to the docu ist that I replaced pike with queens.

edit retag flag offensive close merge delete


The Ubuntu Wiki cloud archive page says that you need Xenial, but the instructions you are following use ubuntu-14.04-server-cloudimg-amd64-disk1.img, which is Trusty. Could this be at the origin of your problem?

Bernd Bausch gravatar imageBernd Bausch ( 2018-05-04 00:10:45 -0600 )edit

Could be, but I cannot find another docu. I need to use 16.04 and not 14.04.

ICBeter gravatar imageICBeter ( 2018-05-06 15:08:28 -0600 )edit

When looking again at the cloud-init output, I see that add-apt-repository cloud-archive:queens fails. That would explain why you don't find the package. Log on to the instance and try to find out why the repository can't be added. The cause could be external to the instance.

Bernd Bausch gravatar imageBernd Bausch ( 2018-05-06 18:18:41 -0600 )edit

Inside the instance calling add-apt-repository cloud-archive:queens shows an error Error: retrieving gpg key timed out., but the repository seems to be added anyway, including the package ubuntu-cloud-keyring

ICBeter gravatar imageICBeter ( 2018-05-07 11:00:17 -0600 )edit

So, the question is, do these messages really indicate problems.

Bernd Bausch gravatar imageBernd Bausch ( 2018-05-09 21:24:04 -0600 )edit