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
The original defect for nexus-cli gem is submitted in corresponding github project here.
To make a long story short, the current implementation of nexus-cli gem, which is using extlib gem, breaks further usage of group Chef resource and potentially any other resources, which invoke methods with keyword arguments and splat operations.
So for correct usage of nexus cookbook LWRPs on Chef12, new version of nexus-cli gem is required, where the 'extlib' gem will not be used.
Current work-around is to use the Nexus-related recipes at the end of the run list for the nodes.
Here is an example via chef-shell: chef-shell -z -o "recipe[nexus::cli]"
resolvingcookbooksforrunlist: ["nexus::cli"]..SynchronizingCookbooks:
- nexus(3.3.1). - java(1.47.0)
- apt(2.9.2)
- windows(2.0.2)
- homebrew(1.10.0)
- bluepill(2.4.0)
- nginx(2.7.6)
- rsyslog(2.1.0)
- 7-zip(1.0.2)
- build-essential(2.4.0)
- ohai(2.1.0)
- runit(1.7.6)
- packagecloud(0.2.5). - yum-epel(0.7.1)
- yum(4.1.0)
- artifact(1.12.2)
.....
chef(12.19.36)>
chef(12.19.36)> recipe_modechef:recipe(12.19.36)> nexus_proxy_repository'rubygems-org'dochef:recipe > url'https://rubygems.org'chef:recipe ?> repo_provider'rubygems-proxy'chef:recipe ?> end=> <nexus_proxy_repository[rubygems-org]@name: "rubygems-org"@noop: nil @before: nil @params: {}@provider: nil @allowed_actions: [:nothing,:create,:delete,:update]@action: [:create]@updated: false@updated_by_last_action: false@supports: {}@ignore_failure: false@retries: 0@retry_delay: 2@source_line: "(irb#1):1:in `irb_binding'"@guard_interpreter: nil @default_guard_interpreter: :default@elapsed_time: 0@sensitive: false@declared_type: :nexus_proxy_repository@cookbook_name: nil @recipe_name: nil @url: "https://rubygems.org"@repo_provider: "rubygems-proxy">
chef:recipe(12.19.36)> group'test'dochef:recipe > action :managechef:recipe ?> members['nginx']chef:recipe ?> end=> <group[test]@name: "test"@noop: nil @before: nil@params: {}@provider: nil @allowed_actions: [:nothing,:create,:remove,:modify,:manage]@action: [:manage]@updated: false@updated_by_last_action: false@supports: {}@ignore_failure: false@retries: 0@retry_delay: 2@source_line: "(irb#1):5:in `irb_binding'"@guard_interpreter: nil @default_guard_interpreter: :default@elapsed_time: 0@sensitive: false@group_name: "test"@gid: nil @members: ["nginx"]@excluded_members: []@append: false@non_unique: false@declared_type: :group@cookbook_name: nil @recipe_name: nil>
chef:recipe(12.19.36)> run_chef[2017-04-12T11:05:06+02:00]INFO: Processingchef_gem[nexus_cli]actioninstall(nexus::cliline20)[2017-04-12T11:05:06+02:00]DEBUG: Providersforgenericchef_gemresourceenabledonnodeinclude: [Chef::Provider::Package::Rubygems][2017-04-12T11:05:06+02:00]DEBUG: Providerforactioninstallonresourcechef_gem[nexus_cli]isChef::Provider::Package::Rubygems[2017-04-12T11:05:06+02:00]DEBUG: chef_gem[nexus_cli]usinggem'/opt/chef/embedded/bin/gem'
....[2017-04-12T11:05:13+02:00]INFO: Processinggroup[test]actionmanage((irb#1) line 5)[2017-04-12T11:05:13+02:00]DEBUG: Providersforgenericgroupresourceenabledonnodeinclude: [Chef::Provider::Group::Gpasswd][2017-04-12T11:05:13+02:00]DEBUG: Providerforactionmanageonresourcegroup[test]isChef::Provider::Group::Gpasswd...
groupmod: group'{"test"=>nil}'does not exist================================================================================Errorexecutingaction`manage`onresource'group[test]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expectedprocesstoexitwith[0],butreceived'6'
---- Beginoutputof["groupmod","{\"test\"=>nil}"] ----
STDOUT:
STDERR: groupmod: group'{"test"=>nil}'does not exist
---- Endoutputof["groupmod","{\"test\"=>nil}"] ----
Ran["groupmod","{\"test\"=>nil}"]returned6
....CompiledResource:
------------------
# Declared in (irb#1):5:in `irb_binding'group("test")doaction[:manage]retries0retry_delay2default_guard_interpreter:defaultgroup_name"test"gid3000members["nginx"]declared_type:groupend...
Mixlib::ShellOut::ShellCommandFailed: group[test]((irb#1) line 5) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '6'
---- Beginoutputof["groupmod","{\"test\"=>nil}"] ----
STDOUT:
STDERR: groupmod: group'{"test"=>nil}'does not exist
---- Endoutputof["groupmod","{\"test\"=>nil}"] ----
Ran["groupmod","{\"test\"=>nil}"]returned6from/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/mixlib-shellout-2.2.7/lib/mixlib/shellout.rb:289:in`invalid!' from /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/mixlib-shellout-2.2.7/lib/mixlib/shellout.rb:276:in `error!' from /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/mixin/shell_out.rb:118:in `shell_out!'from/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/mixin/shell_out.rb:73:in`shell_out_compact!' from /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/provider/group/groupadd.rb:53:in `manage_group' from /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/provider/group.rb:158:in `block in action_manage'from/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/mixin/why_run.rb:52:in`add_action' from /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/provider.rb:176:in `converge_by' from /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/provider/group.rb:157:in `action_manage'from/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/provider.rb:145:in`run_action' from /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/resource.rb:622:in `run_action' from /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/runner.rb:69:in `run_action'from/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/runner.rb:97:in`block (2 levels) in converge' from /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/runner.rb:97:in `each' from /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/runner.rb:97:in `block in converge'from/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/resource_collection/resource_list.rb:94:in`block in execute_each_resource' from /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/resource_collection/stepable_iterator.rb:114:in `call_iterator_block' from /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/resource_collection/stepable_iterator.rb:85:in `step'from/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/resource_collection/stepable_iterator.rb:103:in`iterate' from /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index' from /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/resource_collection/resource_list.rb:92:in `execute_each_resource'from/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/runner.rb:96:in`converge' from /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/shell/ext.rb:236:in `run_chef'
from(irb#1):9
The text was updated successfully, but these errors were encountered:
The original defect for nexus-cli gem is submitted in corresponding github project here.
To make a long story short, the current implementation of nexus-cli gem, which is using extlib gem, breaks further usage of group Chef resource and potentially any other resources, which invoke methods with keyword arguments and splat operations.
So for correct usage of nexus cookbook LWRPs on Chef12, new version of nexus-cli gem is required, where the 'extlib' gem will not be used.
Current work-around is to use the Nexus-related recipes at the end of the run list for the nodes.
Here is an example via chef-shell:
chef-shell -z -o "recipe[nexus::cli]"
The text was updated successfully, but these errors were encountered: