lxc create using debian template fails on ppc64el

Bug #1624028 reported by Breno Leitão
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)
Fix Released
Undecided
Taco Screen team

Bug Description

If I try to create a lxc container using the debian template, I get the following error on ppc64el arch:

➜ ~ sudo lxc-create -n debian01 -t debian
debootstrap is /usr/sbin/debootstrap
Checking cache download in /var/cache/lxc/debian/rootfs-jessie-ppc64le ...
gpg: WARNING: unsafe ownership on configuration file `/home/ubuntu/.gnupg/gpg.conf'
gpg: key 2B90D010: "Debian Archive Automatic Signing Key (8/jessie) <email address hidden>" not changed
gpg: Total number processed: 1
gpg: unchanged: 1
Downloading debian minimal ...
I: Retrieving InRelease
I: Failed to retrieve InRelease
I: Retrieving Release
I: Retrieving Release.gpg
I: Checking Release signature
I: Valid Release signature (key id 126C0D24BD8A2942CC7DF8AC7638D0442B90D010)
E: Invalid Release file, no entry for main/binary-ppc64le/Packages
Failed to download the rootfs, aborting.
Failed to download 'debian base'
failed to install debian
lxc-create: lxccontainer.c: create_run_template: 1290 container creation template for debian01 failed
lxc-create: tools/lxc_create.c: main: 318 Error creating container debian01

Revision history for this message
Thierry FAUCK (thierry-j) wrote :

As following command works
$ sudo lxc-create -n debian01 -t ubuntu
Checking cache download in /var/cache/lxc/yakkety/rootfs-ppc64el ...
Installing packages in template: apt-transport-https,ssh,vim,language-pack-en
Downloading ubuntu yakkety minimal ...
I: Retrieving InRelease
I: Checking Release signature
I: Valid Release signature (key id 790BC7277767219C42C86F933B4FE6ACC0B21F32)
I: Retrieving Packages
I: Validating Packages
I: Retrieving Packages
I: Validating Packages
I: Resolving dependencies of required packages...
I: Resolving dependencies of base packages...

Revision history for this message
Thierry FAUCK (thierry-j) wrote :

I understand the debian image is not working properly (or doesn't exist).
Using sudo lxc-create -n debian01 -t download we get the list of valid distro/release/arch available, and specifying:
     Distribution: debian
     Release: sid
     Architecture: ppc64el
works on debian and on ubuntu !.

Downloading the image index
Downloading the rootfs
Downloading the metadata
The image cache is now ready
Unpacking the rootfs

---
You just created a Debian container (release=sid, arch=ppc64el, variant=default)

To enable sshd, run: apt-get install openssh-server

For security reason, container images ship without user accounts
and without a root password.

Use lxc-attach or chroot directly into the rootfs to set a root password
or create user accounts.

Revision history for this message
Thierry FAUCK (thierry-j) wrote :

So my understanding is that '-t debian' parameter doesn't use the proper information like the DIST (it does mention jessie)
$ sudo lxc-create -n debian03 -t debian
debootstrap is /usr/sbin/debootstrap
Checking cache download in /var/cache/lxc/debian/rootfs-jessie-ppc64le ...
gpg: key 2B90D010: "Debian Archive Automatic Signing Key (8/jessie) <email address hidden>" not changed

... even though manually, it works also on jessie
 $ sudo lxc-create -n debian03 -t download
Setting up the GPG keyring
Downloading the image index

Distribution: debian
Release: jessie
Architecture: ppc64el

Downloading the image index
Downloading the rootfs

Revision history for this message
Thierry FAUCK (thierry-j) wrote :

The message E: Invalid Release file, no entry for main/binary-ppc64le/Packages is explanatory as it expect arch being ppc64el !!!!

Fixed command:
sudo lxc-create -n debian04 -t debian -- -a ppc64el

For sid, you can do:
sudo lxc-create -n debian04 -t debian -- -a ppc64el -r sid

Revision history for this message
Thierry FAUCK (thierry-j) wrote :

$ diff -urN /usr/share/lxc/templates/lxc-debian /tmp/debian.template
--- /usr/share/lxc/templates/lxc-debian 2016-09-16 12:02:34.047133580 +0200
+++ /tmp/debian.template 2016-09-16 12:02:26.122949227 +0200
@@ -550,6 +550,8 @@
     arch="amd64"
 elif [ "$arch" = "armv7l" ]; then
     arch="armhf"
+elif [ "$arch" = "ppc64le" ]; then
+ arch="ppc64el"
 fi
 hostarch=$arch
 mainonly=1

Changed in lxc (Ubuntu):
assignee: nobody → Taco Screen team (taco-screen-team)
Revision history for this message
Christian Brauner (cbrauner) wrote :
Changed in lxc (Ubuntu):
status: New → Fix Committed
Changed in lxc (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.