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

Incorrect fallback for sidekiq_user for Systemd #267

Closed
attenzione opened this issue Jan 12, 2021 · 0 comments · Fixed by #272
Closed

Incorrect fallback for sidekiq_user for Systemd #267

attenzione opened this issue Jan 12, 2021 · 0 comments · Fixed by #272

Comments

@attenzione
Copy link

Systemd :sidekiq_user fallback to ssh user is incorrect, because there is no global fetch(:run_as):

  def sidekiq_user
    fetch(:sidekiq_user, fetch(:run_as))
  end

Upstart plugin has the same method and it's correct:

  def sidekiq_user(role = nil)
    if role.nil?
      fetch(:sidekiq_user)
    else
      properties = role.properties
      properties.fetch(:sidekiq_user) || # local property for sidekiq only
        fetch(:sidekiq_user) ||
        properties.fetch(:run_as) || # global property across multiple capistrano gems
        role.user
    end
  end

These two plugins contains more methods (sidekiq_user, switch_user, etc) that should be moved to common file.

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 a pull request may close this issue.

1 participant