Re-registration of gitlab-runner in BSC GitLab causes locked runner #241

Open
opened 2026-03-11 16:57:12 +01:00 by rarias · 3 comments
Owner

Runners shared across projects are removed when the runner becomes locked. For some reason, re-registering the runner in version 15.11 seems to reenable the lock flag, causing the shared runner to be removed from all projects. Perhaps this would be fixed in newer versions. This happens every time I modify the gitlab-runner service as it regenerates the config.

As a workaround I can reenable them or add multiple runners, but is quite painful. On PM GitLab works fine.

Runners shared across projects are removed when the runner becomes locked. For some reason, re-registering the runner in version 15.11 seems to reenable the lock flag, causing the shared runner to be removed from all projects. Perhaps this would be fixed in newer versions. This happens every time I modify the gitlab-runner service as it regenerates the config. As a workaround I can reenable them or add multiple runners, but is quite painful. On PM GitLab works fine.
rarias added the cibug labels 2026-03-11 16:57:12 +01:00
Author
Owner

Damm:

hut% gitlab-runner register --help | grep lock
Runtime platform                                    arch=amd64 os=linux pid=1646781 revision=v18.5.0 version=18.5.0
   --locked                                                                                   Lock Runner for current project, defaults to 'true' [$REGISTER_LOCKED]
Damm: ``` hut% gitlab-runner register --help | grep lock Runtime platform arch=amd64 os=linux pid=1646781 revision=v18.5.0 version=18.5.0 --locked Lock Runner for current project, defaults to 'true' [$REGISTER_LOCKED] ```
Author
Owner

Splendid:

--locked "false"        -> locked
--locked false          -> locked
--locked=false          -> not locked
--locked="false"        -> not locked

https://gitlab.com/gitlab-org/gitlab-runner/-/work_items/2998#note_88555316

Splendid: ``` --locked "false" -> locked --locked false -> locked --locked=false -> not locked --locked="false" -> not locked ``` https://gitlab.com/gitlab-org/gitlab-runner/-/work_items/2998#note_88555316
Author
Owner

Even after unlocking it, it gets disabled from the other projects. It seems to be caused by the id that changes among registrations.

Even after unlocking it, it gets disabled from the other projects. It seems to be caused by the id that changes among registrations.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rarias/jungle#241