Remove non-standard Redis fallback URL's
The Redis instances that GitLab connects to are normally configured via config/resque.yml
and optionally via config/redis.queues.yml
, etc. In the case where none of these config files can be found, GitLab falls back to using three special Redis URL's: localhost:6380
, localhost:6381
and localhost:6382
. This is surprising because the default Redis URL is localhost:6379
. We should remove the custom code that uses 6380, 6381 and 6382.
Anybody who happens to rely on this behavior can use the normal GitLab Redis config files to connect to these localhost ports if they want.
Who is affected
Administrators of GitLab installations that do not provide any Redis configuration file. Note that Omnibus, Helm and our source installation guide all use a Redis configuration file so they are not affected.
If your GitLab instance is affected, the following Rails console snippet will raise an exception:
%w[Cache Queues SharedState].each do |redis|
instance = Object.const_get("Gitlab::Redis::#{redis}")
raise "#{instance} has no config file" unless instance.config_file_name
end
If this check raises an exception, please use config/redis.cache.yml
, config/redis.queues.yml
and/or config/redis.shared_state.yml
to configure the respective Redis client parameters.