Race condition in config-changed hook

Bug #1270968 reported by Charles Butler
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mediawiki (Juju Charms Collection)
Fix Released
Undecided
Unassigned

Bug Description

What I did: Added administrators to the charm via juju set admins="foo:bar"

What I expected: To have administrators populated in mediawiki, without error

what happened:

The charm assumes there is a MySQL database relationship defined (When LocalSettings.php is generated) in config-changed. This bug rears its head when you attempt to add administrators to MediaWiki without having a MySQL database relationship defined.

relevant lines:
 for admin in $admins ; do
        user=`echo $admin | cut -d: -f1`
        pass=`echo $admin | cut -d: -f2`
        output=`php createAndPromote.php --conf /etc/mediawiki/LocalSettings.php $user $pass`
        if [ ! "$output" = "account exists." ] ; then
            echo $output
            exit 1
        fi

Proposed fix:
http://bazaar.launchpad.net/~lazypower/charms/precise/mediawiki/tests/revision/74 contains an ammendment to the config-changed hook

Tags: audit

Related branches

Changed in mediawiki (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.