Skip to content

Update gitlab-shell chart to make grace-period configurable

Igor Drozdov requested to merge id-gitlab-sshd-grace-period into master

What does this MR do?

Update gitlab-shell chart to make grace-period configurable

Grace period specifies how long the server waits before completing the shutdown. We can use Kubernetes' terminationGracePeriodSeconds for this setting and set a value 5 seconds smaller than that in order to give some time to gitlab-sshd to exit gracefully.

Related issues

gitlab-org/gitlab-shell#565 (closed)

gitlab-org/gitlab-shell!484 (merged)

Testing

  1. Deploy a Cloud Native GitLab cluster with the Helm Chart. Apply these values.yaml settings:
gitlab:
  gitlab-shell:
    sshDaemon: "gitlab-sshd"
    deployment:
      terminationGracePeriodSeconds: 30
  1. Initiate a long-running SSH operation:
ssh -x git@<YOUR CLUSTER IP> -p 2222 "git-upload-pack '/root/test'"

or

git clone ssh://git@<YOUR CLUSTER IP>:2222/root/very-large-project.git
  1. Terminate gitlab-sshd process to initiate shutdown
  • New connections are rejected
  • When the long-running clone completes or is canceled, the gitlab-sshd process shuts down
  • When terminationGracePeriodSeconds expires before the long-running clone completes, the clone is canceled

Checklist

See Definition of done.

For anything in this list which will not be completed, please provide a reason in the MR discussion.

Required

  • Merge Request Title and Description are up to date, accurate, and descriptive
  • MR targeting the appropriate branch
  • MR has a green pipeline on GitLab.com

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes
  • Documentation created/updated
  • Tests added
  • Integration tests added to GitLab QA
  • Equivalent MR/issue for omnibus-gitlab opened
Edited by Jason Plum

Merge request reports