Packer: file provisioner with docker builder hangs downloading a "big" file

Created on 15 Jul 2019  ยท  2Comments  ยท  Source: hashicorp/packer

Using docker builder, File provisioner in download direction (haven't tried upload) hangs in 1.4.1 and 1.4.2. 1.4.0 and prior are fine. host system is an ubuntu 18.04.

Bigger files than 64k approx hang forever when downloading from a docker builder.

```tmplate.json
{
"builders": [
{
"type": "docker",
"image": "ubuntu",
"discard": true
}
],
"provisioners": [
{
"type": "shell",
"inline": ["dd if=/dev/zero of=/tmp/file.txt count=64 bs=1024"]
},
{
"type": "file",
"direction": "download",
"source": "/tmp/file.txt",
"destination": "file.txt"
}
]

}


Run with `PACKER_LOG=1 packer build template.json`


change count=64 to count=164 and the process will hang

The logs stop after 'Downloading file from container...'

==> docker: Pausing before the next provisioner . Press enter to continue.
==> docker: Downloading /tmp/file.txt => file.txt
2019/07/15 13:25:33 packer: 2019/07/15 13:25:33 Downloading file from container: 389779dddebdd8ad721bcaa75478aae0a8dcde862d55488274dc58699519786d:/tmp/file.txt
```

bug buildedocker

Most helpful comment

Good news! I was able to reproduce with v1.4.1 and v1.4.2 but wasn't able to reproduce on master, so I believe this has been fixed with the merge of https://github.com/hashicorp/packer/pull/7814

A build from when that patch was created can be found here: https://circleci.com/gh/hashicorp/packer/6178#artifacts/containers/0

The fix will be out with v1.4.3

All 2 comments

Good news! I was able to reproduce with v1.4.1 and v1.4.2 but wasn't able to reproduce on master, so I believe this has been fixed with the merge of https://github.com/hashicorp/packer/pull/7814

A build from when that patch was created can be found here: https://circleci.com/gh/hashicorp/packer/6178#artifacts/containers/0

The fix will be out with v1.4.3

I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Tensho picture Tensho  ยท  3Comments

frezbo picture frezbo  ยท  3Comments

jesse-c picture jesse-c  ยท  3Comments

tleyden picture tleyden  ยท  3Comments

shashanksinha89 picture shashanksinha89  ยท  3Comments