WIP: Allow primary to pause PG WAL via api
What does this MR do?
Rather than requiring users to pause secondaries from a command line tool, this MR explores the idea of pausing the secondaries via API from the primary. Since the secondary db user is allowed to pause replication, it can be executed as a result of a trigger from the geo jwt api (rather than as a geo event in the database)
This MR adds:
- A geo API that pauses the PG WAL replay
- A service that calls the api on the secondary from the primary
- An after-hook on geo_node that will call the api to pause wal replay if the node is disabled
Still needs:
-
More test coverage for added functionality -
Manual local testing -
Manual testing in a deployed geo cluster
Additionally, there is a second merge request that implements this feature as a rake task to be run from the secondary. See !29515 (merged)
Screenshots
No UI changes
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team