apache2 missing install dependency

Bug #1302645 reported by Andreas Hasenack
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apache2 (Juju Charms Collection)
New
Undecided
Unassigned

Bug Description

Hi,

I used the apache2 charm on digitalocean and noticed that it's missing a dependency on python-yaml. That package is probably installed in the ubuntu cloud images elsewhere, but not in DO's:

2014-04-04 14:20:19 INFO juju.worker.uniter uniter.go:469 running "install" hook
2014-04-04 14:20:19 INFO worker.uniter.jujuc server.go:103 running hook tool "juju-log" ["Invoking charm-pre-install hooks"]
2014-04-04 14:20:19 DEBUG worker.uniter.jujuc server.go:104 hook context id "apache2/0:install:1366138670011990355"; dir "/var/lib/juju/agents/unit-apache2-0/charm"
2014-04-04 14:20:19 INFO juju-log Invoking charm-pre-install hooks
2014-04-04 14:20:19 INFO worker.uniter.jujuc server.go:103 running hook tool "juju-log" ["Invoking python-based install hook"]
2014-04-04 14:20:19 DEBUG worker.uniter.jujuc server.go:104 hook context id "apache2/0:install:1366138670011990355"; dir "/var/lib/juju/agents/unit-apache2-0/charm"
2014-04-04 14:20:19 INFO juju-log Invoking python-based install hook
2014-04-04 14:20:19 INFO install Traceback (most recent call last):
2014-04-04 14:20:19 INFO install File "hooks/hooks.py", line 8, in <module>
2014-04-04 14:20:19 INFO install import yaml
2014-04-04 14:20:19 INFO install ImportError: No module named yaml
2014-04-04 14:20:19 ERROR juju.worker.uniter uniter.go:475 hook failed: exit status 1

Suggested fix:
--- hooks/install.orig 2014-04-04 10:43:18.741638000 -0400
+++ hooks/install 2014-04-04 10:43:19.881638000 -0400
@@ -2,6 +2,12 @@

 set -eu

+apt_get_install() {
+ DEBIAN_FRONTEND=noninteractive apt-get -y -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install $@
+}
+
+apt_get_install python-yaml
+
 juju-log 'Invoking charm-pre-install hooks'
 [ -d exec.d ] && ( for f in exec.d/*/charm-pre-install; do [ -x $f ] && /bin/sh -c "$f"; done )

Tags: landscape

Related branches

affects: haproxy (Juju Charms Collection) → apache2 (Juju Charms Collection)
David Britton (dpb)
Changed in apache2 (Juju Charms Collection):
assignee: nobody → David Britton (davidpbritton)
status: New → In Progress
tags: added: landscape
Revision history for this message
David Britton (dpb) wrote :

Marking fixed-released since it's in the precise charm. the trusty mp is here:

https://code.launchpad.net/~davidpbritton/charms/trusty/apache2/avoid-regen-cert/+merge/223990

Changed in apache2 (Juju Charms Collection):
status: In Progress → Fix Released
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

This bug is back:
2014-11-19 18:27:32 DEBUG juju.worker.logger logger.go:45 reconfiguring logging from "<root>=DEBUG" to "<root>=WARNING;unit=DEBUG"
2014-11-19 18:27:33 INFO juju-log Invoking charm-pre-install hooks
2014-11-19 18:27:33 INFO juju-log Invoking python-based install hook
2014-11-19 18:27:33 INFO install Traceback (most recent call last):
2014-11-19 18:27:33 INFO install File "hooks/hooks.py", line 8, in <module>
2014-11-19 18:27:33 INFO install import yaml
2014-11-19 18:27:33 INFO install ImportError: No module named yaml
2014-11-19 18:27:33 ERROR juju.worker.uniter uniter.go:486 hook failed: exit status 1

Changed in apache2 (Juju Charms Collection):
status: Fix Released → New
David Britton (dpb)
Changed in apache2 (Juju Charms Collection):
assignee: David Britton (davidpbritton) → nobody
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.