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 '-n' switch to sudo command #12

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

khurlbut
Copy link

No description provided.

@melezhik
Copy link
Owner

melezhik commented Oct 29, 2018

Hi @khurlbut , I would rather add this as configurable option, so that keep back compatibility, we can add non-interactive checkbox in advanced settings, which is true by default , to configure sudo -n , what do you think?

@khurlbut
Copy link
Author

khurlbut commented Oct 29, 2018 via email

@melezhik
Copy link
Owner

@khurlbut cool, would you be able to add corresponding controls to view and adjust controller logic?

@khurlbut
Copy link
Author

khurlbut commented Oct 29, 2018 via email

@khurlbut
Copy link
Author

OK. I've added a checkbox to control the -n switch.

@melezhik
Copy link
Owner

Cool. Thanks.

Could you also please clarify this commit?

5dc01a1

Not sure, if I understand ...

@melezhik
Copy link
Owner

melezhik commented Oct 30, 2018

"the way the plugin is now, there isn't a problem, except that -c /etc/chef/client.rb is the default anyway so it's redundant. if he were to easily allow -c /path/to/anywhere.rb it opens you up to getting a root shell. but my real complaint was just: why bother to add that -c suffix when it's needless?"

the line config_path = " -c #{@chef_client_config}" unless (@chef_client_config.nil? || @chef_client_config.empty?) is important. People can override the path to chef configuration file through plugin settings. If people do not choose custom path to configuration file, chef-client runs without -c options which makes it use default configuration file.

@khurlbut
Copy link
Author

I see your point, Alexey. I've uncommented the line in question. This PR now only includes changes in support of the '-n' switch.

@melezhik
Copy link
Owner

melezhik commented Oct 31, 2018

Yeah. I am ok with current PR. Have you managed to test the plugin through jpi? It's been a while since I touched the plugin development last time, looks like things has changed and my jpi test jenkins fails to create jobs, there are errors in the Jenkins log. Which jruby version do you use? Without that I cannot even release a plugin ... ):

I wonder if jpi is maintained at all, last release is more than 2 years ago. I am going to create cross issue on their side with all the details.

@melezhik
Copy link
Owner

jenkinsci/jenkins.rb#124

@melezhik melezhik self-requested a review November 1, 2018 14:02
@melezhik melezhik self-assigned this Nov 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants