xenial error on config-changed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
haproxy (Juju Charms Collection) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
The config-changed hook is failing in the charmhelper when installing on Xenial:
2016-07-01 17:13:20 INFO config-changed Reading package lists...
2016-07-01 17:13:20 INFO juju-log Installing ['haproxy', 'python-jinja2'] with options: ['--option=
2016-07-01 17:13:20 INFO config-changed Reading package lists...
2016-07-01 17:13:20 INFO config-changed Building dependency tree...
2016-07-01 17:13:20 INFO config-changed Reading state information...
2016-07-01 17:13:20 INFO config-changed python-jinja2 is already the newest version (2.8-1).
2016-07-01 17:13:20 INFO config-changed haproxy is already the newest version (1.6.3-1ubuntu0.1).
2016-07-01 17:13:20 INFO config-changed 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2016-07-01 17:13:20 INFO juju-log Installing ['python-pyasn1', 'python-
2016-07-01 17:13:20 INFO config-changed Reading package lists...
2016-07-01 17:13:20 INFO config-changed Building dependency tree...
2016-07-01 17:13:20 INFO config-changed Reading state information...
2016-07-01 17:13:20 INFO config-changed python-pyasn1 is already the newest version (0.1.9-1).
2016-07-01 17:13:20 INFO config-changed python-
2016-07-01 17:13:20 INFO config-changed 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2016-07-01 17:13:20 INFO config-changed Traceback (most recent call last):
2016-07-01 17:13:20 INFO config-changed File "/var/lib/
2016-07-01 17:13:20 INFO config-changed main(hook_name)
2016-07-01 17:13:20 INFO config-changed File "/var/lib/
2016-07-01 17:13:20 INFO config-changed config_changed()
2016-07-01 17:13:20 INFO config-changed File "/var/lib/
2016-07-01 17:13:20 INFO config-changed haproxy_globals = create_
2016-07-01 17:13:20 INFO config-changed File "/var/lib/
2016-07-01 17:13:20 INFO config-changed if has_ssl_support():
2016-07-01 17:13:20 INFO config-changed File "/var/lib/
2016-07-01 17:13:20 INFO config-changed cache = apt_cache()
2016-07-01 17:13:20 INFO config-changed File "/var/lib/
2016-07-01 17:13:20 INFO config-changed from apt import apt_pkg
2016-07-01 17:13:20 INFO config-changed ImportError: No module named apt
2016-07-01 17:13:20 ERROR juju.worker.
Related branches
- Review Queue (community): Needs Fixing (automated testing)
- Cory Johns (community): Approve
-
Diff: 662 lines (+379/-190)7 files modifiedfiles/nrpe/check_haproxy.sh (+1/-1)
hooks/hooks.py (+8/-6)
hooks/tests/test_install.py (+3/-1)
metadata.yaml (+3/-0)
tests/10_deploy_test.py (+0/-182)
tests/11_deploy_test_trusty.py (+182/-0)
tests/12_deploy_test_xenial.py (+182/-0)
tags: | added: kanban-cross-team landscape |
Changed in haproxy (Juju Charms Collection): | |
status: | New → Fix Released |
This appears to be due to a missing package: python-apt
The simplest solution seems to be to include the installation of python-apt.
However, python3-apt *is* installed, but the hooks.py script is running as python2. However, additional changes will need to be made if the script is to run as python3.