gitlab fails to start after 2682ba6 "update rubygems version" on 17.09
Issue description
GitLab failed to start for me after an update.
The error text in journalctl -u gitlab is
Bundler::GemNotFound: Could not find abstract_type-0.0.7 in any of the sources
Bisecting nixpkgs pointed at d09e425 (2682ba6), so paging @manveru and @zimbatm.
Sorry if I don't follow proper reporting etiquette, I don't know how things work in nixos, gitlab or ruby but I'd be happy to respond in 24 hours and improve.
Steps to reproduce
Enable GitLab service on nixpkgs after d09e425 (2682ba6). My relevant config part:
services.gitlab = {
enable = true;
databasePassword = "<REDACTED>";
https = true;
host = "<REDACTED>";
port = 443;
secrets = { db = "<REDACTED>"; secret = <REDACTED>"; otp = <REDACTED>"; jws = "<REDACTED>"; };
}
Technical details
- system:
"x86_64-linux" - host os:
Linux 4.15.7, NixOS, 17.09.git.d09e425 (Hummingbird) - multi-user?:
yes - sandbox:
no - version:
nix-env (Nix) 1.11.16 - channels(root):
"nixos-17.09.3109.48a76ca6f57" - nixpkgs:
/home/monk/nixpkgs
Forgot to say that reverting d09e425 on top of current release-17.09 (9885b4c) fixed the issue for me.
Please fix this. Is there a way to execute bundle install manually after installation?
@t184256 Could you elaborate on how you revert d09e425 on top of release?
Sure. I checked out the matching branch of nixpkgs, did a git revert d09e425 and pointed nix to a local checkout of nixpkgs by setting nix.nixPath = [ "nixpkgs=<path>" ]; in configuration.nix. I update with git pull --rebase to reapply my revert on top of current nixpkgs release branch.
@t184256 Think I've got this right
- Clone nixpkgs
- checkout
release-17.09branch - revert d09e425
- add path to configuration.nix
- rebase
- nixos-rebuild switch
I then get
error: file ‘nixos-config’ was not found in the Nix search path (add it using $NIX_PATH or -I), at ~/repos/nixpkgs/nixos/default.nix:1:60
Ow, sorry for that. Add this one too:
nix.nixPath = [ "nixpkgs=<path-to-checkout>" "nixos-config=/etc/nixos/configuration.nix" ];
git pull --rebase is only needed some time later when nixpkgs release branch gets updated and you want to include these changes in your local checkout without losing the revert.
Thanks @t184256 that moved be on, service partially starts (get a 502 when visiting 127.0.0.1) seems the sidekiq service still doesn't want to run:
Mar 28 20:16:32 Laptop bundle[10585]: /nix/store/xfv934qy1a0sg4gdc4kr7i3j7idq5s1f-gitlab-env-10.3.4/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `require'
Mar 28 20:16:32 Laptop bundle[10585]: /nix/store/xfv934qy1a0sg4gdc4kr7i3j7idq5s1f-gitlab-env-10.3.4/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `block in
Mar 28 20:16:32 Laptop bundle[10585]: /nix/store/xfv934qy1a0sg4gdc4kr7i3j7idq5s1f-gitlab-env-10.3.4/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:240:in `load_dep
Mar 28 20:16:32 Laptop bundle[10585]: /nix/store/xfv934qy1a0sg4gdc4kr7i3j7idq5s1f-gitlab-env-10.3.4/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `require'
Mar 28 20:16:32 Laptop bundle[10585]: /nix/store/3j4phk3k82444wfgcd0vi841ka5f3p8y-ruby2.3.6-sidekiq-5.0.4/lib/ruby/gems/2.3.0/gems/sidekiq-5.0.4/lib/sidekiq/cli.rb:254:in `boot_system'
Mar 28 20:16:32 Laptop bundle[10585]: /nix/store/3j4phk3k82444wfgcd0vi841ka5f3p8y-ruby2.3.6-sidekiq-5.0.4/lib/ruby/gems/2.3.0/gems/sidekiq-5.0.4/lib/sidekiq/cli.rb:54:in `run'
Mar 28 20:16:32 Laptop bundle[10585]: /nix/store/xfv934qy1a0sg4gdc4kr7i3j7idq5s1f-gitlab-env-10.3.4/lib/ruby/gems/2.3.0/gems/sidekiq-5.0.4/bin/sidekiq:12:in `<top (required)>'
Mar 28 20:16:32 Laptop bundle[10585]: /nix/store/xfv934qy1a0sg4gdc4kr7i3j7idq5s1f-gitlab-env-10.3.4/lib/ruby/gems/2.3.0/bin/sidekiq:23:in `load'
Mar 28 20:16:32 Laptop bundle[10585]: /nix/store/xfv934qy1a0sg4gdc4kr7i3j7idq5s1f-gitlab-env-10.3.4/lib/ruby/gems/2.3.0/bin/sidekiq:23:in `<main>'
Mar 28 20:16:32 Laptop systemd[1]: gitlab.service: Service hold-off time over, scheduling restart.
Mar 28 20:16:32 Laptop systemd[1]: gitlab-sidekiq.service: Main process exited, code=exited, status=1/FAILURE
Mar 28 20:16:32 Laptop systemd[1]: Stopped gitlab-sidekiq.service.
-- Subject: Unit gitlab-sidekiq.service has finished shutting down
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit gitlab-sidekiq.service has finished shutting down.
Mar 28 20:16:32 Laptop systemd[1]: gitlab-sidekiq.service: Unit entered failed state.
Mar 28 20:16:32 Laptop systemd[1]: gitlab-sidekiq.service: Failed with result 'exit-code'.
Mar 28 20:16:32 Laptop systemd[1]: Stopped gitlab.service.
-- Subject: Unit gitlab.service has finished shutting down
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit gitlab.service has finished shutting down.
Mar 28 20:16:32 Laptop systemd[1]: Starting gitlab.service...
-- Subject: Unit gitlab.service has begun start-up
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit gitlab.service has begun starting up.
Mar 28 20:16:32 Laptop gitlab-pre-start[10604]: mkdir -p /var/gitlab/state/home/.ssh: OK
Mar 28 20:16:32 Laptop gitlab-pre-start[10604]: chmod 700 /var/gitlab/state/home/.ssh: OK
Mar 28 20:16:32 Laptop sudo[10642]: root : TTY=unknown ; PWD=/nix/store/r74prp8iv47hb4gbjh04c5vzlx89a1am-gitlab-10.3.4/share/gitlab ; USER=postgres ; COMMAND=/nix/store/k66dgviqm7jp9j3332d159wb
Mar 28 20:16:32 Laptop sudo[10642]: pam_unix(sudo:session): session opened for user postgres by (uid=0)
Mar 28 20:16:32 Laptop gitlab-pre-start[10604]: NOTICE: extension "pg_trgm" already exists, skipping
Mar 28 20:16:32 Laptop gitlab-pre-start[10604]: CREATE EXTENSION
Mar 28 20:16:32 Laptop sudo[10642]: pam_unix(sudo:session): session closed for user postgres
Mar 28 20:16:32 Laptop systemd[1]: gitlab-sidekiq.service: Service hold-off time over, scheduling restart.
Mar 28 20:16:32 Laptop systemd[1]: Stopped gitlab-sidekiq.service.
-- Subject: Unit gitlab-sidekiq.service has finished shutting down
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit gitlab-sidekiq.service has finished shutting down.
Mar 28 20:16:32 Laptop systemd[1]: Started gitlab-sidekiq.service.
-- Subject: Unit gitlab-sidekiq.service has finished start-up
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit gitlab-sidekiq.service has finished starting up.
--
-- The start-up result is done.
Gitlab is now disabled on master and release-18.03
Oh wonderful. Wasn't that something trivial to fix? I understand the desire to disable it in the looming release, but master?
I have tried fixing this issue mutliple times when it had occured previously, @manveru has said he'll take a look.
Is it really better to disable gitlab than to keep it at the old version? It really confused me when I enabled the service, did a rebuild and nothing happened (a warning message would have been welcome at the very least).
It wasn't simply downgrading gitlab but would have rather been downgrading rubygems, which was a security fix, so disabling gitlab was the only feasible option in time for the release.
I've just pushed a fix for gitlab to master, enabling it again with the help of @manveru and @Mic92. I'll try to backport this to 18.03 as soon as I have time.
Since 17.09 is out of support in a few days I'll close this.
Backported to 18.03