You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using this module to call the Jenkins CLI. Any error in a CLI call causes the entire puppet run to abort. This is causing me major issues because it's stopping updates from other modules being applied to this box (not just Jenkins related changes). This issue is being compounded by #807 because I'm in a situation where Jenkins is being restarted on every single puppet run, and it does not start back up fast enough for the CLI to succeed. The end result is that every single puppet run on this box (which happens to be my puppet master) is failing.
Steps to reproduce.
Deliberately corrupt the jenkins-cli.jar
echo '' | sudo tee /usr/lib/jenkins/jenkins-cli.jar
Run puppet
Info: Applying configuration version '1511991992'
Notice: /Service[jenkins]/ensure: ensure changed 'running' to 'stopped'
Notice: /Stage[main]/Jenkins/Jenkins::Systemd[jenkins]/Transition[stop jenkins service]/enable: transition state {"ensure"=>"stopped"} applied to Service[jenkins]
Notice: /Stage[main]/Jenkins::Service/Service[jenkins]/ensure: ensure changed 'stopped' to 'running'
Info: /Stage[main]/Jenkins::Service/Service[jenkins]: Unscheduling refresh on Service[jenkins]
Error: Failed to apply catalog: Execution of '/bin/cat /usr/lib/jenkins/puppet_helper.groovy | /bin/java -jar /usr/lib/jenkins/jenkins-cli.jar -s http://localhost:8080 groovy = user_info_all' returned 1: Error: Invalid or corrupt jarfile /usr/lib/jenkins/jenkins-cli.jar
Is there any chance of having this behaviour changed so that it only prints a warning?
Cheers,
Nick
The text was updated successfully, but these errors were encountered:
CLI errors are not fatal to the entire puppet run, at least for me, as long as there are other resources that need to be converged that are no not dependent on the jenkins types.
The only way to avoid an error from the provider would be for it to be determined to be unsuitable. That would result in an error from the type that there's no suitable provider. A sanity check would need to support doing auth as well or it would fail for most users. It should be possible to add a sanity check in lib/puppet/x/jenkins/provider/cli.rb and have all the providers inherit it. That said, I'm not personally interested in working on this as it would just move the error around (without alternative providers) but I would be willing to merge a PR.
Hi,
I've been using this module to call the Jenkins CLI. Any error in a CLI call causes the entire puppet run to abort. This is causing me major issues because it's stopping updates from other modules being applied to this box (not just Jenkins related changes). This issue is being compounded by #807 because I'm in a situation where Jenkins is being restarted on every single puppet run, and it does not start back up fast enough for the CLI to succeed. The end result is that every single puppet run on this box (which happens to be my puppet master) is failing.
Steps to reproduce.
Is there any chance of having this behaviour changed so that it only prints a warning?
Cheers,
Nick
The text was updated successfully, but these errors were encountered: