Skip to content

Fix bug where OmnibusHelper#not_listening? returned true when service was disabled

Stan Hu requested to merge sh-fix-redis-disable into master

For example, if you attempt to disable Redis via redis['enable'] = false, omnibus would still attempt to clear the Rails cache because both conditions were not true:

$ sudo /opt/gitlab/init/redis status
fail: redis: unable to change to service directory: file does not exist
$ echo $?
1
$ sudo ls -al /opt/gitlab/service/redis/down
ls: cannot access /opt/gitlab/service/redis/down: No such file or directory

There are other places in the code that check not_listening? together with the PostgreSQL service being enabled. This change is compatible with that, but it seems best to move that check in OmnibusHelper.

Closes #2302 (closed)

Merge request reports