Designate service permanently broken after relation removal
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Designate Charm |
Confirmed
|
Medium
|
Unassigned |
Bug Description
Summary:
Removing the relation between designate:shared-db and mysql:shared-db causes designate to be permanently unable to re-attach to the database. Re-adding the relation after it's been removed is only partly successful, and while the relation is shown as existing, the database is never set up again, and the status gets stuck at 'Blocked: shared-db incomplete'
What I did:
On an existing environment, I removed the designate - mysql relation (because it was not working) and re-added it.
What I expected:
I expected after the relation establishment process was finished, we would have a working relation and designate would be able to talk to its database.
What happened instead:
The relation process on the designate side failed to fully complete and stuck at 'Blocked: shared-db incomplete'
What appears to be the cause:
When the relation was removed, two reactive states remained: db.synched and shared-db.setup
The code in the charm seems to guard the setup based on whether shared-db.setup is not set. This means that in this scenario, it can't run the setup.
It appears that when the relation is removed, the db.synched and shared-db.setup flags should be removed.
Workaround:
After the removal of the relation I manually cleared the two flags on each unit:
juju run --unit designate/0 'charms.reactive clear_flag db.synched'
juju run --unit designate/0 'charms.reactive clear_flag shared-db.setup'
Then, after a moment or two, I re-added the designate:shared-db mysql:shared-db relation and the process was able to complete and created the designate database as expected.
Changed in charm-designate: | |
importance: | Undecided → Medium |
status: | New → Confirmed |
Also - it appears when the relation is removed, the database is not removed from the mysql server (though I'm not 100% sure if that is designate's job, or mysql's job)