Merge lp:~stub/launchpad/db-deploy into lp:launchpad/db-devel
Status: | Merged | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Approved by: | Robert Collins | ||||||||||||||||||||
Approved revision: | no longer in the source branch. | ||||||||||||||||||||
Merged at revision: | 10479 | ||||||||||||||||||||
Proposed branch: | lp:~stub/launchpad/db-deploy | ||||||||||||||||||||
Merge into: | lp:launchpad/db-devel | ||||||||||||||||||||
Prerequisite: | lp:~stub/launchpad/pending-db-changes | ||||||||||||||||||||
Diff against target: |
308 lines (+282/-6) 3 files modified
database/schema/full-update.py (+56/-0) database/schema/preflight.py (+222/-0) database/schema/security.py (+4/-6) |
||||||||||||||||||||
To merge this branch: | bzr merge lp:~stub/launchpad/db-deploy | ||||||||||||||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Robert Collins (community) | Approve | ||
Review via email: mp+59065@code.launchpad.net |
Commit message
preflight check and automated production deployment script
Description of the change
There are a number of checks we need to make before proceding with production database updates. preflight.py automates these checks.
full-update.py runs the database update steps in sequence, including the new preflight.py check. This is to make production rollouts smoother and minimize downtime windows.
unfortunately, we can't enable preflight.py on staging yet. One of the checks it makes is to confirm there are no non-system connections open to the active databases. Unfortunately, the staging update scripts neglect to disable cronjobs when doing a code-only update so preflight.py (and full-update.py) will normally fail. This fail is correct - these rogue connections occasionally cause the staging update to fail and are exactly the sort of thing we are trying to catch during production rollouts.