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
=== modified file 'hooks/hooks.py'
--- hooks/hooks.py 2012-10-04 15:04:38 +0000
+++ hooks/hooks.py 2014-04-10 15:43:39 +0000
@@ -111,7 +111,8 @@
111 control(GMOND, RESTART)111 control(GMOND, RESTART)
112112
113113
114APACHE_CONFIG = "/etc/apache2/conf.d/ganglia.conf"114#APACHE_CONFIG = "/etc/apache2/conf.d/ganglia.conf"
115APACHE_CONFIG = "/etc/apache2/sites-available/ganglia.conf"
115GANGLIA_APACHE_CONFIG = "/etc/ganglia-webfrontend/apache.conf"116GANGLIA_APACHE_CONFIG = "/etc/ganglia-webfrontend/apache.conf"
116117
117118
@@ -119,6 +120,11 @@
119 juju_log("INFO", "Configuring apache vhost for ganglia master")120 juju_log("INFO", "Configuring apache vhost for ganglia master")
120 if not os.path.exists(APACHE_CONFIG):121 if not os.path.exists(APACHE_CONFIG):
121 os.symlink(GANGLIA_APACHE_CONFIG, APACHE_CONFIG)122 os.symlink(GANGLIA_APACHE_CONFIG, APACHE_CONFIG)
123 command = [ 'a2ensite', os.path.basename(APACHE_CONFIG) ]
124 code = subprocess.call(command)
125 if code != 0:
126 juju-log("ERROR", "Unable to configure apache2")
127 exit(code)
122 control(APACHE, RELOAD)128 control(APACHE, RELOAD)
123129
124130

Subscribers

People subscribed via source and target branches

to all changes: