Skip to content
This repository has been archived by the owner on Nov 12, 2021. It is now read-only.

If a reboot resource is used in a chef provisioner packer fails #13

Open
ghost opened this issue Apr 20, 2021 · 1 comment
Open

If a reboot resource is used in a chef provisioner packer fails #13

ghost opened this issue Apr 20, 2021 · 1 comment

Comments

@ghost
Copy link

ghost commented Apr 20, 2021

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.
@nywilken
Copy link
Contributor

nywilken commented Nov 9, 2021

With the archival of this repository all open issues will be marked as read-only. If you wish to further discuss this plugin or any of its open issues we invite you to open a discussion on the Packer community forum.

More details on the plugin archiving process for this provisioner can be found on the Plans to Archive Unmaintained Packer Provisioner Plugins blog post.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant