Attempt to set-up a MasterPolicyDB policy should fail when in read-only mode

Bug #675562 reported by Francis J. Lacoste on 2010-11-15
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
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

Robert Collins (lifeless) wrote :

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.

Changed in launchpad-foundations:
status: New → Triaged
importance: Undecided → High
Stuart Bishop (stub) wrote :

We can make BaseDatabasePolicy.getStore() raise ReadOnlyModeDisallowedStore if a request for a master store is made while in read only mode.

On Tue, Nov 16, 2010 at 5:27 PM, Stuart Bishop
<email address hidden> wrote:
> We can make BaseDatabasePolicy.getStore() raise
> ReadOnlyModeDisallowedStore if a request for a master store is made
> while in read only mode.

Please!

Gary Poster (gary) on 2010-11-16
Changed in launchpad-foundations:
status: Triaged → In Progress
Changed in launchpad-foundations:
assignee: nobody → Stuart Bishop (stub)
milestone: none → 10.12
tags: added: qa-needstesting
Changed in launchpad-foundations:
status: In Progress → Fix Committed
Robert Collins (lifeless) wrote :

This would be testing a negative - its a belts and bracers helper.

tags: added: qa-untestable
removed: qa-needstesting
Changed in launchpad-foundations:
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