Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various nixos/gitlab fixes #41495

Merged
merged 3 commits into from Jul 30, 2018
Merged

Conversation

nightkr
Copy link
Member

@nightkr nightkr commented Jun 5, 2018

Motivation for this change

Currently Gitlab doesn't even launch properly, because a few paths aren't set up properly. This patch fixes that.

It also disables automatic installation of pg_trgm if the server isn't set to 127.0.0.1 (localhost), since the psql calls aren't aware of remote servers (see #41476).

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

The old behaviour caused new instances to be unable to start
It seems like Gitlab doesn't pick up GITLAB_UPLOADS_PATH. The internal uploads
folder is already symlinked to /run/gitlab/uploads by the gitlab package. Here
we symlink this further to ${statePath}/uploads, since /run is (usually) a tmpfs.
@nightkr
Copy link
Member Author

nightkr commented Jun 5, 2018

With these patches it launches and I am able to log in, but actions that require gitaly (such as creating a repository) don't work, because it's unable to connect to the gitaly UDS.

@gbuisson
Copy link

gbuisson commented Jun 6, 2018

If that can help, I noticed gitaly isn't working to import repos because it seems that rake is not bundled with it.

@krav
Copy link
Contributor

krav commented Jun 6, 2018

The issue with Gitaly is that ruby-cd is not wrapped, adding
buildInputs = [rubyEnv.wrappedRuby];
fixes the problem

Opened #41566.

@Mic92 Mic92 requested a review from globin June 11, 2018 10:59
@@ -560,6 +560,7 @@ in {
mkdir -p ${cfg.statePath}/tmp/sockets
mkdir -p ${cfg.statePath}/shell
mkdir -p ${cfg.statePath}/db
mkdir -p ${cfg.statePath}/uploads
Copy link
Member

@globin globin Jun 11, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure that this is necessary, as far as I had understood uploads.storage_path = cfg.statePath; in the config above should have made it possible to remove this. How did you trigger an error?

@Denommus
Copy link
Contributor

Denommus commented Jul 27, 2018

I was trying to deploy gitlab today and, besides the problems you had, also got this problem during migration: https://gist.github.com/Denommus/fb595242a9a3f3796b0198d0da56572d#file-journalctl

@Denommus
Copy link
Contributor

It seems that with these fixes, somehow, my error also doesn't happen.

@globin globin merged commit 6c54cfb into NixOS:master Jul 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants