Skip to content

Add gitaly graceful restart wrapper

Alessio Caiazza requested to merge gitaly-zero-downtime-deployment into master

This MR implements gitaly 0 downtime deployment in omnibus.

Gitaly MR gitaly!1133 (merged)

gitaly-wrapper

Instead of spawning gitaly we start gitaly-wrapper.

  1. the wrapper searches a pid-file on the path specified in the env var GITALY_PID_FILE
  2. if not found it will spawn a process identified by gitaly-wrapper parameters
  3. the wrapper traps all the signals and send them to gitaly
  4. the wrapper will wait until the process is alive

When an SIGHUP is received by gitaly it will spawn a new process and pass it all the listening socket, when the new process is ready the old one termiate.

In this case also the wrapper terminates, and when runit respawn it, the already running gitaly will be adopted thanks to the pid-file.

closes gitaly#227 (closed)

Edited by GitLab Release Tools Bot

Merge request reports