gitlab-ce don't start at boot on debian 8 jessie

How to reproduce:

Backup (rake) the gitlab data.
Distupgrade Debian Wheezy to Jessie.
Remove and purge the old gitlab-ce packet and files.
Install the same version again (using apt-get (deb https://packages.gitlab.com/gitlab/gitlab-ce/debian/ jessie main)).
Manually make it start by running: /opt/gitlab/embedded/bin/runsvdir-start &
Now there's a postgres running, so reload the backuped data (rake).

After a reboot, no gitlab is running (no runsvdir and hence none of the gitlab services).
No logs exist to give me any clues.
I'm not yet famillar with systemd, so I don't know where to start looking to debug this.


I see a new version is out.
I upgrade it (apt-get update; apt-get upgrade) and get:
Backup of postgres...
Removing old stuff.
Shutting down all GitLab services except those needed for migrations
ok: down: gitlab-workhorse: 0s, normally up
ok: down: logrotate: 0s, normally up
ok: down: nginx: 0s, normally up
ok: down: postgresql: 1s, normally up
ok: down: redis: 0s, normally up
ok: down: sidekiq: 0s, normally up
ok: down: unicorn: 1s, normally up
ok: run: postgresql: (pid 29362) 0s
ok: run: redis: (pid 29370) 0s
run: postgresql: (pid 29362) 0s; run: log: (pid 733) 256678s
run: redis: (pid 29370) 0s; run: log: (pid 734) 256678s
Reconfiguring GitLab to apply migrations
The environment variable HTTP_PROXY is discouraged.  Use http_proxy.
Starting Chef Client, version 12.12.15
resolving cookbooks for run list: ["gitlab"]
Synchronizing Cookbooks:
  - gitlab (0.0.1)
  - package (0.0.0)
  - runit (0.14.2)
Installing Cookbook Gems:
Compiling Cookbooks...
Recipe: gitlab::default
  * directory[/etc/gitlab] action create (up to date)
/sbin/init: unrecognized option '--version'
  -.mount                                                                                  loaded active mounted   /
  Converging 284 resources
  * directory[/etc/gitlab] action create (up to date)
  * directory[Create /var/opt/gitlab] action create (up to date)
  * directory[/opt/gitlab/embedded/etc] action create (up to date)
  * template[/opt/gitlab/embedded/etc/gitconfig] action create (up to date)
Recipe: gitlab::web-server
...
...rails...
...
Recipe: gitlab::add_trusted_certs
  * directory[/etc/gitlab/trusted-certs] action create (up to date)
  * directory[/opt/gitlab/embedded/ssl/certs] action create (up to date)
  * file[/opt/gitlab/embedded/ssl/certs/README] action create (up to date)
  * ruby_block[Move existing certs and link to /opt/gitlab/embedded/ssl/certs] action run (skipped due to only_if)
Recipe: gitlab::default
  * service[create a temporary unicorn service] action nothing (skipped due to action :nothing)
  * service[create a temporary ci-unicorn service] action nothing (skipped due to action :nothing)
  * service[create a temporary sidekiq service] action nothing (skipped due to action :nothing)
  * service[create a temporary ci-sidekiq service] action nothing (skipped due to action :nothing)
  * service[create a temporary mailroom service] action nothing (skipped due to action :nothing)
Recipe: runit::systemd
  * directory[/usr/lib/systemd/system] action create (up to date)
  * cookbook_file[/usr/lib/systemd/system/gitlab-runsvdir.service] action create (up to date)
  * file[/etc/systemd/system/default.target.wants/gitlab-runsvdir.service] action delete (up to date)
  * execute[systemctl daemon-reload] action nothing (skipped due to action :nothing)
  * execute[systemctl enable gitlab-runsvdir] action nothing (skipped due to action :nothing)
  * execute[systemctl start gitlab-runsvdir] action nothing (skipped due to action :nothing)
Recipe: gitlab::redis
...
...
Recipe: gitlab::gitlab-workhorse
  * service[gitlab-workhorse] action restart
    - restart service service[gitlab-workhorse]

Running handlers:
Running handlers complete
Chef Client finished, 16/291 resources updated in 39 seconds
gitlab Reconfigured!
Restarting previously running GitLab services
ok: run: gitlab-workhorse: (pid 29807) 1s
ok: run: logrotate: (pid 29815) 0s
ok: run: nginx: (pid 29817) 0s
ok: run: postgresql: (pid 29362) 42s
ok: run: redis: (pid 29370) 42s
ok: run: sidekiq: (pid 29792) 2s
ok: run: unicorn: (pid 29830) 1s

Upgrade complete!


Reboot.

Again, no gitlab is running.
I manually start '/opt/gitlab/embedded/bin/runsvdir-start &', then runsvdir is started and it starts the gitlab services.


# updatedb
# locate gitlab | egrep -v "^/opt|^/var/log|^/var/opt/|^/usr/bin|/apt/|/chef/|dpkg/"
/etc/gitlab
/etc/apt/sources.list.d/gitlab_official.list
/etc/gitlab/gitlab-secrets.json
/etc/gitlab/gitlab.rb
/etc/gitlab/gitlab.rb.puppet-bak
/etc/gitlab/ssl
/etc/gitlab/trusted-certs
/etc/gitlab/ssl/gitlab.crt
/etc/gitlab/ssl/gitlab.key
/etc/gitlab/ssl/gitlab.foo.bar.com.crt.pem
/etc/gitlab/ssl/gitlab.foo.bar.com.key.pem
/etc/init.d/gitlab-runsvdir
/etc/rc0.d/K01gitlab-runsvdir
/etc/rc1.d/K01gitlab-runsvdir
/etc/rc2.d/S02gitlab-runsvdir
/etc/rc3.d/S02gitlab-runsvdir
/etc/rc4.d/S02gitlab-runsvdir
/etc/rc5.d/S02gitlab-runsvdir
/etc/rc6.d/K01gitlab-runsvdir
/etc/sysctl.d/90-omnibus-gitlab-kernel.sem.conf
/etc/sysctl.d/90-omnibus-gitlab-kernel.shmall.conf
/etc/sysctl.d/90-omnibus-gitlab-kernel.shmmax.conf
/etc/sysctl.d/90-omnibus-gitlab-net.core.somaxconn.conf
/usr/lib/systemd/system/gitlab-runsvdir.service

When gooling this, I see that some distributions that use systemd should have a file in /etc/init/. Mine does not:
ls -l /etc/init/git*
ls: cannot access /etc/init/git*: No such file or directory

ls -l /etc/init.d/gitlab-runsvdir
lrwxrwxrwx 1 root root 19 May 12 17:09 /etc/init.d/gitlab-runsvdir -> /usr/bin/gitlab-ctl*

All K* and S* files in /etc/rc*.d/ are symlinks to ../init.d/gitlab-runsvdir.

# cat /usr/lib/systemd/system/gitlab-runsvdir.service
[Unit]
Description=GitLab Runit supervision process
After=basic.target

[Service]
ExecStart=/opt/gitlab/embedded/bin/runsvdir-start
Restart=always

[Install]
WantedBy=basic.target

# systemctl status gitlab-runsvdir.service
● gitlab-runsvdir.service - GitLab Runit supervision process
   Loaded: loaded (/usr/lib/systemd/system/gitlab-runsvdir.service; disabled)
   Active: inactive (dead)

# systemctl enable gitlab-runsvdir.service
Synchronizing state for gitlab-runsvdir.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d gitlab-runsvdir defaults
insserv: warning: script 'K01gitlab-runsvdir' missing LSB tags and overrides
insserv: warning: script 'gitlab-runsvdir' missing LSB tags and overrides
Executing /usr/sbin/update-rc.d gitlab-runsvdir enable
update-rc.d: error: gitlab-runsvdir Default-Start contains no runlevels, aborting.

What am I missing?

Assignee Loading
Time tracking Loading