puppet-jenkins icon indicating copy to clipboard operation
puppet-jenkins copied to clipboard

Swarm Client Jar has incorrect owner/group

Open bstopp opened this issue 7 years ago • 2 comments

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 5.5.3
  • Ruby:
  • Distribution: CentOS 7
  • Module version: master branch

How to reproduce (e.g Puppet code you use)

  class { 'jenkins::slave':
    slave_name => $facts['networking.hostname'],
    install_java => false,
    version => '3.13',
    ui_user => 'user',
    ui_pass => 'password',
    masterurl => http://jenkins.mycompany.com/jenkins
  }

What are you seeing

The swarm-client-3.13.jar is owned by root with mode of 0640 (my system's umask is weird, regardless...).

What behaviour did you expect instead

The swarm client jar file should be owned by the slave_user specified in the resource definition. With this configuration the service cannot start because the file is not owned by the user who needs to execute it.

Output log

Any additional information you'd like to impart

bstopp avatar Aug 15 '18 13:08 bstopp

I think its debatable if its a good idea for a jenkins agent to have permission to delete it's own jar files. This could also be resolved by setting the mode and/or the group on the jar.

jhoblitt avatar Aug 15 '18 15:08 jhoblitt

It really isn't any different than the jenkins user's permissions on the master; and of all the files the swarm client is the only one on the agent that isn't owned by the jenkins-slave user. 🤷‍♂️

bstopp avatar Aug 15 '18 16:08 bstopp