Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save snehitgajjar/f4dbac9833257215a49ab055ca964532 to your computer and use it in GitHub Desktop.
Save snehitgajjar/f4dbac9833257215a49ab055ca964532 to your computer and use it in GitHub Desktop.
Recipe: sysctl::default
* sysctl[kernel.core_uses_pid] action apply (up to date)
* sysctl[kernel.msgmax] action apply (up to date)
* sysctl[kernel.msgmnb] action apply (up to date)
* sysctl[kernel.panic] action apply
- update kernel.panic
- set value to "10" (was "0")
* directory[/etc/sysctl.d] action create (up to date)
* file[/etc/sysctl.d/99-chef-kernel.panic.conf] action create
- create new file /etc/sysctl.d/99-chef-kernel.panic.conf
- update content in file /etc/sysctl.d/99-chef-kernel.panic.conf from none to 8f8c44
--- /etc/sysctl.d/99-chef-kernel.panic.conf 2018-05-11 12:58:27.822903675 -0500
+++ /etc/sysctl.d/.chef-99-chef-kernel20180511-3375-1l46toz.panic.conf 2018-05-11 12:58:27.822903675 -0500
@@ -1 +1,2 @@
+kernel.panic = 10
* execute[Load sysctl values] action run
================================================================================
Error executing action `run` on resource 'execute[Load sysctl values]'
================================================================================
Errno::ENOENT
-------------
No such file or directory - sysctl
Resource Declaration:
---------------------
# In /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.1.1/lib/chef/resource/sysctl.rb
85: execute "Load sysctl values" do
86: command "sysctl #{'-e ' if new_resource.ignore_error}-p"
87: action :run
88: end
89: end
Compiled Resource:
------------------
# Declared in /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.1.1/lib/chef/resource/sysctl.rb:85:in `block (2 levels) in <class:Sysctl>'
execute("Load sysctl values") do
action [:run]
default_guard_interpreter :execute
command "sysctl -p"
backup 5
declared_type :execute
cookbook_name "sysctl"
domain nil
user nil
end
System Info:
------------
chef_version=14.1.1
platform=redhat
platform_version=6.8
ruby=ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux]
program_name=/opt/chef/bin/chef-client
executable=/opt/chef/bin/chef-client
================================================================================
Error executing action `apply` on resource 'sysctl[kernel.panic]'
================================================================================
Errno::ENOENT
-------------
execute[Load sysctl values] (/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.1.1/lib/chef/resource/sysctl.rb line 85) had an error: Errno::ENOENT: No such file or directory - sysctl
Resource Declaration:
---------------------
# In /tmp/kitchen/cache/cookbooks/sysctl/recipes/default.rb
26: sysctl_param k do
27: value v
28: end
29: end if node.attribute?('sysctl') && node['sysctl'].attribute?('params')
Compiled Resource:
------------------
# Declared in /tmp/kitchen/cache/cookbooks/sysctl/recipes/default.rb:26:in `block in from_file'
sysctl("kernel.panic") do
action [:apply]
updated true
updated_by_last_action true
default_guard_interpreter :default
declared_type :sysctl_param
cookbook_name "sysctl"
recipe_name "default"
value "10"
key "kernel.panic"
end
System Info:
------------
chef_version=14.1.1
platform=redhat
platform_version=6.8
ruby=ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux]
program_name=/opt/chef/bin/chef-client
executable=/opt/chef/bin/chef-client
Running handlers:
[2018-05-11T12:58:27-05:00] ERROR: Running exception handlers
Running handlers complete
[2018-05-11T12:58:27-05:00] ERROR: Exception handlers complete
Chef Client failed. 1 resources updated in 01 seconds
[2018-05-11T12:58:27-05:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
[2018-05-11T12:58:27-05:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2018-05-11T12:58:27-05:00] FATAL: Errno::ENOENT: sysctl[kernel.panic] (sysctl::default line 26) had an error: Errno::ENOENT: execute[Load sysctl values] (/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.1.1/lib/chef/resource/sysctl.rb line 85) had an error: Errno::ENOENT: No such file or directory - sysctl
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>> Converge failed on instance <default-rhel-68>. Please see .kitchen/logs/default-rhel-68.log for more details
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment