The owncloud admin user and password are immutable.

Bug #1315047 reported by Matt Bruzek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
owncloud (Juju Charms Collection)
Fix Released
High
José Antonio Rey

Bug Description

While doing a review of other changes I noticed that the owncloud admin user and password is not accessed in config-changed. This breaks the Juju user experience for configuration options.

All configuration options should be referenced directly or indirectly from the config-changed hook or they are immutable. The user would expect to change any of the values with the "juju set" command

When a user runs a command:

juju set owncloud admin="matt"
juju set owncloud password="blah"

The user expects the password to change. But the password is only handled in the db-relation-changed which is not called from config-changed so the values are not updated after juju set.

Related branches

Revision history for this message
José Antonio Rey (jose) wrote :

Matt,

As it is references on the README, these values are only used when mysql is related as a database. If you are using a standalone deployment, it will use SQLite, and the values will not be valid.

Changed in owncloud (Juju Charms Collection):
status: New → Incomplete
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

Changed in owncloud (Juju Charms Collection):
status: Incomplete → New
assignee: nobody → José Antonio Rey (jose)
Revision history for this message
José Antonio Rey (jose) wrote :

Hey Matt,

Should be solved now.

Changed in owncloud (Juju Charms Collection):
status: New → Fix Committed
importance: Undecided → High
José Antonio Rey (jose)
Changed in owncloud (Juju Charms Collection):
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.