juju remove-relation mysql owncloud does not work.

Bug #1315091 reported by Matt Bruzek on 2014-05-01
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
owncloud (Juju Charms Collection)
Undecided
José Antonio Rey

Bug Description

I am doing a review of an owncloud merge proposal and found an unrelated bug.

Here are the steps I ran:

juju deploy owncloud
juju set owncloud domain="10.0.3.171"

(used owncloud in standalone mode)

juju deploy mysql
juju add-relation mysql owncloud

(used owncloud in external database mode)

juju remove-relation mysql owncloud

I attempted to use owncloud after this and got the following error.

[1044] SQLSTATE[42000] [1044] Access denied for user 'paethaicieniaju'@'%' to database 'owncloud'

Is it possible to go back to standalone mode with sqlite? If so we should fix this by adding a db-relation-removed hook that does the right cleanup. If that is not possible, perhaps just install owncloud again so it "looks" right with no errors.

If both those things are not possible we should document this as a known limitation in the README.md file.

Related branches

José Antonio Rey (jose) wrote :

Matt,

I'm going to go ahead and try to find a solution for this bug.

Thanks for letting us know!

Changed in owncloud (Juju Charms Collection):
assignee: nobody → José Antonio Rey (jose)
status: New → In Progress
José Antonio Rey (jose) wrote :

Fixed in the branch.

Changed in owncloud (Juju Charms Collection):
status: In Progress → Fix Committed
Matt Bruzek (mbruzek) wrote :

José,

I was re-reviewing own cloud today with the latest changes the db-relation-departed fails with a different error.

$ juju deploy mysql
$ juju add-relation mysql owncloud
$ juju remove-relation mysql owncloud
$ juju status
...
    units:
      owncloud/0:
        agent-state: error
        agent-state-info: 'hook failed: "db-relation-departed"'
..

$ tail ~/.juju/local/log/unit-owncloud-0.log
...
2014-05-16 17:01:19 INFO juju-log db:3: Writing ownCloud config file

2014-05-16 17:03:43 INFO db-relation-departed + mv /var/www/owncloud/config/config.php /var/www/owncloud/config/config.php.bakmysql
2014-05-16 17:03:43 INFO db-relation-departed mv: cannot stat `/var/www/owncloud/config/config.php': No such file or directory
2014-05-16 17:03:43 ERROR juju.worker.uniter uniter.go:490 hook failed: exit status 1

José Antonio Rey (jose) on 2014-07-22
Changed in owncloud (Juju Charms Collection):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers