Story #7120
closedAs a plugin developer, I have docs that require me to support zero-downtime upgrades and docs explaining how to do so
0%
Description
Ticket moved to GitHub: "pulp/pulpcore/1915":https://github.com/pulp/pulpcore/issues/1915
Background¶
Zero downtime migrations are needed for the following reasons:
- the operator facilitating the current upgrade process will be very difficult. Do-able but difficult
- downtime is very undesirable
- the installer struggles to support this today, and as it moves more into clustered installs it will become increasing complex
So the goal is to take the current upgrade process with is:
- Stop all services
- Upgrade code
- Run migrations
- Start all services
To one like this:
- Upgrade code
- Run migrations
- Restart all services
Proposal¶
Have pulpcore and plugin writers ship migrations which require zero-downtime.
How to do this?¶
These articles outline it pretty well, but basically you need to split the migration into additive and destructive changes.
https://wxweekly.com/zero-downtime-deploys-a-tale-of-django-migrations-7a040f425e4a https://pypi.org/project/django-pg-zero-downtime-migrations/
The work to accomplish this¶
- Reach agreement with the pulp community through the mailing list
- Add to the plugin writer docs this requirement
- Add the migration checks to the CI recommended in https://wxweekly.com/zero-downtime-deploys-a-tale-of-django-migrations-7a040f425e4a
Updated by fao89 over 2 years ago
Talking about "seamless upgrade" from operator, I think one pain we have is plugins requiring different versions of pulpcore.
Let's say I use pulp_file, pulp_container, and pulp_rpm, new pulpcore and pulp_file version are released. What the operator should do? Only update the pulpcore when all installed plugins support it?
Updated by mdellweg over 2 years ago
Part of the policy should be, that removals (destructive migrations) can only ever happen at major or minor releases. This would allow that you can always install the latest bugfix release of your current y-release. Maybe we need to claim that you can only upgrade seemlessly from the latest bugfix to the next minor version.
Updated by pulpbot about 1 year ago
- Description updated (diff)
- Status changed from NEW to CLOSED - DUPLICATE