Skip to content
Snippets Groups Projects

Add a missing symlink for /opt/gitlab/init/sshd to make `gitlab-ctl stop` work in Docker

Merged Stan Hu requested to merge fix-gitlab-ctl-down-in-docker into master

In a Docker container, running gitlab-ctl stop would return an error code of 127, since /opt/gitlab/init/sshd did not exist.

Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/2406

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Stan Hu added 2 commits

    added 2 commits

    • 4a098168 - Add a missing symlink for /opt/gitlab/init/sshd to make gitlab-ctl stop work in Docker
    • f43daa0f - Add CHANGELOG.md for Docker sshd fix

    Compare with previous version

  • Author Maintainer

    I'm having a bit of a hard time actually creating a Docker image with this change to fully test this.

    @twk3 can you review this?

  • Contributor

    @stanhu looks good to me:

    root@3abb81763161:/# gitlab-ctl status
    run: gitaly: (pid 1005) 201s; run: log: (pid 765) 228s
    run: gitlab-monitor: (pid 1068) 199s; run: log: (pid 896) 214s
    run: gitlab-workhorse: (pid 1016) 200s; run: log: (pid 778) 227s
    run: logrotate: (pid 818) 225s; run: log: (pid 817) 225s
    run: nginx: (pid 788) 226s; run: log: (pid 787) 226s
    run: node-exporter: (pid 855) 217s; run: log: (pid 854) 217s
    run: postgres-exporter: (pid 1054) 199s; run: log: (pid 881) 215s
    run: postgresql: (pid 600) 292s; run: log: (pid 599) 292s
    run: prometheus: (pid 1035) 200s; run: log: (pid 830) 223s
    run: redis: (pid 559) 298s; run: log: (pid 558) 298s
    run: redis-exporter: (pid 869) 216s; run: log: (pid 868) 216s
    run: sidekiq: (pid 756) 229s; run: log: (pid 755) 229s
    run: sshd: (pid 34) 308s; run: log: (pid 33) 308s
    run: unicorn: (pid 725) 230s; run: log: (pid 724) 230s
    root@3abb81763161:/# gitlab-ctl status sshd
    run: sshd: (pid 34) 315s; run: log: (pid 33) 315s
    root@3abb81763161:/# gitlab-ctl stop       
    ok: down: gitaly: 0s, normally up
    ok: down: gitlab-monitor: 0s, normally up
    ok: down: gitlab-workhorse: 1s, normally up
    ok: down: logrotate: 0s, normally up
    ok: down: nginx: 1s, normally up
    ok: down: node-exporter: 0s, normally up
    ok: down: postgres-exporter: 0s, normally up
    ok: down: postgresql: 0s, normally up
    ok: down: prometheus: 0s, normally up
    ok: down: redis: 1s, normally up
    ok: down: redis-exporter: 0s, normally up
    ok: down: sidekiq: 0s, normally up
    ok: down: sshd: 0s, normally up
    ok: down: unicorn: 1s, normally up
    root@3abb81763161:/# gitlab-ctl start
    ok: run: gitaly: (pid 1599) 0s
    ok: run: gitlab-monitor: (pid 1605) 1s
    ok: run: gitlab-workhorse: (pid 1608) 0s
    ok: run: logrotate: (pid 1622) 0s
    ok: run: nginx: (pid 1628) 1s
    ok: run: node-exporter: (pid 1640) 0s
    ok: run: postgres-exporter: (pid 1646) 1s
    ok: run: postgresql: (pid 1652) 0s
    ok: run: prometheus: (pid 1660) 1s
    ok: run: redis: (pid 1674) 0s
    ok: run: redis-exporter: (pid 1678) 0s
    ok: run: sidekiq: (pid 1684) 1s
    ok: run: sshd: (pid 1687) 0s
    ok: run: unicorn: (pid 1689) 1s
  • Author Maintainer

    @twk3 Thanks! Could you run one more test by running echo $? after gitlab-ctl stop?

  • Contributor

    @stanhu

    root@743ee0bc3eaf:/# echo $?
    0
  • Author Maintainer

    Great, thanks! That's the return code we want.

  • Contributor

    docker hub upload was slow, but I uploaded it under twk3/gitlab-ce:ssh-runit in case someone wants to test it further. It's 9.1.4+ this change.

  • Marin Jankovski approved this merge request

    approved this merge request

  • Marin Jankovski mentioned in commit 88d07fb4

    mentioned in commit 88d07fb4

  • Marin Jankovski mentioned in commit dea59efd

    mentioned in commit dea59efd

  • Marin Jankovski mentioned in commit 46781902

    mentioned in commit 46781902

  • Stan Hu mentioned in issue #2371 (closed)

    mentioned in issue #2371 (closed)

Please register or sign in to reply
Loading