Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 662082 - app-emulation/lxc-2.1.1: unable to create gentoo container
Summary: app-emulation/lxc-2.1.1: unable to create gentoo container
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Virgil Dupras (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-25 10:01 UTC by Alarig Le Lay
Modified: 2018-08-05 10:05 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alarig Le Lay 2018-07-25 10:01:21 UTC
Hi,

The creation of a new LXC container is now falling because stage3 archives are no longer in bzip2 format but xz:

samis ~ # lxc-create -t gentoo -n build-grifon -f /etc/lxc/guest.conf
### set_default_arch: default arch/variant autodetect...
 => Got: arch=amd64 variant=amd64
Attempting to obtain an exclusive lock (timeout: 60 sec) named "cache-amd64-amd64"...
 => done.
 => Executing "do_all"
###### cache_setup(): doing cache preparation
### cache_precheck(): doing some pre-start checks ...
### cache_stage3(): stage3 cache deployment...
Determining path to latest Gentoo amd64 (amd64) stage3 archive...
 => downloading and processing http://distfiles.gentoo.org/releases/amd64/autobuilds/latest-stage3-amd64.txt
 => Got: 20180724T214502Z/stage3-amd64-20180724T214502Z.tar.xz
Downloading/untarring the actual stage3 tarball...
--2018-07-25 11:27:20--  http://distfiles.gentoo.org/releases/amd64/autobuilds/20180724T214502Z/stage3-amd64-20180724T214502Z.tar.xz
Résolution de distfiles.gentoo.org… 2a00:8a60:e012:a00::21, 2600:3402:200:227::2, 2600:3404:200:237::2, ...
Connexion à distfiles.gentoo.org|2a00:8a60:e012:a00::21|:80… connecté.
requête HTTP transmise, en attente de la réponse… 200 OK
Taille : 198189064 (189M) [application/x-xz]
Sauvegarde en : « STDOUT »

-                                                 0%[                                                                                                        ]       0  --.-KB/s               
bzip2: (stdin) is not a bzip2 file.
tar: Child died with signal 13
tar: Error is not recoverable: exiting now
-                                                 0%[                                                                                                        ]  20,87K  --.-KB/s    ds 0,02s


Impossible d’écrire dans « - » (Relais brisé (pipe)).

[the last exit code leading to this death was: 2 ]
Error: unable to fetch or untar
lxc-create: build-grifon: lxccontainer.c: create_run_template: 1473 container creation template for build-grifon failed
lxc-create: build-grifon: tools/lxc_create.c: main: 329 Error creating container build-grifon


I had to change the tar command options to make it work (and by the way add the options given at https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Stage#Unpacking_the_stage_tarball):

samis ~ # diff /usr/share/lxc/templates/lxc-gentoo /usr/share/lxc/templates/lxc-gentoo.bak
170c170
<             | tar -xJpf - --xattrs-include='*.*' --numeric-owner -C "${partialfs}" \
---
>             | tar -xjpf - --numeric-owner -C "${partialfs}" \

Regards,
-- 
alarig
Comment 1 Virgil Dupras (RETIRED) gentoo-dev 2018-08-04 20:03:45 UTC
This appears to have been fixed upstream already: https://github.com/lxc/lxc-templates/blob/master/templates/lxc-gentoo.in#L171

The best thing to do would be to upgrade to LXC 3.x.
Comment 2 Alarig Le Lay 2018-08-05 10:05:21 UTC
Indeed, it’s fixed in 3.x.
We were still in 2.x when I reported the bug ;)

Thanks,
-- 
Alarig Le Lay