Page MenuHomePhabricator

Gerrit read-only plugin test
Closed, ResolvedPublic

Description

While working on improving the automation of Gerrit failover after the last incident we had; we opened the conversation to challenge the way we are synchronizing data across Gerrit instances. In this conversation, the idea of using Gerrit's read-only plugin emerged as a potential solution to simplify the way we are handling things. The best case scenario would be to be able to stop contributions from coming-in while embedded replication finishes its jobs, switch-over to the other instance and wait for the proper conditions to be satisfied to open the service again for writes.

  • ensure of it is still maintained as the last commit is old enough to raise the question.
  • explore the capabilities and compatibility of the read-only plugin to ensure it would fit our use case
  • test the solution
  • implement in production
  • update gerrit failover cookbook

Event Timeline

read-only is not flagged as deprecated or obsolete, its documentation is still in the main repository

The read-only plugin will be relevant to use in the context of switchovers to help wait for the replication threads to finish their jobs and to prevent writing on the wrong instance until we've reached a stable state after the switchover is done.
It should not be used in normal production situations. Using read-only too extensively in our situation might complicate switchovers and debugging given we don't rely on Gerrit internal SSH to replicate the data, to use instead the host's SSH server. That means a host could ignore the read-only status of a replication target, which could be unfortunate.

Change #1159395 had a related patch set uploaded (by Arnaudb; author: Arnaudb):

[operations/cookbooks@master] gerrit: read-only plugin orchestration in failover

https://gerrit.wikimedia.org/r/1159395

ABran-WMF updated the task description. (Show Details)

Change #1159395 merged by jenkins-bot:

[operations/cookbooks@master] gerrit: read-only plugin orchestration in failover

https://gerrit.wikimedia.org/r/1159395