Ask Your Question

Puppet Identifing changes but not applying changes.

asked 2017-09-18 06:13:07 -0500

baz gravatar image

updated 2017-09-20 06:31:46 -0500

I have some existing code that applies permissions to jenkins config.xml file. For the last year this has worked as advertised but as of today when I added to new stanzas to the code Puppet has been identifying that changes are needed when puppet is run manually on the QA servers shows that the changes have been applied, but when I look in the config file that should have been changed, the changes haven't been made. I don't think the issue is the code as there are no errors and the code is just copied from previous lines and points to a new hiera entry.

The code is

<% [@jenkins_users_scmtag].flatten.each do|users| -%>
     <permission>hudson.scm.SCM.Tag:<%= users %> </permission>
<% end -%>
<% [@jenkins_users_healthchecks].flatten.each do|users| -%>
     <permission>jenkins.metrics.api.Metrics.HealthCheck:<%= users %> </permission>
<% end -%>
<% [@jenkins_users_metricsthreaddump].flatten.each do|users| -%>
     <permission>jenkins.metrics.api.Metrics.metrics_ThreadDump:<%= users %> </permission>
<% end -%>
<% [@jenkins_users_metricsview].flatten.each do|users| -%>
     <permission>jenkins.metrics.api.Metrics.Metrics.metrics_view:<%= users %> </permission>
<% end -%>

The response that puppet is giving shows the correct XML is being applied but in the XML code there are no entries.

+     <permission>jenkins.metrics.api.Metrics.HealthCheck:jane</permission>
+     <permission>jenkins.metrics.api.Metrics.HealthCheck:bob</permission>
+     <permission>jenkins.metrics.api.Metrics.metrics_ThreadDump:jane</permission>
+     <permission>jenkins.metrics.api.Metrics.metrics_ThreadDump:bob</permission>
+     <permission>jenkins.metrics.api.Metrics.metrics_view:jane</permission>
+     <permission>jenkins.metrics.api.Metrics.metrics_view:bob</permission>

When Puppet is run in debug and trace there are no indications there is anything wrong. Our environment runs on Puppet 3.8.6 and Foreman.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-09-19 15:45:30 -0500

baz gravatar image

This has been resolved, turns out one of the Dev's added the Metrics plugin to the dev box where I was taking the config from and that module was not applied to the QA box in question. The code was working as advertised, but Jenkins was removing the lines as not being valid due to the lack of the plugin.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2017-09-18 06:13:07 -0500

Seen: 289 times

Last updated: Sep 20