The implemented architecture fallback mechanism is not transparent to the user

Bug #1969774 reported by Heinrich Schuchardt
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
lxd (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

On my SiFive Unmatched I have lxd 5.0.0-b0287c1 22933.

$ lxc launch images:ubuntu/22.04 ubuntu-container
Creating ubuntu-container
Error: Failed instance creation: Failed creating instance record: Requested architecture isn't supported by this host

$ snapcraft --use-lxd
Launching a container.
Build environment is in unknown state, cleaning first.
An error occurred with the instance when trying to launch with 'LXD': Failed creating instance record: Requested architecture isn't supported by this host.
Ensure that 'LXD' is setup correctly and try again.

Revision history for this message
Heinrich Schuchardt (xypron) wrote :
Revision history for this message
Heinrich Schuchardt (xypron) wrote :

lxd git-0c77815 22946 (latest/edge) is also broken.

Revision history for this message
Stéphane Graber (stgraber) wrote :

This is normal behavior when no image can be found for the local architecture.

images: doesn't have any riscv64 images.
ubuntu: only has 21.10
ubuntu-daily: has 22.04

Changed in lxd (Ubuntu):
status: New → Invalid
Revision history for this message
Heinrich Schuchardt (xypron) wrote (last edit ):

It is not the download of the image that is failing:

$ lxc launch images:ubuntu/21.10 ubuntu-container
Creating ubuntu-container
Error: Failed instance creation: Failed creating instance record: Requested architecture isn't supported by this host

You get a different error if the image does not exist:
Error: Failed instance creation: Failed getting remote image info: Failed getting image: The requested image couldn't be found

Changed in lxd (Ubuntu):
status: Invalid → New
Revision history for this message
Stéphane Graber (stgraber) wrote :

`images:` never had any riscv64 image. When that happens, the image selector downloads the closest image available which in this case is an amd64 image.

Changed in lxd (Ubuntu):
status: New → Invalid
Revision history for this message
Heinrich Schuchardt (xypron) wrote (last edit ):

When an architecture is specified the expected error is thrown:

lxc launch images:ubuntu/21.10/riscv64 ubuntu-container
Creating ubuntu-container
Error: Failed instance creation: Failed getting remote image info: Failed getting image: The requested image couldn't be found

But the following still needs to be addressed.

The implemented architecture fallback mechanism is not transparent to the user.
* lxc should notify the user.
* A fallback should only occur if the foreign architecture is supported.

summary: - riscv64: Failed creating instance record: Requested architecture isn't
- supported by this host
+ The implemented architecture fallback mechanism is not transparent to
+ the user
Changed in lxd (Ubuntu):
status: Invalid → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in lxd (Ubuntu):
status: New → Confirmed
Revision history for this message
Isaac True (itrue) wrote :

+1 @xypron - it fallbacks to x86_64 and downloads the image if the riscv64 image is not found:

ubuntu@itrue-riscv64:~$ sudo lxc launch ubuntu:20.04 focal
Creating focal
Error: Failed instance creation: Failed creating instance record: Requested architecture isn't supported by this host
ubuntu@itrue-riscv64:~$ sudo lxc image list
+-------+--------------+--------+---------------------------------------------+--------------+-----------+----------+-----------------------------+
| ALIAS | FINGERPRINT | PUBLIC | DESCRIPTION | ARCHITECTURE | TYPE | SIZE | UPLOAD DATE |
+-------+--------------+--------+---------------------------------------------+--------------+-----------+----------+-----------------------------+
| | 4ca869945db4 | no | ubuntu 20.04 LTS amd64 (release) (20221018) | x86_64 | CONTAINER | 399.15MB | Nov 8, 2022 at 2:07pm (UTC) |
+-------+--------------+--------+---------------------------------------------+--------------+-----------+----------+-----------------------------+

Running "launch" first downloads the x86_64 image, then reports that it's not compatible.

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.