Commit 53b3d6264142a7d8e362702661f98d21fdfff4b6
1 parent
63b78a39
Exists in
master
and in
4 other branches
Added check_redis_version. Fixes #3449
Checking the redis version will warn users that are using an old version to update. Included reference to the troubleshooting guide.
Showing
1 changed file
with
20 additions
and
0 deletions
Show diff stats
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,25 @@ 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 | + redis_version = `redis-cli --version` | |
| 254 | + | |
| 255 | + if redis_version =~ /redis-cli 2.\d.\d/ | |
| 256 | + puts "yes".green | |
| 257 | + else | |
| 258 | + puts "no".red | |
| 259 | + try_fixing_it( | |
| 260 | + "Update your redis server to a version >= 2.0.0" | |
| 261 | + ) | |
| 262 | + for_more_information( | |
| 263 | + "See the Troubleshooting guide" | |
| 264 | + ) | |
| 265 | + fix_and_rerun | |
| 266 | + end | |
| 267 | + end | |
| 248 | 268 | end |
| 249 | 269 | |
| 250 | 270 | ... | ... |