Packer: LXD image builder hangs on Debian

Created on 25 Oct 2017  ยท  6Comments  ยท  Source: hashicorp/packer

I installed Packer on macOS and then i installed it on debian (machine running lxd) if i toggle the build from my macOS with remote set to the debian host the build succeeds

If i do the same on the debian host itself this is what i get

2017/10/25 10:54:20 packer: 2017/10/25 10:54:20 [INFO] 285 bytes written for 'uploadData'
2017/10/25 10:54:20 [INFO] 285 bytes written for 'uploadData'
2017/10/25 10:54:20 packer: 2017/10/25 10:54:20 Running copy command: lxc file push - packer-base/tmp/script_213.sh
2017/10/25 10:54:20 packer: 2017/10/25 10:54:20 Retryable error: Error uploading script: exit status 1

Steps to Reproduce

on a debian host

packer build template.json 
bug buildelxd

All 6 comments

can you post the contents of template.json

@mwhooker sure thing. Nice beard btw.

{
  "builders":[
    {
      "type": "lxd",
      "name": "base",
      "image": "images:alpine/edge",
      "output_image": "artellectual/base"
    }
  ],
  "provisioners":[
    {
      "type": "file",
      "source": "./",
      "destination": "./"
    }, {
      "type": "shell",
      "script": "./setup.sh"
    }
  ]
}

I'm having the same problem but fortunately I have an older version of lxd running and packer works with that version.

I _think_ file copying within lxd is currently broken which is causing problems with packer. See: https://github.com/lxc/lxd/issues/4050

It would seem that lxc file push not working was a red herring; I hadn't restarted LXD after upgrading it. After restarting the lxd daemon both lxc file push` and packer work perfectly.

@zacksiri try restarting lxd and see what happens.

@filterfish thank you! I think this can be closed.

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

mvermaes picture mvermaes  ยท  3Comments

frezbo picture frezbo  ยท  3Comments

sourav82 picture sourav82  ยท  3Comments

jesse-c picture jesse-c  ยท  3Comments

shashanksinha89 picture shashanksinha89  ยท  3Comments