0

我正在尝试使用厨师运行一个netdev配方来创建 vLAN,但它给出了“ ArgumentError: wrong number of arguments(2 for 0) ”。

以下是详细信息:

Recipe: netdev-master_latest::lag_create * netdev_lag[ae1] action create
[2015-08-27T15:45:51+05:30] INFO: Processing netdev_lag[ae1] action create (netdev-master_latest::lag_create line 1)

Error executing action `create` on resource 'netdev_lag[ae1]'

ArgumentError
-------------
wrong number of arguments(2 for 0)


Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/netdev-master_latest/recipes/lag_create.rb

  1: netdev_lag 'ae1' do
  2: #links %w{ ge-0/0/1 ge-0/0/2 }
  3: #minimum_links 1
  4: #lacp 'active'
  5:   action :create
  6: end
  7: 

Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/netdev-master_latest/recipes/lag_create.rb:1:in `from_file'

netdev_link_aggregation_group("ae1") do
  action [:create]
  retries 0
  retry_delay 2
  lag_name "ae1"
  lacp "disable"
  cookbook_name "netdev-master_latest"
  recipe_name "lag_create"
end

[2015-08-27T15:45:51+05:30] INFO: Running queued delayed notifications before re-raising exception
[2015-08-27T15:45:51+05:30] DEBUG: Re-raising exception: ArgumentError - netdev_lag[ae1] (netdev-master_latest::lag_create line 1) had an error:
ArgumentError: wrong number of arguments(2 for 0)
/...../chef/lib/ruby/gems/1.9.1/gems/chef-11.10.4/lib/chef/platform/provider_mapping.rb:441:in `initialize'
/......./chef/lib/ruby/gems/1.9.1/gems/chef-11.10.4/lib/chef/platform/provider_mapping.rb:441:in `new'
/......./chef/lib/ruby/gems/1.9.1/gems/chef-11.10.4/lib/chef/platform/provider_mapping.rb:441:in `provider_for_resource'
/......./chef/lib/ruby/gems/1.9.1/gems/chef-11.10.4/lib/chef/resource.rb:659:in `provider_for_action'
  /../..../chef/lib/ruby/gems/1.9.1/gems/chef-11.10.4/lib/chef/resource.rb:625:in `run_action'
/...../..../chef/lib/ruby/gems/1.9.1/gems/chef-11.10.4/lib/chef/runner.rb:49:in `run_action'
  /..../..../chef/lib/ruby/gems/1.9.1/gems/chef-11.10.4/lib/chef/runner.rb:81:in `block (2 levels) in converge'
...........................
  /...../..../chef/lib/ruby/gems/1.9.1/gems/chef-11.10.4/lib/chef/application/client.rb:306:in `run_application'
  /.../..../chef/lib/ruby/gems/1.9.1/gems/chef-11.10.4/lib/chef/application.rb:66:in `run'
  /.../.../chef/lib/ruby/gems/1.9.1/gems/chef-11.10.4/bin/chef-client:26:in `<top (required)>'
  /.../.../chef/bin/chef-client:23:in `load'
  /.../.../chef/bin/chef-client:23:in `<main>'

Running handlers:
[2015-08-27T15:45:51+05:30] ERROR: Running exception handlers
  - JunosCommitTransactionHandler
Running handlers complete

[2015-08-27T15:45:51+05:30] ERROR: Exception handlers complete
[2015-08-27T15:45:51+05:30] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2015-08-27T15:45:51+05:30] DEBUG: ArgumentError: netdev_lag[ae1] (netdev-master_latest::lag_create line 1) had an error: ArgumentError: wrong number of arguments(2 for 0)
................
/........../lib/ruby/gems/1.9.1/gems/chef-11.10.4/lib/chef/application/client.rb:314:in `block in run_application'
/........../lib/ruby/gems/1.9.1/gems/chef-11.10.4/lib/chef/application/client.rb:306:in `loop'
/........../lib/ruby/gems/1.9.1/gems/chef-11.10.4/lib/chef/application/client.rb:306:in `run_application'
/........../lib/ruby/gems/1.9.1/gems/chef-11.10.4/lib/chef/application.rb:66:in `run'
/........../lib/ruby/gems/1.9.1/gems/chef-11.10.4/bin/chef-client:26:in `<top (required)>'
/........../bin/chef-client:23:in `load'
/........../bin/chef-client:23:in `<main>'
Chef Client failed. 0 resources updated in 2.999744156 seconds
[2015-08-27T15:45:51+05:30] DEBUG: Server doesn't support resource history, skipping resource report.
[2015-08-27T15:45:51+05:30] ERROR: netdev_lag[ae1] (netdev-master_latest::lag_create line 1) had an error: ArgumentError: wrong number of arguments(2 for 0)
[2015-08-27T15:45:51+05:30] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
4

0 回答 0