Bug 209487 - www/gitlab: rake gitlab:check RAILS_ENV=production SANITIZE=true showing many errors
Summary: www/gitlab: rake gitlab:check RAILS_ENV=production SANITIZE=true showing many...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Torsten Zuehlsdorff
URL:
Keywords: needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2016-05-13 18:35 UTC by otacilio.neto
Modified: 2017-05-18 08:39 UTC (History)
3 users (show)

See Also:
vlad-fbsd: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description otacilio.neto 2016-05-13 18:35:19 UTC
gitlab version 8.5.12

Run like root

cd /usr/local/www/gitlab && sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true

Catches varios errors on default gitlab instalation. Some related to default var directory (freebsd users /var end gitlab something in /usr/var).

bellow some error messages:

=====================================================================

Checking Sidekiq ...

Running? ... no
  Try fixing it:
  sudo -u git -H RAILS_ENV=production bin/background_jobs start
  For more information see:
  doc/install/installation.md in section "Install Init Script"
  see log/sidekiq.log for possible errors
  Please fix the error above and rerun the checks.

Checking Sidekiq ... Finished

Checking Reply by email ...

Reply by email is disabled in config/gitlab.yml

Checking Reply by email ... Finished

Checking LDAP ...

LDAP is disabled in config/gitlab.yml

Checking LDAP ... Finished

Checking GitLab ...

Git configured with autocrlf=input? ... yes
Database config exists? ... yes
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory setup correctly? ... no
  Try fixing it:
  sudo find /usr/local/www/gitlab/public/uploads -type d -not -path /usr/local/www/gitlab/public/uploads -exec chmod 0700 {} \;
  For more information see:
  doc/install/installation.md in section "GitLab"
  Please fix the error above and rerun the checks.
Init script exists? ... no
  Try fixing it:
  Install the init script
  For more information see:
  doc/install/installation.md in section "Install Init Script"
  Please fix the error above and rerun the checks.
Init script up-to-date? ... can't check because of previous errors
projects have namespace: ... 
5/1 ... yes
15/2 ... yes
Redis version >= 2.8.0? ... yes
Ruby version >= 2.1.0 ? ... yes (2.1.8)
Your git bin path is "/usr/local/bin/git"
Git version >= 2.7.3 ? ... yes (2.8.1)
Active users: 6

Checking GitLab ... Finished
Comment 1 Torsten Zühlsdorff 2016-05-23 16:16:07 UTC
Hello,

thanks for the report. Some entries are not fixable like the Init-Script section. I'm currently in discussion with the project how to fix this. But to be frank: this will take a long while.
If there is something new i will report it here.

Greetings,
Torsten
Comment 2 Chris Stankevitz 2017-01-08 04:17:15 UTC
The Sidekiq not running complaint is because /usr/local/www/gitlab/lib/tasks/gitlab/check.rake must pass 'w' when calling 'ps':

 vi /usr/local/www/gitlab/lib/tasks/gitlab/check.rake
 # Add a 'w' to the ps arguments.  Change this line:
 #  ps_ux, _ = Gitlab::Popen.popen(%W(ps ux))
 # to read:
 #  ps_ux, _ = Gitlab::Popen.popen(%W(ps wux))

See my commit at https://github.com/chrisstankevitz/gitlabhq/commit/f3fba7b2efe81cd8446c719d40708fbd629b55f4
Comment 3 Matthias Fechner freebsd_committer 2017-03-19 11:16:05 UTC
(In reply to Chris Stankevitz from comment #2)
Thanks Chris, this fixes one annoying wrong feedback from the gitlab:check command.
Comment 4 commit-hook freebsd_committer 2017-03-21 16:40:49 UTC
A commit references this bug:

Author: tz
Date: Tue Mar 21 16:40:38 UTC 2017
New revision: 436617
URL: https://svnweb.freebsd.org/changeset/ports/436617

Log:
  www/gitlab: fix wrong detection of running Sidekiq

  Sidekiq is detected as "not running" because when checking with "ps" it
  does not account for column truncation

  PR:           209487
  Submitted by: Chris Stankevitz <chris-freebsd-bugs@stankevitz.com>
  Reported by:  otacilio.neto@bsd.com.br
  Reviewed by:  Matthias Fechner <idefix@fechner.net>

Changes:
  head/www/gitlab/Makefile
  head/www/gitlab/files/patch-lib_tasks_gitlab_check.rake
Comment 5 Torsten Zuehlsdorff freebsd_committer 2017-03-21 16:43:26 UTC
I created a patch out of the information Chris provided and committed it right now.

Thanks! :)