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
Installing a plugin that has been removed from the update center json throws a non-descriptive error. This issue was noticed during a chef run with plugins that now have been added to this security advisory (https://jenkins.io/security/advisory/2017-04-10/) which are have been removed from the update center json file used to install plugins.
Steps to Reproduce:
Use this as the recipe on server without the artifactdeployer plugin already installed:
include_recipe 'jenkins::master'
jenkins_plugin 'artifactdeployer' do
version '0.33'
end
Expected Result:
Maybe a more descriptive error about the security advisory? I'm not sure what the best way to handle this is. The removed plugins are listed in the update center json as a security advisory, so maybe look there if the plugin cannot be installed and give the user warning message?
Actual Result:
A non-descriptive error:
stacktrace
```
* remote_file[/tmp/kitchen/cache/update-center.json] action create (up to date)
* file[/tmp/kitchen/cache/extracted-update-center.json] action create (up to date)
================================================================================
Error executing action `install` on resource 'jenkins_plugin[artifactdeployer]'
================================================================================
NoMethodError
-------------
undefined method `[]' for nil:NilClass
Cookbook Trace:
---------------
/tmp/kitchen/cache/cookbooks/jenkins/libraries/plugin.rb:267:in `install_plugin_from_update_center'
/tmp/kitchen/cache/cookbooks/jenkins/libraries/plugin.rb:124:in `block (2 levels) in <class:JenkinsPlugin>'
/tmp/kitchen/cache/cookbooks/jenkins/libraries/plugin.rb:154:in `block in <class:JenkinsPlugin>'
Resource Declaration:
---------------------
# In /tmp/kitchen/cache/cookbooks/cookbook-jenkins-playground/recipes/default.rb
3: jenkins_plugin 'artifactdeployer' do
4: version '0.33'
5: end
Compiled Resource:
------------------
# Declared in /tmp/kitchen/cache/cookbooks/cookbook-jenkins-playground/recipes/default.rb:3:in `from_file'
jenkins_plugin("artifactdeployer") do
action [:install]
default_guard_interpreter :default
declared_type :jenkins_plugin
cookbook_name "cookbook-jenkins-playground"
recipe_name "default"
version "0.33"
end
System Info:
------------
chef_version=13.0.118
platform=ubuntu
platform_version=16.04
ruby=ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]
program_name=chef-client worker: ppid=3066;start=13:20:00;
executable=/opt/chef/bin/chef-client
Running handlers:
[2017-04-22T13:21:35+00:00] ERROR: Running exception handlers
[2017-04-22T13:21:35+00:00] ERROR: Running exception handlers
Running handlers complete
[2017-04-22T13:21:35+00:00] ERROR: Exception handlers complete
[2017-04-22T13:21:35+00:00] ERROR: Exception handlers complete
Chef Client failed. 12 resources updated in 01 minutes 34 seconds
[2017-04-22T13:21:35+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
[2017-04-22T13:21:35+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
[2017-04-22T13:21:35+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2017-04-22T13:21:35+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2017-04-22T13:21:35+00:00] ERROR: jenkins_plugin[artifactdeployer] (cookbook-jenkins-playground::default line 3) had an error: NoMethodError: undefined method `[]' for nil:NilClass
[2017-04-22T13:21:35+00:00] ERROR: jenkins_plugin[artifactdeployer] (cookbook-jenkins-playground::default line 3) had an error: NoMethodError: undefined method `[]' for nil:NilClass
[2017-04-22T13:21:35+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
[2017-04-22T13:21:35+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
</details>
The text was updated successfully, but these errors were encountered:
Cookbook version
5.0.0
Chef-client version
13.0.118
Platform Details
Ubuntu 16.04
Scenario:
Installing a plugin that has been removed from the update center json throws a non-descriptive error. This issue was noticed during a chef run with plugins that now have been added to this security advisory (https://jenkins.io/security/advisory/2017-04-10/) which are have been removed from the update center json file used to install plugins.
Steps to Reproduce:
Use this as the recipe on server without the
artifactdeployer
plugin already installed:Expected Result:
Maybe a more descriptive error about the security advisory? I'm not sure what the best way to handle this is. The removed plugins are listed in the update center json as a security advisory, so maybe look there if the plugin cannot be installed and give the user warning message?
Actual Result:
A non-descriptive error:
stacktrace
``` * remote_file[/tmp/kitchen/cache/update-center.json] action create (up to date) * file[/tmp/kitchen/cache/extracted-update-center.json] action create (up to date)The text was updated successfully, but these errors were encountered: