Comment 2 for bug 1315047

Revision history for this message
Matt Bruzek (mbruzek) wrote :

José

Your point is valid on owncloud running with SQLite. The owncloud install process allows users to set the admin user and password on first setup. It would be nice if we could use the user and password in the charm for these values too.

Having the user and password only read at the database relation set breaks the user experience.

As a user of Juju I expect that all charm configuration is set when I call: juju set charm key=value The owncloud config-changed hook runs when juju set is called but the user and password are never read or changed (even when I am connected to mysql!).

So basically you can only set the admin user name and password one time before calling juju add-relation mysql owncloud otherwise the user/password will never be read again. I believe this is an immutable configuration option which is highly discouraged in charms.

One solution would be read the user/password in config-changed and set the values appropriately in the /var/www/owncloud/config/config.php and restart. If that does not work perhaps there is another way (a database command) to change the user and password.

- Matt