hashicorp / hashicorp/packer-plugin-lxc
packer incorrectly cleans up when ^c'ed causing all builds afterwards to fail
- Dominant language
- Go
- Stars
- 7
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
When filing a bug, please include the following headings if possible. Any
example text in this template can be deleted.
#### Overview of the Issue
when prematruely ending a build using lxc packer doesnt clean up and the container is unable to be started or destroyed causing packer to fail
it only fails when -debug isnt set
#### Reproduction Steps
build an image with lxc ^c it mid execution wait for it to gracefully exit then run the same build again see error
### Plugin and Packer version
packer version
Packer v1.12.0
packer plugin installed
/home/olivia/.config/packer/plugins/github.com/hashicorp/ansible/packer-plugin-ansible_v1.1.2_x5.0_linux_amd64
/home/olivia/.config/packer/plugins/github.com/hashicorp/lxc/packer-plugin-lxc_v1.0.2_x5.0_linux_amd64
### Simplified Packer Buildfile
```hcl
packer {
required_plugins {
lxc = {
source = "github.com/hashicorp/lxc"
version = "~> 1"
}
}
}
source "lxc" "base" {
config_file = "/etc/lxc/default.conf"
template_name = "download"
template_parameters = ["-d", "almalinux", "-a", "amd64", "-r", 9 ]
}
```
### Operating system and Environment details
arch linux
lxc version lxc 1:6.0.3-1
### Log Fragments and crash.log files
this shows the output of 4 runs in a row 3 without debug one with PACKER_LOG and the middle one with -debug working fine EDIT: it no longer works failing the same way as normal
https://gist.github.com/Dialgatrainer02/268f6994de4745ce6e11e36ceccbf46a
Set the env var `PACKER_LOG=1` for maximum log detail.
Contributor guide
Assessment
This issue has not been assessed yet.