etc/default/gitlab not take into consideration (or partially)
Created by: Herve-M
Hello,
Summary :
app_user,app_root,pid_path,socket_path,web_server_pid_path,sidekiq_pid_path aren't override or used normally.
Steps to reproduce: install gitlab with another user as git and in a different folder as default proposed to documentation. Set all param. in etc/default/gitlab or give false info.
Expected behavior:
doing a 'sudo service gitlab start' must start Gitlab with no error. doing a 'sudo service gitlab stop' must stop Gitlab with no error.
Observed behavior:
doing a 'sudo service gitlab start'
Default Gitlab Sourced
/var/run/gitlab/unicorn.pid
/var/run/gitlab/sidekiq.pid
/var/apps/gitlab/gitlab-ce
Default Gitlab Sourced
/var/run/gitlab/unicorn.pid
/var/run/gitlab/sidekiq.pid
/var/apps/gitlab/gitlab-ce
Starting both the GitLab Unicorn and Sidekiq..............................Waited 30s for the processes to write their pids, something probably went wrong.
Gitlab and Sidekiq are launched but script don't look at good place. Only a unicorn.pid is created on right folder. sidekiq.pid is created in default /tmp/pids/ folder.
Some time it try to create folder into /home/git/*
doing a 'sudo service gitlab stop' will give :
Default Gitlab Sourced /var/run/gitlab/unicorn.pid /var/run/gitlab/sidekiq.pid /var/apps/gitlab/gitlab-ce Default Gitlab Sourced /var/run/gitlab/unicorn.pid /var/run/gitlab/sidekiq.pid /var/apps/gitlab/gitlab-ce Shutting down Unicorncat: /var/apps/gitlab/gitlab-ce/tmp/pids/unicorn.pid: No such file or directory Could not find a PID in /var/apps/gitlab/gitlab-ce/tmp/pids/unicorn.pid ................................................................................................................... ................................................``` As we can see, it add from nowhere "tmp/pids"
etc/default/init :
# Copy this lib/support/init.d/gitlab.default.example file to
# /etc/default/gitlab in order for it to apply to your system.
mkdir -p /var/run/gitlab/sockets
chown -R gitlab:root /var/run/gitlab/
# RAILS_ENV defines the type of installation that is running.
# Normal values are "production", "test" and "development".
RAILS_ENV="production"
# app_user defines the user that GitLab is run as.
# The default is "git".
app_user="gitlab"
# app_root defines the folder in which gitlab and it's components are installed.
# The default is "/home/$app_user/gitlab"
app_root="/var/apps/gitlab/gitlab-ce"
# pid_path defines a folder in which the gitlab and it's components place their pids.
# This variable is also used below to define the relevant pids for the gitlab components.
# The default is "$app_root/tmp/pids"
pid_path="/var/run/gitlab"
# socket_path defines the folder in which gitlab places the sockets
#The default is "$app_root/tmp/sockets"
socket_path="/var/run/gitlab/sockets"
# web_server_pid_path defines the path in which to create the pid file fo the web_server
# The default is "$pid_path/unicorn.pid"
web_server_pid_path="$pid_path/unicorn.pid"
# sidekiq_pid_path defines the path in which to create the pid file for sidekiq
# The default is "$pid_path/sidekiq.pid"
sidekiq_pid_path="$pid_path/sidekiq.pid"
echo "Default Gitlab Sourced"
echo $web_server_pid_path
echo $sidekiq_pid_path
echo $app_root
PATH=/home/$app_user/.rbenv/bin:/home/$app_user/.rbenv/shims:$PATH
Output of checks :
gitlab@levya-1:/var/apps/gitlab/gitlab-ce$ bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
Checking Environment ...
Git configured for gitlab user? ... no
Try fixing it:
sudo -u gitlab -H git config --global user.name "GitLab"
sudo -u gitlab -H git config --global user.email "[email protected]"
For more information see:
doc/install/installation.md in section "GitLab"
Please fix the error above and rerun the checks.
Checking Environment ... Finished
Checking GitLab Shell ...
GitLab Shell version >= 1.9.6 ? ... OK (1.9.6)
Repo base directory exists? ... yes
Repo base directory is a symlink? ... no
Repo base owned by gitlab:gitlab? ... yes
Repo base access is drwxrws---? ... yes
Satellites access is drwxr-x---? ... yes
update hook up-to-date? ... yes
update hooks in repos are links: ... can't check, you have no projects
Running /var/apps/gitlab/gitlab-shell/bin/check
Check GitLab API access: OK
Check directories and files:
/var/apps/gitlab/repositories/: OK
/home/gitlab/.ssh/authorized_keys: OK
Test redis-cli executable: redis-cli 2.4.14
Send ping to redis server: PONG
gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes
Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking LDAP ...
LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab ...
Database config exists? ... yes
Database is SQLite ... no
All migrations up? ... yes
Database contains orphaned UsersGroups? ... no
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Init script exists? ... yes
Init script up-to-date? ... yes
projects have namespace: ... can't check, you have no projects
Projects have satellites? ... can't check, you have no projects
Redis version >= 2.0.0? ... yes
Your git bin path is "/usr/local/bin/git"
Git version >= 1.7.10 ? ... yes (1.9.3)
Checking GitLab ... Finished
gitlab@levya-1:/var/apps/gitlab/gitlab-ce$ bundle exec rake gitlab:env:info RAILS_ENV=production
System information
System: Debian 7.6
Current User: gitlab
Using RVM: no
Ruby Version: 2.1.2p95
Gem Version: 2.2.2
Bundler Version:1.6.2
Rake Version: 10.3.2
Sidekiq Version:2.17.0
GitLab information
Version: 7.1.1
Revision: facfec4
Directory: /var/apps/gitlab/gitlab-ce
DB Adapter: postgresql
Using LDAP: no
Using Omniauth: no
GitLab Shell
Version: 1.9.6
Repositories: /var/apps/gitlab/repositories/
Hooks: /var/apps/gitlab/gitlab-shell/hooks/
Git: /usr/local/bin/git
Installation use rbenv, under gitlab user.
gitlab@levya-1:/var/apps/gitlab/gitlab-ce$ git rev-parse HEAD
facfec4b242ce151af224e20715d58e628aa5e74