ActionCable fails to connect to Redis when password is provided via config_command
When Redis server password is provided to rails via gitlab_rails['redis_extra_config_command']
following https://docs.gitlab.com/omnibus/settings/configuration.html#provide-sensitive-configuration-to-components-without-plain-text-storage, ActionCable fails to contact Redis because the config file cable.yml
does not make use of the external command execution logic.
Testing
-
Deploy a GitLab instance making use of https://docs.gitlab.com/omnibus/settings/configuration.html#provide-sensitive-configuration-to-components-without-plain-text-storage (you can use https://gitlab.com/balasankarc/omnibus-gitlab-docker-compose/-/tree/main/redis/extra-config)
-
In Rails console, execute the following command and see it fails
ActionCable.server.pubsub.redis_connection_for_subscriptions.ping
-
When everything works, the command should return
"PONG"
, indicating ActionCable was able to reach the Redis server