Attempt to set-up a MasterPolicyDB policy should fail when in read-only mode
Bug #675562 reported by
Francis J. Lacoste
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
High
|
Stuart Bishop |
Bug Description
AFAIU, it is still possible to set-up a MasterPolicy policy when the app servers are in read-only mode. This would occur for example if a request to the private XML-RPC end-point is made while in read-only mode.
This will still fail as the master won't be reachable, or the connection will be killed when the DB is restarted.
We are still disabling client services when doing an upgrade, so the risk of this happening is limited and the consequences might be relatively minor.
But I think it would be safer to fail early and cleanly in that case.
Related branches
lp://qastaging/~stub/launchpad/bug-675562-readonly-violation
- Jeroen T. Vermeulen (community): Approve
-
Diff: 229 lines (+82/-14)4 files modifiedlib/canonical/launchpad/doc/db-policy.txt (+26/-0)
lib/canonical/launchpad/tests/readonly.py (+18/-1)
lib/canonical/launchpad/webapp/adapter.py (+33/-13)
lib/canonical/launchpad/webapp/dbpolicy.py (+5/-0)
Changed in launchpad-foundations: | |
status: | Triaged → In Progress |
Changed in launchpad-foundations: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
We change the db server to reject connections, so this will definitely fail. However I agree that doing the change suggested here would be safer and is important to do.