Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #7253

Closed
Open
Created Jul 03, 2014 by Administrator@rootOwner

gitlab:check: Check for Redis version only works for local Redis installations

Created by: paulepanter

Version: GitLab 6.2.1, but also present in 7.0

Running GitLab’s check Rake task, the following is shown.

$ sudo -u $GITLAB_USER -H bundle exec rake gitlab:check RAILS_ENV=production
[…]
Redis version >= 2.0.0? ... no
  Try fixing it:
  Update your redis server to a version >= 2.0.0
  For more information see:
  gitlab-public-wiki/wiki/Trouble-Shooting-Guide in section sidekiq
  Please fix the error above and rerun the checks.
[…]

Redis is running on a different server than GitLab is installed on, so Redis is not installed locally. Looking at the source of the Rake tasks, it tries to deduce the version from running redis-cli --version.

def check_redis_version
  print "Redis version >= 2.0.0? ... "

  if run_and_match(%W(redis-cli --version), /redis-cli 2.\d.\d/)
    puts "yes".green
  else
    puts "no".red
    try_fixing_it(
      "Update your redis server to a version >= 2.0.0"
    )
    for_more_information(
      "gitlab-public-wiki/wiki/Trouble-Shooting-Guide in section sidekiq"
    )
    fix_and_rerun
  end
end

The check can be silenced by installing redis-cli locally, on Debian or Ubuntu systems, by for example installing redis-server or (on later versions) redis-tools. Checking these local versions is misleading though, as it does not say anything about the version running on the remote Redis server.

So to check the version, GitLab should connect to the Redis server and issue the command(?) INFO server. In the output there is the key redis_version with the version as the value.

INFO server
$401
# Server
redis_version:2.8.4
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:a312c756fe89b894
redis_mode:standalone
os:Linux XXX
arch_bits:64
multiplexing_api:epoll
gcc_version:4.6.3
process_id:6
run_id:cd6e196ffd211acf0d3e8e36bae07ce2cbfb72ed
tcp_port:6379
uptime_in_seconds:8159115
uptime_in_days:94
hz:10
lru_clock:2026337
config_file:/etc/redis.conf
Assignee
Assign to
Time tracking