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
Here in the recipe, it is using the same configuration twice but the chef run is throwing error: NoMethodError: undefined method `properties' for nil:NilClass which is incorrect
Description
[root@workstation cookbooks]# cat netdev/recipes/simple.rb
netdev_lag "ae1" do
links %w{ ge-0/0/1 ge-0/0/2}
action :create
end
netdev_lag "ae1" do
links %w{ ge-0/0/1 ge-0/0/2}
action :create
end
root@router% /opt/sdk/chef/bin/ruby /opt/sdk/chef/bin/chef-client -c /config/chef/client.rb
[2015-07-22T10:38:37+05:30] INFO: Forking chef instance to converge...
Starting Chef Client, version 11.10.4
[2015-07-22T10:38:38+05:30] INFO: *** Chef 11.10.4 ***
[2015-07-22T10:38:38+05:30] INFO: Chef-client pid: 24938
[2015-07-22T10:38:43+05:30] INFO: Run List is [recipe[netdev::simple]]
[2015-07-22T10:38:43+05:30] INFO: Run List expands to [netdev::simple]
[2015-07-22T10:38:43+05:30] INFO: Starting Chef Run for tot-mx-k
[2015-07-22T10:38:43+05:30] INFO: Running start handlers
[2015-07-22T10:38:43+05:30] INFO: Start handlers complete.
[2015-07-22T10:38:43+05:30] INFO: HTTP Request Returned 404 Object Not Found:
resolving cookbooks for run list: ["netdev::simple"]
[2015-07-22T10:38:43+05:30] INFO: Loading cookbooks [netdev]
Synchronizing Cookbooks:
netdev
Compiling Cookbooks...
/var/chef/cache/cookbooks/netdev/libraries/_junos_api_client.rb:35: warning: already initialized constant KNOWN_RESOURCES
............
Converging 2 resources
Recipe: netdev::simple
[2015-07-22T10:39:10+05:30] ERROR: Exception handlers complete
[2015-07-22T10:39:10+05:30] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
Chef Client failed. 1 resources updated in 32.687451191 seconds
[2015-07-22T10:39:10+05:30] ERROR: netdev_lag[ae1](netdev::simple line 6) had an error: NoMethodError: undefined method `properties' for nil:NilClass
[2015-07-22T10:39:10+05:30] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
The text was updated successfully, but these errors were encountered:
ISSUE:
Here in the recipe, it is using the same configuration twice but the chef run is throwing error: NoMethodError: undefined method `properties' for nil:NilClass which is incorrect
Description
root@router% /opt/sdk/chef/bin/ruby /opt/sdk/chef/bin/chef-client -c /config/chef/client.rb
[2015-07-22T10:38:37+05:30] INFO: Forking chef instance to converge...
Starting Chef Client, version 11.10.4
[2015-07-22T10:38:38+05:30] INFO: *** Chef 11.10.4 ***
[2015-07-22T10:38:38+05:30] INFO: Chef-client pid: 24938
[2015-07-22T10:38:43+05:30] INFO: Run List is [recipe[netdev::simple]]
[2015-07-22T10:38:43+05:30] INFO: Run List expands to [netdev::simple]
[2015-07-22T10:38:43+05:30] INFO: Starting Chef Run for tot-mx-k
[2015-07-22T10:38:43+05:30] INFO: Running start handlers
[2015-07-22T10:38:43+05:30] INFO: Start handlers complete.
[2015-07-22T10:38:43+05:30] INFO: HTTP Request Returned 404 Object Not Found:
resolving cookbooks for run list: ["netdev::simple"]
[2015-07-22T10:38:43+05:30] INFO: Loading cookbooks [netdev]
Synchronizing Cookbooks:
netdev
Compiling Cookbooks...
/var/chef/cache/cookbooks/netdev/libraries/_junos_api_client.rb:35: warning: already initialized constant KNOWN_RESOURCES
............
Converging 2 resources
Recipe: netdev::simple
netdev_lag[ae1] action create[2015-07-22T10:38:46+05:30] INFO: Processing netdev_lag[ae1] action create (netdev::simple line 1)
[2015-07-22T10:38:52+05:30] INFO: Netdev::Junos::ApiTransport: Acquired exclusive Junos configuration lock
netdev_lag[ae1] action create[2015-07-22T10:39:09+05:30] INFO: Processing netdev_lag[ae1] action create (netdev::simple line 6)
Error executing action
create
on resource 'netdev_lag[ae1]'NoMethodError
undefined method `properties' for nil:NilClass
Cookbook Trace:
/var/chef/cache/cookbooks/netdev/libraries/_junos_api_client.rb:127:in
block in updated_changed_properties' /var/chef/cache/cookbooks/netdev/libraries/_junos_api_client.rb:121:in
each_pair'/var/chef/cache/cookbooks/netdev/libraries/_junos_api_client.rb:121:in
updated_changed_properties' /var/chef/cache/cookbooks/netdev/libraries/provider_lag_junos.rb:73:in
action_create'Resource Declaration:
In /var/chef/cache/cookbooks/netdev/recipes/simple.rb
6: netdev_lag "ae1" do
7: links %w{ ge-0/0/1 ge-0/0/2}
8: action :create
9: end
Compiled Resource:
Declared in /var/chef/cache/cookbooks/netdev/recipes/simple.rb:6:in `from_file'
netdev_link_aggregation_group("ae1") do
action [:create]
retries 0
retry_delay 2
lag_name "ae1"
lacp "disable"
cookbook_name "netdev"
recipe_name "simple"
links ["ge-0/0/1", "ge-0/0/2"]
end
[2015-07-22T10:39:10+05:30] INFO: Running queued delayed notifications before re-raising exception
Running handlers:
[2015-07-22T10:39:10+05:30] ERROR: Running exception handlers
[2015-07-22T10:39:10+05:30] INFO: Rolled back pending Junos candidate configuration changes
Running handlers complete
[2015-07-22T10:39:10+05:30] ERROR: Exception handlers complete
[2015-07-22T10:39:10+05:30] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
Chef Client failed. 1 resources updated in 32.687451191 seconds
[2015-07-22T10:39:10+05:30] ERROR: netdev_lag[ae1](netdev::simple line 6) had an error: NoMethodError: undefined method `properties' for nil:NilClass
[2015-07-22T10:39:10+05:30] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
The text was updated successfully, but these errors were encountered: