Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

systemd files exceeding MAX_LINE #660

Open
Thorndike opened this issue Apr 3, 2017 · 2 comments
Open

systemd files exceeding MAX_LINE #660

Thorndike opened this issue Apr 3, 2017 · 2 comments

Comments

@Thorndike
Copy link

─┬ garethr-docker (v5.3.0)
Puppet 4.8.1

Due to the concatenation of the environment variables the max line length supported by systemd is exceeded when multiple environment variables are used. This causes strange errors in executing the puppet file that give no hint to the root cause.
To prevent that every environment variable should be in a single line.

@electrofelix
Copy link
Contributor

systemd bug upstream systemd/systemd#3302 as well as discussion on coreos fleet on hitting the issue coreos/fleet#992.

I believe the problem is not limited to env variables, but because all docker_run_flags are concatenated.

If this is impacting you with env vars, the workaround is to place them into an file and use envfile => <filename> as a way of avoiding building the really long line.

Still all docker_run_flags should probably be parsed to be on separate lines.

electrofelix added a commit to electrofelix/garethr-docker that referenced this issue Jun 9, 2017
Switch from joining the docker_run_flags using spaces to new lines and
continuations to avoid hitting the glibc MAX_LINE limit used by systemd.

As docker_run_flags is used to provide the args to init scripts and
systemd, switching it to use line continuation and newlines is
sufficient to ensure that systemd/initscritps do not hit any limit
imposed by glibc on a readline and at the same time know to continue
processing onto the next line for the rest of the command to be run.

Fixes garethr#660
@electrofelix
Copy link
Contributor

I suspect this can be closed.

cegeka-jenkins pushed a commit to cegeka/puppet-docker that referenced this issue Apr 17, 2024
Switch from joining the docker_run_flags using spaces to new lines and
continuations to avoid hitting the glibc MAX_LINE limit used by systemd.

As docker_run_flags is used to provide the args to init scripts and
systemd, switching it to use line continuation and newlines is
sufficient to ensure that systemd/initscritps do not hit any limit
imposed by glibc on a readline and at the same time know to continue
processing onto the next line for the rest of the command to be run.

Fixes garethr#660
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

No branches or pull requests

2 participants