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

Conversation

Projects
None yet
6 participants
@teozkr
Copy link
Contributor

teozkr 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.

teozkr added some commits Jun 5, 2018

nixos/gitlab: don't delete ${statePath}/lib if it doesn't exist
The old behaviour caused new instances to be unable to start
nixos/gitlab: create uploads folder
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.
@teozkr

This comment has been minimized.

Copy link
Contributor Author

teozkr 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

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

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 Jun 11, 2018

@@ -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

This comment has been minimized.

Copy link
@globin

globin Jun 11, 2018

Member

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

This comment has been minimized.

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

This comment has been minimized.

Copy link
Contributor

Denommus commented Jul 30, 2018

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

@globin globin merged commit 6c54cfb into NixOS:master Jul 30, 2018

8 checks passed

grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-nixos-manual nix-instantiate ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.