FS#79034 - [gitlab] Missing cable.yml configuration file

Attached to Project: Arch Linux
Opened by Ragnar Groot Koerkamp (ragnargrootkoerkamp) - Monday, 10 July 2023, 09:49 GMT
Last edited by Caleb Maclennan (alerque) - Tuesday, 07 November 2023, 06:54 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Anatol Pomozov (anatolik)
Caleb Maclennan (alerque)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Gitlab requires the `/usr/share/webapps/gitlab/config/cable.yml` file.
A `cable.yml.example` is present here, but where other yml configuration files are copied to `/etc/webapps/gitlab/` and symlinked, this `cable.yml` is missing, which caused errors when e.g. commenting on issues, where the web UI would show there was an error processing the comment, but refreshing the page would show it.


I also noticed there is a file `/usr/share/webapps/gitlab/config/sidekiq.yml.example` without corresponding `sidekiq.yml` file, but this file seems mostly empty so this may not be important.

Additional info:
* package version: 16.1.1-1
* config and/or log files etc.
* link to upstream bug report:
https://gitlab.com/gitlab-org/gitlab/-/issues/417189#note_1463229247

This task depends upon

Closed by  Caleb Maclennan (alerque)
Tuesday, 07 November 2023, 06:54 GMT
Reason for closing:  Fixed
Additional comments about closing:  The 16.5.1-2 build currently in testing should have this fixed, including marking it for backup which is important if you have edited the contents!
Comment by Daniel Beitler (d) - Monday, 10 July 2023, 21:31 GMT
Can confirm this issue. The `cable.yml` file is missing and is causing errors when attempting to create merge requests in the latest GitLab version.

Workaround:

1. Add a /etc/webapps/gitlab/cable.yml file:
```
development:
adapter: redis
url: redis://localhost:6379
channel_prefix: gitlab_development
test:
adapter: redis
url: redis://localhost:6379
channel_prefix: gitlab_test
production:
adapter: redis
url: redis://localhost:6379
```

2. Add a symlink:
```
cd /usr/share/webapps/gitlab/config
ln -s /etc/webapps/gitlab/cable.yml
```
Comment by Ragnar Groot Koerkamp (ragnargrootkoerkamp) - Thursday, 13 July 2023, 10:09 GMT
Note that for me simply copying the example worked fine:
```
...
production:
adapter: redis
url: unix:/var/run/redis/redis.sock
channel_prefix: gitlab_production
```
I'm not sure what the function/relevance of `channel_prefix` is, but using unix sockets seems preferable if redis is configured that way.
Comment by Daniel Beitler (d) - Thursday, 13 July 2023, 16:22 GMT
The `channel_prefix` is used to avoid collisions when running multiple Rails applications on the same Redis server. See https://guides.rubyonrails.org/action_cable_overview.html#redis-adapter
Comment by Caleb Maclennan (alerque) - Tuesday, 15 August 2023, 02:12 GMT
Thanks for the heads up and references here. I believe I had that issue myself but solved it some other way, I'll look into getting this fixed properly.

Loading...