SatelliteQE / puppet-robottelo_slave

GNU General Public License v3.0
0 stars 2 forks source link

Code in this repo does not work on a host without a 'jenkis' user or a '/home/jenkins' #5

Open ifireball opened 8 years ago

ifireball commented 8 years ago

Following is an example of some of the Puppet errors yielded:

Notice: /Stage[main]/Slave/Package[mysql-dev]/ensure: created
Error: Cannot create /home/jenkins/pr_tests; parent directory /home/jenkins does not exist
Error: /Stage[main]/Slave/File[/home/jenkins/pr_tests]/ensure: change from absent to directory failed: Cannot create /home/jenkins/pr_tests; parent directory /home/jenkins does not exist
Notice: /Stage[main]/Slave/Package[libxslt1-dev]/ensure: created
Error: Could not set 'file' on ensure: No such file or directory - /home/jenkins/.katello-ca.cert20160118-689-1ln5jkv at 296:/root/src/puppet-robottelo_slave/modules/slave/manifests/init.pp
Error: Could not set 'file' on ensure: No such file or directory - /home/jenkins/.katello-ca.cert20160118-689-1ln5jkv at 296:/root/src/puppet-robottelo_slave/modules/slave/manifests/init.pp
Wrapped exception:
No such file or directory - /home/jenkins/.katello-ca.cert20160118-689-1ln5jkv
Error: /Stage[main]/Slave/File[/home/jenkins/.katello-ca.cert]/ensure: change from absent to file failed: Could not set 'file' on ensure: No such file or directory - /home/jenkins/.katello-ca.cert20160118-689-1ln5jkv at 296:/root/src/puppet-robottelo_slave/modules/slave/manifests/init.pp

This might back traced back to code from the theforeman/foreman-infra

ehelms commented 8 years ago

The code assumes you have pre-configured the box in question as a slave in Jenkins at the moment, which would assume a Jenkins user exists IIRC. https://github.com/SatelliteQE/puppet-robottelo_slave#beginning-with-robottelo_slave

We can switch around the assumption, however, the code will have to change.

ifireball commented 8 years ago

I think the assumtion should be removed for a few reasons:

  1. As it is, this code cannot be easily used to provision slaves with automated tools (e.g. Foreman...)
  2. Unmeccessary complications were added to my current workflow of trying to create pre-baked slave cloud images
  3. Such assumptions just dont make for good Puppet code imo.
  4. This will probably be very easy to fix (Just one user resource to add), but the fix may not belong in this repo

Note: I do not consider this to be a high-priority issue ATM. This is why I opened an issue ticket rather then a PR.

בתאריך יום ב׳, 18 בינו׳ 2016, 19:58 מאת Eric D Helms < notifications@github.com>:

The code assumes you have pre-configured the box in question as a slave in Jenkins at the moment, which would assume a Jenkins user exists IIRC. https://github.com/SatelliteQE/puppet-robottelo_slave#beginning-with-robottelo_slave

We can switch around the assumption, however, the code will have to change.

— Reply to this email directly or view it on GitHub https://github.com/SatelliteQE/puppet-robottelo_slave/issues/5#issuecomment-172607134 .

ehelms commented 8 years ago

Since this uses foreman-infra puppet modules as part of it, the assumed workflow is roughly equivalent to that of Foreman. Which, for reference can be found here https://github.com/theforeman/foreman/pull/3076/files#diff-54b013ef0e142d15196526e364ad1a1bR4

That is to say, I am all for updating it to make this easier on folks, just adding some context as we work through it.