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

JNLP slave is configured to not use all the groups of the jenkins user #685

Closed
philipdouglas opened this issue May 16, 2018 · 1 comment
Closed

Comments

@philipdouglas
Copy link

Cookbook version

5.0.6 (but it appears the same in master)

Chef-client version

N/A

Platform Details

Ubuntu 14.04 in a VMware VM

Scenario:

I want jenkins jobs to be able interact with docker. In order to do this, I put the jenkins user in the docker group, so it would have permission to use the docker socket file. However, because the slave process is run with chpst -u jenkins (https://github.com/chef-cookbooks/jenkins/blob/master/templates/sv-jenkins-slave-run.erb#L10) the jenkins process only gets the jenkins group and ignores the docker group. This causes permission errors from docker.

What is the reason for running the process using chpst? Can we change it to use all the groups?

Steps to Reproduce:

  • Add the jenkins user to a new group
  • Restart the slave
  • Run a job that just runs groups

Expected Result:

The result should be jenkins docker or whatever the other group you put it in was.

Actual Result:

You just get jenkins.

@cdoughty-r7
Copy link

There is a fix for this on the master service template, just not on the slave for some mind boggling reason:
https://github.com/chef-cookbooks/jenkins/blob/master/templates/sv-jenkins-run.erb#L10
All that is needed is to have the slave use the same variable or a variable of the namespace node instead of master.

jonathanan added a commit to jonathanan/jenkins that referenced this issue Feb 7, 2019
…ps of the jenkins user

* Add attribute 'runit_groups' to jenkins_jnlp_slave resource to configure any of the user's groups defined in this attribute with the runit_service.

Signed-off-by: Jonathan An <jan@esri.com>
tas50 added a commit that referenced this issue Feb 11, 2019
[GH-685] - JNLP slave is configured to not use all the groups of the jenkins user
@tas50 tas50 closed this as completed Jul 14, 2020
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

3 participants