Skip to content

Conversation

@gwarf
Copy link
Contributor

@gwarf gwarf commented Oct 13, 2025

Due to the fact that the sysctl keys contain periods, like net.ipv4.ip_forward, we need to quote them, so that the TOML is properly parsed by gitlab-runner, like when using gitlab-runner verify.

Parsing error from gitlab-runner verify:

root@vps-0a441234:/home/ubuntu# gitlab-runner verify
Runtime platform                                    arch=amd64 os=linux pid=557091 revision=139a0ac0 version=18.4.0
Running in system-mode.

FATAL: decoding configuration file: toml: (last key "runners.docker.sysctls.net"): incompatible types: TOML value has type map[string]any; destination has type string

See also example at https://docs.gitlab.com/runner/configuration/advanced-configuration/

This is onlly relevant to configuration done via the template as per #400.

@gwarf gwarf changed the title Quote sysctl keys in config.toml template, so that the TOML is properly parsed by gitlab-runner fix: quote sysctl keys in config.toml template, so that the TOML is properly parsed by gitlab-runner Oct 13, 2025
@guenhter
Copy link
Collaborator

@LoniasGR As you started bring in this new feature, are you willing to also do some reviews?

@LoniasGR
Copy link
Contributor

Sure, I can take a look in the next few days

@LoniasGR
Copy link
Contributor

Hi, first of all, although not from this PR, line 127 needs to be changed to

{% if gitlab_runner.extra_configs is defined %}

otherwise it fails if extra_configs does not exist.

@gwarf
Copy link
Contributor Author

gwarf commented Oct 16, 2025

Hi, first of all, although not from this PR, line 127 needs to be changed to

{% if gitlab_runner.extra_configs is defined %}

otherwise it fails if extra_configs does not exist.

Thanks, I fixed the test.

@guenhter
Copy link
Collaborator

@LoniasGR just from a process pov: when you are happy with this, approve it. When it is approved I'll merge it.

Copy link
Contributor

@LoniasGR LoniasGR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@guenhter guenhter merged commit aec01c2 into riemers:master Oct 16, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants