hashicorp / hashicorp/packer

Crash when cancelling LXD builder

Open
#12,763 1 comment 0 reactions 0 assignees View on GitHub
bug
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

LXD builder crashes when terminated early

#### Reproduction Steps

Start an LXD builder, and cancel (Ctr-C) early.

### Packer version

Packer v1.10.0

### Simplified Packer Template

```
packer {
required_plugins {
lxd = {
source = "github.com/hashicorp/lxd"
version = "~> 1"
}
}
}

source "lxd" "ubuntu" {
image = "ubuntu-minimal:jammy"
}

build {
name = "builder"
sources = [
"source.lxd.ubuntu"
]
}

```

### Operating system and Environment details

Linux 6.5.0-10-generic #10-Ubuntu SMP PREEMPT_DYNAMIC Fri Oct 13 13:49:38 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
PRETTY_NAME="Ubuntu 23.10"
NAME="Ubuntu"
VERSION_ID="23.10"
VERSION="23.10 (Mantic Minotaur)"

[crash.log](https://github.com/hashicorp/packer/files/13761647/crash.log)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the cancellation described in the issue with the supplied LXD builder template, then inspect the linked crash.log and the LXD builder's cancellation path. Done means cancelling an early build no longer crashes Packer and the existing reproduction completes cleanly.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
devops, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.