Merge lp:~mbruzek/charms/precise/ganglia/apache2fix into lp:charms/ganglia

Proposed by Matt Bruzek
Status: Merged
Merged at revision: 32
Proposed branch: lp:~mbruzek/charms/precise/ganglia/apache2fix
Merge into: lp:charms/ganglia
Diff against target: 23 lines (+7/-1)
1 file modified
hooks/hooks.py (+7/-1)
To merge this branch: bzr merge lp:~mbruzek/charms/precise/ganglia/apache2fix
Reviewer Review Type Date Requested Status
Marco Ceppi (community) Approve
Review via email: mp+215221@code.launchpad.net

Description of the change

Apache2 changed how they enable sites, this fixes that problem. Tested on precise and trusty.

To post a comment you must log in.
Revision history for this message
Matt Bruzek (mbruzek) wrote :

I found a bug when deploying ganglia in trusty. The fix works for both trusty and precise (I tested it).

Please review and let me know.

Thanks!

Revision history for this message
Marco Ceppi (marcoceppi) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/hooks.py'
2--- hooks/hooks.py 2012-10-04 15:04:38 +0000
3+++ hooks/hooks.py 2014-04-10 15:43:39 +0000
4@@ -111,7 +111,8 @@
5 control(GMOND, RESTART)
6
7
8-APACHE_CONFIG = "/etc/apache2/conf.d/ganglia.conf"
9+#APACHE_CONFIG = "/etc/apache2/conf.d/ganglia.conf"
10+APACHE_CONFIG = "/etc/apache2/sites-available/ganglia.conf"
11 GANGLIA_APACHE_CONFIG = "/etc/ganglia-webfrontend/apache.conf"
12
13
14@@ -119,6 +120,11 @@
15 juju_log("INFO", "Configuring apache vhost for ganglia master")
16 if not os.path.exists(APACHE_CONFIG):
17 os.symlink(GANGLIA_APACHE_CONFIG, APACHE_CONFIG)
18+ command = [ 'a2ensite', os.path.basename(APACHE_CONFIG) ]
19+ code = subprocess.call(command)
20+ if code != 0:
21+ juju-log("ERROR", "Unable to configure apache2")
22+ exit(code)
23 control(APACHE, RELOAD)
24
25

Subscribers

People subscribed via source and target branches

to all changes: