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

Unescape issue with systemd and multiple processes #292

Open
cbillen opened this issue Dec 1, 2021 · 0 comments
Open

Unescape issue with systemd and multiple processes #292

cbillen opened this issue Dec 1, 2021 · 0 comments

Comments

@cbillen
Copy link

cbillen commented Dec 1, 2021

With systemd setup to install multiple processes, we run into the following error when deploying

01 Invalid unit name "sidekiq@{1..4}" escaped as "sidekiq@\x7b1..4\x7d" (maybe you should use systemd-escape?).`

Regardless of the task, it seems that anytime systemctl_command is called without a process and the @{ ... } is appended it gets escaped somehow.

My capistrano sidekiq is configured as such:

set :sidekiq_roles, :worker
set :sidekiq_default_hooks, true
set :sidekiq_processes, 4
set :sidekiq_config, [
'config/sidekiq.yml',
'config/sidekiq_high.yml',
'config/sidekiq_low.yml',
'config/sidekiq_campaign.yml'
]
set :sidekiq_env, -> { fetch(:rack_env, fetch(:rails_env, fetch(:stage))) }
set :sidekiq_log, -> { File.join(shared_path, 'log', 'sidekiq.log') }
set :sidekiq_error_log, -> { File.join(shared_path, 'log', 'sidekiq_error.log') }
set :sidekiq_user, 'deploy'
set :sidekiq_service_templates_path, 'config/deploy/templates'

set :sidekiq_service_unit_user, :system

SSHKit.config.command_map[:sidekiq] = "bundle exec sidekiq"
SSHKit.config.command_map[:sidekiqctl] = "bundle exec sidekiqctl"

Server runs Ubuntu 20.04

I can run the command directly on the server, it's just when done through SSHKit

Is there a workaround?

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

1 participant