This repository was archived by the owner on Nov 12, 2021. It is now read-only.
generated from hashicorp/packer-plugin-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 6
If a reboot resource is used in a chef provisioner packer fails #13
Copy link
Copy link
Open
Description
This issue was originally opened by @tas50 as hashicorp/packer#6346. It was migrated here as a result of the Packer plugin split. The original body of the issue is below.
Chef includes a reboot resource which allows rebooting a system (imagine that). When the reboot resource runs it exits the Chef client with an exit code of 35. This code is considered a non-fatal code in Chef, but packer is picking that up as a failure and fails the whole build.
virtualbox-iso: * reboot[now] action reboot_now[2018-06-05T15:50:17-07:00] WARN: Rebooting system immediately, requested by 'now'
virtualbox-iso: [2018-06-05T15:50:17-07:00] WARN: Rebooting system immediately, requested by 'now'
virtualbox-iso:
virtualbox-iso:
virtualbox-iso: Running handlers:
virtualbox-iso: Running handlers complete
virtualbox-iso: Chef Client finished, 30/38 resources updated in 02 minutes 52 seconds
virtualbox-iso: [2018-06-05T15:50:17-07:00] WARN: Rebooting server at a recipe's request. Details: {:delay_mins=>0, :reason=>"Reboot by Chef", :timestamp=>2018-06-05 15:50:17 -0700, :requested_by=>"now"}
virtualbox-iso: [2018-06-05T15:50:17-07:00] WARN: Rebooting server at a recipe's request. Details: {:delay_mins=>0, :reason=>"Reboot by Chef", :timestamp=>2018-06-05 15:50:17 -0700, :requested_by=>"now"}
virtualbox-iso:
virtualbox-iso: Running handlers:
virtualbox-iso: [2018-06-05T15:50:17-07:00] ERROR: Running exception handlers
virtualbox-iso: [2018-06-05T15:50:17-07:00] ERROR: Running exception handlers
virtualbox-iso: Running handlers complete
virtualbox-iso: [2018-06-05T15:50:17-07:00] ERROR: Exception handlers complete
virtualbox-iso: [2018-06-05T15:50:17-07:00] ERROR: Exception handlers complete
virtualbox-iso: Chef Client failed. 30 resources updated in 02 minutes 52 seconds
virtualbox-iso: [2018-06-05T15:50:17-07:00] FATAL: Stacktrace dumped to c:/windows/temp/packer-chef-solo/local-mode-cache/cache/chef-stacktrace.out
virtualbox-iso: [2018-06-05T15:50:17-07:00] FATAL: Stacktrace dumped to c:/windows/temp/packer-chef-solo/local-mode-cache/cache/chef-stacktrace.out
virtualbox-iso: [2018-06-05T15:50:17-07:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
virtualbox-iso: [2018-06-05T15:50:17-07:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
virtualbox-iso: [2018-06-05T15:50:17-07:00] FATAL: Chef::Exceptions::Reboot: Rebooting server at a recipe's request. Details: {:delay_mins=>0, :reason=>"Reboot by Chef", :timestamp=>2018-06-05 15:50:17 -0700, :requested_by=>"now"}
virtualbox-iso: [2018-06-05T15:50:17-07:00] FATAL: Chef::Exceptions::Reboot: Rebooting server at a recipe's request. Details: {:delay_mins=>0, :reason=>"Reboot by Chef", :timestamp=>2018-06-05 15:50:17 -0700, :requested_by=>"now"}
==> virtualbox-iso: Deregistering and deleting VM...
==> virtualbox-iso: Deleting output directory...
Build 'virtualbox-iso' errored: Error executing Chef: Non-zero exit status: 35
==> Some builds didn't complete successfully and had errors:
--> virtualbox-iso: Error executing Chef: Non-zero exit status: 35
==> Builds finished but no artifacts were created.