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

Add the ability to configure which Unix user that interacts with Choria governors #294

Open
JoshuaSmeda opened this issue Jan 31, 2022 · 0 comments

Comments

@JoshuaSmeda
Copy link

Puppet runs its process under root, and in our circumstance, we run our Choria governors under another non-privileged Unix user.

Please add the ability to configure which user the governor API interacts with as per the following, https://www.rubydoc.info/gems/puppet/Puppet%2FUtil%2FExecution.execute

:cwd => '/etc/choria', 
:uid => 1000

In this example, our specific Unix user id was 1000.

  def run(action, ens, args={})
    args.delete(:ensure)
    parse_result(Puppet::Util::Execution.execute(make_cmd(action, args), :cwd => '/etc/choria', :uid => 1000, :failonfail => true, :custom_environment => environment), ens)
  end

There are a number of other references in choria_governor.rb that would also need to be modified to handle non-UID 0 processes.

Please let me know if I can be of any help.

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