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
diff --git a/reactive/postgresql/upgrade.py b/reactive/postgresql/upgrade.py
index 494d192..d580935 100644
--- a/reactive/postgresql/upgrade.py
+++ b/reactive/postgresql/upgrade.py
@@ -114,7 +114,7 @@ def upgrade_charm():
114114
115 # Ensure client usernames and passwords match leader settings.115 # Ensure client usernames and passwords match leader settings.
116 for relname in ('db', 'db-admin'):116 for relname in ('db', 'db-admin'):
117 for rel in rels[relname]:117 for rel in rels[relname].values():
118 del rel.local['user']118 del rel.local['user']
119 del rel.local['password']119 del rel.local['password']
120120

Subscribers

People subscribed via source and target branches

to all changes: