[lxc-users] lxc-create fragile with respect to network failures during package download?

Fajar A. Nugraha list at fajar.net
Fri May 20 05:41:26 UTC 2016


LoL.

Go for it man, use zfs or btrfs while you're at it, and use "lxc copy" from
your own "golden" container. Then the create process will be instant using
zfs/btrfs snapshot/clone, no need to download anything.

-- 
Fajar

On Fri, May 20, 2016 at 12:22 PM, Dan Kegel <dank at kegel.com> wrote:

> Aw, I wanted to port to lxd anyway.
> On May 19, 2016 8:48 PM, "Fajar A. Nugraha" <list at fajar.net> wrote:
>
>> On Fri, May 20, 2016 at 4:02 AM, Dan Kegel <dank at kegel.com> wrote:
>>
>>> OK, thanks.  I'll port to lxd at some point.  Until then, I'll add a
>>> retry loop.
>>>
>>>
>> You shouldn't need to switch to lxd JUST to use a download template (or
>> images, in lxd term). Simply "lxc-create -t download ..."
>>
>> But yeah, your temporary-solution of retry loop should also work for the
>> purpose of 'work around a failed package download'
>>
>> --
>> Fajar
>>
>>
>>
>>> On Thu, May 19, 2016 at 2:49 AM, Fajar A. Nugraha <list at fajar.net>
>>> wrote:
>>> > On Thu, May 19, 2016 at 1:50 AM, Dan Kegel <dank at kegel.com> wrote:
>>> >>
>>> >> The first time, it failed with
>>> >> W: Couldn't download package insserv (ver 1.14.0-5ubuntu3 arch amd64)
>>> >> I: Retrieving iproute2 4.3.0-1ubuntu3
>>> >> W: Couldn't download package iproute2 (ver 4.3.0-1ubuntu3 arch amd64)
>>> >> ...
>>> >> E: Couldn't download packages: iproute2 insserv
>>> >> Delete subvolume (no-commit): '/var/cache/lxc/xenial/partial-amd64'
>>> >> lxc-create: lxccontainer.c: create_run_template: 1290 container
>>> >> creation template for rbb-ubu1604-1-ubu1604 failed
>>> >>
>>> >
>>> >> Either way, should lxc-create be so willing to abort on package
>>> >> download failure, or should it sleep and retry a bit somehow?
>>> >
>>> >
>>> >
>>> > IMHO that behavior is correct. The ubuntu template uses debootstrap, so
>>> > whatever you're seing is debootstrap's response.
>>> >
>>> > I suggest you use the download template instead (-t download), which
>>> would
>>> > basically get a tar file with preconfigured packages. It would help if
>>> your
>>> > problem was on 'creating new connection phase' (which sometimes would
>>> happen
>>> > if say ... your ISP employs a transparent http cache) or 'partial
>>> > inconsistent mirror' (since you'd only be getting a few files), plus
>>> it'd be
>>> > much faster (no need for package install and configure phase after
>>> download)
>>> >
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20160520/331d9e40/attachment.html>


More information about the lxc-users mailing list