"master-relation-changed" hook references non-existent Apache Virtual hosts

Bug #1314763 reported by Zack Parrish
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
mysql (Juju Charms Collection)
Fix Released
Undecided
Unassigned

Bug Description

While investigating a MaaS / Juju setup exclusively on Trusty, I was receiving an error from this hook about "site doesn't exist" from lines 50 and 51.

Basically, it's trying to enable or disable sites called "mysql-dumps" and "default". While recently setting up a 14.04 LTS web server, I saw a similar error when configuring virtual host files in Apache. For some reason, the new file format for virtual hosts must include a ".conf" extension by default. I was able to fix this by simply SSH'ing into the Juju machine hosting the MySQL service and copying the following files:

mysql-dumps
000-default.conf

by running:

cd /etc/apache2/site-available
sudo su
cp mysql-dumps mysql-dumps.conf
cp 000-default.conf default.conf

I didn't submit this as a patch as I wasn't sure if there was a better way to allow Apache to see the files already created by the charm installation and hooks. Thanks!

Related branches

Revision history for this message
Darryl Weaver (dweaver) wrote :

I also ran into this problem when trying to add a mysql-slave host to create a cluster from an existing master.

Changed in mysql (Juju Charms Collection):
status: New → Confirmed
Revision history for this message
Darryl Weaver (dweaver) wrote :

Confirmed with cs:trusty/mysql-3.
Caused by the change in apache2 version from 2.2 on precise to 2.4 on trusty.
Apache 2.4 uses sitename.conf in /etc/apache2/sites-available/ and the default site is named 000-default and not default.

Darryl Weaver (dweaver)
Changed in mysql (Juju Charms Collection):
status: Confirmed → Fix Committed
status: Fix Committed → 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.