hashicorp / hashicorp/packer

Shell provisioner random script failures

Open
#12,908 7 comments 0 reactions 0 assignees View on GitHub
bug stage/needs-investigation
Dominant language
Go
Stars
15.8k
Forks
3.3k
PR merge metrics
PR metrics pending

Description

#### Community Note

* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
* Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
* If you are interested in working on this issue or have submitted a pull request, please leave a comment

#### Overview of the Issue

using the shell provisioner with an array of scripts randomly I get an error when packer tries to run one

#### Reproduction Steps

run bento builds https://github.com/chef/bento
```bash
git clone https://github.com/chef/bento
cd bento
packer init -upgrade ./packer_templates
packer build -only=virtualbox-iso.vm -var-file=os_pkrvars/fedora/fedora-39-x86_64.pkrvars.hcl ./packer_templates
```

### Packer version

v1.10.2

### Operating system and Environment details

Ubuntu 22.04 github actions runner. https://github.com/chef/bento/actions/runs/8601528699/job/23569023182

### Log Fragments and crash.log files

2024-04-08T14:15:51Z: ==> virtualbox-ovf.vm: Provisioning with shell script: ../../packer_templates/scripts/_common/motd.sh
2024-04-08T14:16:28Z: ==> virtualbox-ovf.vm: sh: /tmp/script_2235.sh: No such file or directory
2024-04-08T14:16:28Z: ==> virtualbox-ovf.vm: Provisioning step had errors: Running the cleanup provisioner, if present...
2024-04-08T14:16:28Z: ==> virtualbox-ovf.vm: Cleaning up floppy disk...
2024-04-08T14:16:28Z: ==> virtualbox-ovf.vm: Deregistering and deleting imported VM...
2024-04-08T14:16:29Z: ==> virtualbox-ovf.vm: Deleting output directory...
2024-04-08T14:16:29Z: Build 'virtualbox-ovf.vm' errored after 1 minute 33 seconds: Script exited with non-zero exit status: 1. Allowed exit codes are: [0]

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.