Skip to content

WIP: Allow primary to pause PG WAL via api

Alex Ives requested to merge alexives/35913/geo_pause_via_primary into master

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

Availability and Testing

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

Merge request reports