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

Fix running as systemd service when agent name contains spaces #2263

Merged

Conversation

juliobbv
Copy link
Contributor

@juliobbv juliobbv commented May 20, 2019

Use systemd-escape to canonicalize the service unit name.

E.g. vsts.agent.juliobv.Default.with spaces.service becomes vsts.agent.juliobv.Default.with\x20spaces.service.

Fixes #2244

@TingluoHuang TingluoHuang merged commit c7fdbe1 into microsoft:master May 25, 2019
@akomakom
Copy link

akomakom commented May 8, 2020

Side effect: this also escapes dashes (-), so any path with dashes now gets backslashes:

$ systemd-escape --path vsts.agent.MyOrg.agent-pool.jenkins-slave-008.service
vsts.agent.MyOrg.agent\x2dpool.jenkins\x2dslave\x2d008.service

This breaks this puppet module.

Workaround: don't use slashes in pool or agent name.

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.

Agent name with whitespace not working for svc.sh install
3 participants