xenial error on config-changed

Bug #1598268 reported by James Jesudason
6
This bug affects 1 person
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=Dpkg::Options::=--force-confold']
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-pyasn1-modules'] with options: ['--option=Dpkg::Options::=--force-confold']
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-pyasn1-modules is already the newest version (0.0.7-0.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 config-changed Traceback (most recent call last):
2016-07-01 17:13:20 INFO config-changed File "/var/lib/juju/agents/unit-haproxy-5/charm/hooks/config-changed", line 1362, in <module>
2016-07-01 17:13:20 INFO config-changed main(hook_name)
2016-07-01 17:13:20 INFO config-changed File "/var/lib/juju/agents/unit-haproxy-5/charm/hooks/config-changed", line 1320, in main
2016-07-01 17:13:20 INFO config-changed config_changed()
2016-07-01 17:13:20 INFO config-changed File "/var/lib/juju/agents/unit-haproxy-5/charm/hooks/config-changed", line 930, in config_changed
2016-07-01 17:13:20 INFO config-changed haproxy_globals = create_haproxy_globals()
2016-07-01 17:13:20 INFO config-changed File "/var/lib/juju/agents/unit-haproxy-5/charm/hooks/config-changed", line 161, in create_haproxy_globals
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/juju/agents/unit-haproxy-5/charm/hooks/config-changed", line 1173, in has_ssl_support
2016-07-01 17:13:20 INFO config-changed cache = apt_cache()
2016-07-01 17:13:20 INFO config-changed File "/var/lib/juju/agents/unit-haproxy-5/charm/hooks/charmhelpers/fetch/__init__.py", line 169, in apt_cache
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.uniter.operation runhook.go:107 hook "config-changed" failed: exit status 1

Related branches

Revision history for this message
James Jesudason (jamesj) wrote :

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.

tags: added: kanban-cross-team landscape
Changed in haproxy (Juju Charms Collection):
status: New → Fix Released
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.