Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
jenkins service restart on each puppet run under Redhat 7 #807
With commit 5ab2c8a of this module, I get this on each puppet agent run, no matter if manual or invoked by the daemon:
The restarts don't occur using the v1.7.0 version of the module published to forge.
I am running on the master branch and the same commit as @westbywest. I'm also running RHEL7 (OL7), with Jenkins version as below
I get the following each time I run Jenkins.
I can see that the jenkins::user define is not idempotent, so that might explain that bit. I've also done a diff of my two job files, and got the following, which might explain why the jobs are continually re-installed. When you install a Jenkins job via the API, does it munge the XML?
Using the native types has fixed the jobs being re-installed on each run. However even using the native types, I have the same issue as OP on each run (a restart of Jenkins).
After looking at the code, I believe it's this section in systemd.pp that forces Jenkins to stop on every run. In particular the ensure => stopped line. I think @jhoblitt should be able to give us an indication why this needs to fire on every run.
Having this happen on every puppet run is causing me major problems.
Jenkins doesn't start fast enough on my system, so I get the following error:
Furthermore, it appears that any time there is a Jenkins CLI error, it causes the entire catalogue run to abort. I'm going to post this as a separate bug.
referenced this issue
Nov 29, 2017
I think I've figured it out. it's the resource defaults for file (in my case). I can reproduce it with:
If I don't have the resource default for file, the problem doesn't occur.