fix(agent-proxy): emit systemd path directives unquoted - #71
Merged
Conversation
systemd only defines quoting for command lines such as ExecStart=. A quoted WorkingDirectory= is a fatal unit error on Linux, and quoted StandardOutput=/StandardError= values are silently ignored, so the service never loaded and logs went to the journal. Keep %-specifier escaping, drop the quotes for plain assignment values. Fixes #66.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #66.
bb agent-proxy installon Linux wrote a unit whoseWorkingDirectory=,StandardOutput=, andStandardError=values were quoted. systemd only defines quoting for command lines such asExecStart=. A quotedWorkingDirectory=is a fatal unit error, so the service never loaded. Quoted output directives were silently ignored, which sent core logs to the journal instead ofcore.log.The fix splits the escaper.
systemdValuekeeps the control-char guard and%->%%specifier escaping with no quotes, and now serves the three plain assignments.systemdQuotecomposes on top of it and still servesExecStart=words.Verified in an Ubuntu 24.04 / systemd 255 container: the unit generated before the fix reproduces the reported
WorkingDirectory= path is not absolutefatal error undersystemd-analyze verify. After the fix, verify exits 0 and a live start under systemd as PID1 reachesactive, runs in the right working directory, and appends tocore.log. Spaced and percent paths also verify clean.The first commit lands the failing test, the second the fix plus a patch changeset.