New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using reboot resource on Linux when delay_mins is used #7734

Open
cnunemaker opened this Issue Oct 9, 2018 · 0 comments

Comments

Projects
None yet
2 participants
@cnunemaker

cnunemaker commented Oct 9, 2018

Description

An error occurs whenever the delay_mins property is used for a reboot resource. The reboot does still occur after the given delayed minutes, but the client does not exit gracefully.

Chef Version

Chef Client, version 14.5.33 x64

Platform Version

Red Hat Enterprise Linux Server release 7.3 (Maipo)
Linux version 3.10.0-514.21.1.el7.x86_64

Replication Case

Create a simple cookbook called foobar with the following default.rb recipe:

reboot 'do_reboot' do
  delay_mins 1
  action :reboot_now
end

Run chef-client -z -o foobar to execute the cookbook.

Client Output

Synchronizing Cookbooks:
  - foobar (0.0.0)
Installing Cookbook Gems:
Compiling Cookbooks...
Converging 1 resources
Recipe: foobar::default
  * reboot[do_reboot] action reboot_now[2018-10-09T12:41:22-05:00] WARN: Rebooting system immediately, requested by 'do_reboot
'
[2018-10-09T12:41:22-05:00] WARN: Rebooting system immediately, requested by 'do_reboot'
[2018-10-09T12:41:22-05:00] WARN: Skipping final node save because override_runlist was given
[2018-10-09T12:41:22-05:00] WARN: Skipping final node save because override_runlist was given

    
    Running handlers:
    Running handlers complete
    Chef Client finished, 0/0 resources updated in 14 seconds
[2018-10-09T12:41:22-05:00] WARN: Rebooting server at a recipe's request. Details: {:delay_mins=>1, :reason=>"Reboot by Chef",
 :timestamp=>2018-10-09 12:41:22 -0500, :requested_by=>"do_reboot"}
[2018-10-09T12:41:22-05:00] WARN: Rebooting server at a recipe's request. Details: {:delay_mins=>1, :reason=>"Reboot by Chef",
 :timestamp=>2018-10-09 12:41:22 -0500, :requested_by=>"do_reboot"}
    
    Running handlers:
[2018-10-09T12:41:22-05:00] ERROR: Running exception handlers
[2018-10-09T12:41:22-05:00] ERROR: Running exception handlers
    Running handlers complete
[2018-10-09T12:41:22-05:00] ERROR: Exception handlers complete
[2018-10-09T12:41:22-05:00] ERROR: Exception handlers complete
    Chef Client failed. 0 resources updated in 14 seconds
[2018-10-09T12:41:22-05:00] FATAL: Stacktrace dumped to /root/.chef/local-mode-cache/cache/chef-stacktrace.out
[2018-10-09T12:41:22-05:00] FATAL: Stacktrace dumped to /root/.chef/local-mode-cache/cache/chef-stacktrace.out
[2018-10-09T12:41:22-05:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2018-10-09T12:41:22-05:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2018-10-09T12:41:22-05:00] FATAL: Chef::Exceptions::Reboot: Rebooting server at a recipe's request. Details: {:delay_mins=>1,
 :reason=>"Reboot by Chef", :timestamp=>2018-10-09 12:41:22 -0500, :requested_by=>"do_reboot"}
[2018-10-09T12:41:22-05:00] FATAL: Chef::Exceptions::Reboot: Rebooting server at a recipe's request. Details: {:delay_mins=>1,
 :reason=>"Reboot by Chef", :timestamp=>2018-10-09 12:41:22 -0500, :requested_by=>"do_reboot"}

Stacktrace

Trace 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment