Comment 4 for bug 1587606

Revision history for this message
Francis Ginther (fginther) wrote :

Another flavor of this (at least in that apt-key failed and led to an eventual charm install failure). This one from https://ci.lscape.net/job/landscape-system-tests/5125.

[from landscape-0-inner-logs/ceilometer-0/var/log/juju/unit-landscape-client-57.log]
2017-01-28 10:08:04 INFO install gpg: keyring `/tmp/tmp9p2uy5f6/secring.gpg' created
2017-01-28 10:08:04 INFO install gpg: keyring `/tmp/tmp9p2uy5f6/pubring.gpg' created
2017-01-28 10:08:04 INFO install gpg: requesting key 4652B4E6 from hkp server keyserver.ubuntu.com
2017-01-28 10:08:14 INFO install gpgkeys: key 35F77D63B5CEC106C577ED856E85A86E4652B4E6 can't be retrieved
2017-01-28 10:08:14 INFO install gpg: no valid OpenPGP data found.
2017-01-28 10:08:14 INFO install gpg: Total number processed: 0
2017-01-28 10:08:14 INFO install gpg: keyserver communications error: keyserver helper general error
2017-01-28 10:08:14 INFO install gpg: keyserver communications error: unknown pubkey algorithm
2017-01-28 10:08:14 INFO install gpg: keyserver receive failed: unknown pubkey algorithm
2017-01-28 10:08:14 INFO install Ign:1 http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-updates/newton InRele
ase
2017-01-28 10:08:14 INFO install Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
2017-01-28 10:08:14 INFO install Hit:3 http://archive.ubuntu.com/ubuntu xenial InRelease
2017-01-28 10:08:14 INFO install Get:4 http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-updates/newton Releas
e [7881 B]
2017-01-28 10:08:14 INFO install Get:5 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
2017-01-28 10:08:15 INFO install Get:6 http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-updates/newton Releas
e.gpg [543 B]
2017-01-28 10:08:15 INFO install Get:7 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
2017-01-28 10:08:15 INFO install Get:8 http://ppa.launchpad.net/landscape/landscape-client-cloud-installer/ubuntu xe
nial InRelease [17.6 kB]
2017-01-28 10:08:15 INFO install Get:9 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [202 kB
]
017-01-28 10:08:16 INFO install Ign:8 http://ppa.launchpad.net/landscape/landscape-client-cloud-installer/ubuntu xenial InRelease
2017-01-28 10:08:16 INFO install Get:10 http://ppa.launchpad.net/landscape/landscape-client-cloud-installer/ubuntu xenial/main amd64 Packages [864 B]
2017-01-28 10:08:16 INFO install Get:11 http://ppa.launchpad.net/landscape/landscape-client-cloud-installer/ubuntu xenial/main Translation-en [364 B]
2017-01-28 10:08:22 INFO install Fetched 536 kB in 2s (246 kB/s)
2017-01-28 10:08:24 INFO install Reading package lists...
2017-01-28 10:08:24 INFO install W: GPG error: http://ppa.launchpad.net/landscape/landscape-client-cloud-installer/ubuntu xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6E85A86E4652B4E6
2017-01-28 10:08:24 INFO install W: The repository 'http://ppa.launchpad.net/landscape/landscape-client-cloud-installer/ubuntu xenial InRelease' is not signed.
2017-01-28 10:08:25 INFO juju-log Installing ['landscape-client'] with options: ['--option=Dpkg::Options::=--force-confold']
2017-01-28 10:08:25 INFO install Reading package lists...
2017-01-28 10:08:25 INFO install Building dependency tree...
2017-01-28 10:08:25 INFO install Reading state information...
2017-01-28 10:08:26 INFO install The following additional packages will be installed:
2017-01-28 10:08:26 INFO install bc landscape-common python-configobj python-gdbm python-pycurl
2017-01-28 10:08:26 INFO install python-twisted-web
2017-01-28 10:08:26 INFO install Suggested packages:
2017-01-28 10:08:26 INFO install python-configobj-doc python-gdbm-dbg libcurl4-gnutls-dev python-pycurl-dbg
2017-01-28 10:08:26 INFO install python-pycurl-doc
2017-01-28 10:08:26 INFO install The following NEW packages will be installed:
2017-01-28 10:08:26 INFO install bc landscape-client landscape-common python-configobj python-gdbm
2017-01-28 10:08:26 INFO install python-pycurl python-twisted-web
2017-01-28 10:08:26 INFO install 0 upgraded, 7 newly installed, 0 to remove and 8 not upgraded.
2017-01-28 10:08:26 INFO install Need to get 449 kB of archives.
2017-01-28 10:08:26 INFO install After this operation, 2279 kB of additional disk space will be used.
2017-01-28 10:08:26 INFO install WARNING: The following packages cannot be authenticated!
2017-01-28 10:08:26 INFO install landscape-common landscape-client
2017-01-28 10:08:26 INFO install E: There were unauthenticated packages and -y was used without --allow-unauthenticated
2017-01-28 10:08:26 INFO install Traceback (most recent call last):
2017-01-28 10:08:26 INFO install File "/var/lib/juju/agents/unit-landscape-client-57/charm/hooks/install", line 92, in <module>
2017-01-28 10:08:26 INFO install sys.exit(hooks.execute(sys.argv))
2017-01-28 10:08:26 INFO install File "/var/lib/juju/agents/unit-landscape-client-57/charm/hooks/charmhelpers/core/hookenv.py", line 598, in execute
2017-01-28 10:08:26 INFO install self._hooks[hook_name]()
2017-01-28 10:08:26 INFO install File "/var/lib/juju/agents/unit-landscape-client-57/charm/hooks/install", line 42, in install
2017-01-28 10:08:26 INFO install result = subprocess.call(["landscape-config", "--init", "-d", data_path])
2017-01-28 10:08:26 INFO install File "/usr/lib/python3.5/subprocess.py", line 557, in call
2017-01-28 10:08:26 INFO install with Popen(*popenargs, **kwargs) as p:
2017-01-28 10:08:26 INFO install File "/usr/lib/python3.5/subprocess.py", line 947, in __init__
2017-01-28 10:08:26 INFO install restore_signals, start_new_session)
2017-01-28 10:08:26 INFO install File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child
2017-01-28 10:08:26 INFO install raise child_exception_type(errno_num, err_msg)
2017-01-28 10:08:26 INFO install FileNotFoundError: [Errno 2] No such file or directory: 'landscape-config'
2017-01-28 10:08:27 ERROR juju.worker.uniter.operation runhook.go:107 hook "install" failed: exit status 1

In this example, the outcome is different. Here the error is complaining about 'landscape-config' not being found, but the failure was caused above when apt-add-repository failed to retrieve the public key and only partially worked. As a result, the necessary landscape-client package was not installed the charm failed a little later.

It's also incorrect behavior to continue with the charm when a necessary package failed to install.