Merge ~jason-hobbs/postgresql-charm:fix-iteration-over-relations into postgresql-charm:master

Proposed by Jason Hobbs
Status: Merged
Merge reported by: Stuart Bishop
Merged at revision: bd23d09dd59e9b599b9d62eb9a97723ae8da74af
Proposed branch: ~jason-hobbs/postgresql-charm:fix-iteration-over-relations
Merge into: postgresql-charm:master
Diff against target: 12 lines (+1/-1)
1 file modified
reactive/postgresql/upgrade.py (+1/-1)
Reviewer Review Type Date Requested Status
Stuart Bishop (community) Approve
Greg Lutostanski (community) Approve
Review via email: mp+331819@code.launchpad.net

Description of the change

I hit this error in the charm upgrading one of my units today:

http://paste.ubuntu.com/25675410/

I tested this change and it fixed the issue.

To post a comment you must log in.
Revision history for this message
Greg Lutostanski (lutostag) :
review: Approve
Revision history for this message
Stuart Bishop (stub) wrote :

Ta. I think my upgrade test must be missing a relation or got skipped.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/reactive/postgresql/upgrade.py b/reactive/postgresql/upgrade.py
2index 494d192..d580935 100644
3--- a/reactive/postgresql/upgrade.py
4+++ b/reactive/postgresql/upgrade.py
5@@ -114,7 +114,7 @@ def upgrade_charm():
6
7 # Ensure client usernames and passwords match leader settings.
8 for relname in ('db', 'db-admin'):
9- for rel in rels[relname]:
10+ for rel in rels[relname].values():
11 del rel.local['user']
12 del rel.local['password']
13

Subscribers

People subscribed via source and target branches

to all changes: