on systemd hosts using gitlab-ctl uninstall leaves the service running

Summary

When using gitlab-ctl uninstall it does not stop the systemd service gitlab-runsvdir it only checks for upstart, and inittab mechanisms for running runit.

The omnibus-ctl looks inactive as a project.

Steps to reproduce

This doc omnibus-gitlab README details the steps for uninstalling GitLab.

When using these the systemd service is unaffected and continues to run in the background, causing uncertainty and confusing to the status of GitLab.

What is the current bug behavior?

gitlab-ctl uninstall omnibus-cl doesn't cater for systemd only the older upstart and inittab methods for process control.

Before running gitlab-ctl you can run

sudo systemctl stop    gitlab-runsvdir
sudo systemctl disable gitlab-runsvdir
sudo rm /usr/lib/systemd/system/gitlab-runsvdir.service
sudo systemctl daemon-reload    # a soft reload

sudo gitlab-ctl uninstall

What is the expected correct behavior?

gitlab-ctl uninstall to manage the systemd gitlab-runsvdir

Relevant logs

Relevant logs
root@ubuntu-1604:~# sudo systemctl status  gitlab-runsvdir
● gitlab-runsvdir.service - GitLab Runit supervision process
   Loaded: loaded (/usr/lib/systemd/system/gitlab-runsvdir.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2020-01-16 16:49:10 AEST; 1h 11min ago
 Main PID: 13692 (runsvdir)
    Tasks: 277 (limit: 4915)
   Memory: 1.8G
      CPU: 8min 1.832s
   CGroup: /system.slice/gitlab-runsvdir.service
           ├─13692 runsvdir -P /opt/gitlab/service log: ............................................................................................................................................................
           ├─13694 runsv redis
           ├─13695 runsv postgres-exporter
           ...

root@ubuntu-1604:~# gitlab-ctl uninstall ok: down: alertmanager: 0s, normally up ok: down: gitaly: 0s, normally up ...

could not find alertmanager runit pidfile (service already stopped?), cannot attempt SIGKILL... ok: down: alertmanager: 12s, normally up could not find gitaly runit pidfile (service already stopped?), cannot attempt SIGKILL... ok: down: gitaly: 11s, normally up ...

Wait a few seconds for runsv to restart the GitLab processes

root@ubuntu-1604:~# sudo systemctl status gitlab-runsvdir ● gitlab-runsvdir.service - GitLab Runit supervision process Loaded: loaded (/usr/lib/systemd/system/gitlab-runsvdir.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2020-01-16 18:01:37 AEST; 12s ago Main PID: 22910 (runsvdir) Tasks: 209 (limit: 4915) Memory: 733.1M CPU: 24.539s CGroup: /system.slice/gitlab-runsvdir.service ├─22910 runsvdir -P /opt/gitlab/service log: ............................................................................................................................................................ ├─22912 runsv redis ...

Details of package version

Affects current release 12.6.4

Environment details

  • Operating System: Ubuntu, Centos
  • Installation Target, remove incorrect values:
    • Bare Metal Machine
    • VM: Digital Ocean, AWS, GCP, Azure, Other
  • Installation Type, remove incorrect values:
    • Downgrading or Uninstalling from version
Edited by Alexander Strachan