Commit 0f758405e0ab12c16b64bc76664537f0474ba84a

Authored by Dmitriy Zaporozhets
2 parents 4fe1c894 06a41513

Merge pull request #3602 from axilleas/check-redis

Added check_redis_version to check.rake
doc/raketasks/maintenance.md
... ... @@ -11,31 +11,30 @@ Example output:
11 11  
12 12 ```
13 13 System information
14   -System: Debian 6.0.6
15   -Current User: gitlab
16   -Using RVM: yes
17   -RVM Version: 1.17.2
18   -Ruby Version: ruby-1.9.3-p392
19   -Gem Version: 1.8.24
20   -Bundler Version:1.2.3
21   -Rake Version: 10.0.1
  14 +System: Debian 6.0.7
  15 +Current User: git
  16 +Using RVM: no
  17 +Ruby Version: 1.9.3p392
  18 +Gem Version: 1.8.23
  19 +Bundler Version:1.3.5
  20 +Rake Version: 10.0.4
22 21  
23 22 GitLab information
24   -Version: 3.1.0
25   -Resivion: fd5141d
26   -Directory: /home/gitlab/gitlab
27   -DB Adapter: mysql2
28   -URL: http://localhost:3000
29   -HTTP Clone URL: http://localhost:3000/some-project.git
30   -SSH Clone URL: git@localhost:some-project.git
31   -Using LDAP: no
32   -Using Omniauth: no
  23 +Version: 5.1.0.beta2
  24 +Revision: 4da8b37
  25 +Directory: /home/git/gitlab
  26 +DB Adapter: mysql2
  27 +URL: http://localhost
  28 +HTTP Clone URL: http://localhost/some-project.git
  29 +SSH Clone URL: git@localhost:some-project.git
  30 +Using LDAP: no
  31 +Using Omniauth: no
33 32  
34 33 GitLab Shell
35   -Version: 1.0.4
36   -Repositories: /home/git/repositories/
37   -Hooks: /home/git/gitlab-shell/hooks/
38   -Git: /usr/bin/git
  34 +Version: 1.2.0
  35 +Repositories: /home/git/repositories/
  36 +Hooks: /home/git/gitlab-shell/hooks/
  37 +Git: /usr/bin/git
39 38 ```
40 39  
41 40  
... ... @@ -61,60 +60,43 @@ Example output:
61 60 ```
62 61 Checking Environment ...
63 62  
64   -gitlab user is in git group? ... yes
65   -Has no "-e" in ~git/.profile ... yes
66   -Git configured for gitlab user? ... yes
  63 +Git configured for git user? ... yes
67 64 Has python2? ... yes
68 65 python2 is supported version? ... yes
69 66  
70 67 Checking Environment ... Finished
71 68  
72   -Checking Gitolite ...
  69 +Checking Gitlab Shell ...
73 70  
74   -Using recommended version ... yes
75   -Config directory exists? ... yes
76   -Config directory owned by git:git? ... yes
77   -Config directory access is drwxr-x---? ... yes
  71 +GitLab Shell version? ... OK (1.2.0)
78 72 Repo base directory exists? ... yes
  73 +Repo base directory is a symlink? ... no
79 74 Repo base owned by git:git? ... yes
80 75 Repo base access is drwxrws---? ... yes
81   -post-receive hook exists? ... yes
82 76 post-receive hook up-to-date? ... yes
83   -post-receive hooks in repos are links: ...
84   -GitLab ... ok
85   -Non-Ascii Files Test ... ok
86   -Touch Commit Test ... ok
87   -Without Master Test ... ok
88   -Git config in repos: ...
89   -GitLab ... ok
90   -Non-Ascii Files Test ... ok
91   -Touch Commit Test ... ok
92   -Without Master Test ... ok
  77 +post-receive hooks in repos are links: ... yes
93 78  
94   -Checking Gitolite ... Finished
  79 +Checking Gitlab Shell ... Finished
95 80  
96   -Checking Resque ...
  81 +Checking Sidekiq ...
97 82  
98 83 Running? ... yes
99 84  
100   -Checking Resque ... Finished
  85 +Checking Sidekiq ... Finished
101 86  
102 87 Checking GitLab ...
103 88  
104 89 Database config exists? ... yes
105   -Database is not SQLite ... yes
  90 +Database is SQLite ... no
106 91 All migrations up? ... yes
107 92 GitLab config exists? ... yes
108   -GitLab config not outdated? ... yes
  93 +GitLab config outdated? ... no
109 94 Log directory writable? ... yes
110 95 Tmp directory writable? ... yes
111 96 Init script exists? ... yes
112 97 Init script up-to-date? ... yes
113   -Projects have satellites? ...
114   -GitLab ... yes
115   -Non-Ascii Files Test ... yes
116   -Touch Commit Test ... yes
117   -Without Master Test ... yes
  98 +Projects have satellites? ... yes
  99 +Redis version >= 2.0.0? ... yes
118 100  
119 101 Checking GitLab ... Finished
120 102 ```
... ...
doc/raketasks/user_management.md
1   -### Add user to as a developer to all projects
  1 +### Add user as a developer to all projects
2 2  
3 3 ```
4 4 bundle exec rake gitlab:import:user_to_projects[username@domain.tld]
... ...
lib/tasks/gitlab/check.rake
... ... @@ -23,6 +23,7 @@ namespace :gitlab do
23 23 check_init_script_exists
24 24 check_init_script_up_to_date
25 25 check_satellites_exist
  26 + check_redis_version
26 27  
27 28 finished_checking "GitLab"
28 29 end
... ... @@ -245,6 +246,23 @@ namespace :gitlab do
245 246 fix_and_rerun
246 247 end
247 248 end
  249 +
  250 + def check_redis_version
  251 + print "Redis version >= 2.0.0? ... "
  252 +
  253 + if run_and_match("redis-cli --version", /redis-cli 2.\d.\d/)
  254 + puts "yes".green
  255 + else
  256 + puts "no".red
  257 + try_fixing_it(
  258 + "Update your redis server to a version >= 2.0.0"
  259 + )
  260 + for_more_information(
  261 + "gitlab-public-wiki/wiki/Trouble-Shooting-Guide in section sidekiq"
  262 + )
  263 + fix_and_rerun
  264 + end
  265 + end
248 266 end
249 267  
250 268  
... ...