-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: incus_image resource installs wrong architecture image if configuration runs remotely #92
Comments
@stgraber If you use As an alternative, I would suggest making the resource "incus_project" "test" {
name = "test"
}
resource "incus_image" "alpine" {
source_remote = "images"
source_image = "alpine/edge"
project = incus_project.test.name
architecture = "aarch64"
} |
Currently
|
I think it's more of a problem with how Incus provides the images. Because when I show the remote image details on an ARM machine for $ incus image show images:ubuntu/24.04
auto_update: false
properties:
architecture: amd64
description: Ubuntu noble amd64 (20240708_07:42)
os: Ubuntu
release: noble
requirements.cgroup: v2
serial: "20240708_07:42"
type: squashfs
variant: default
public: true
expires_at: 1970-01-01T00:00:00Z
profiles: [] The problem now is that we first search for the name of the image and this returns the default image "amd64": $ incus image list images: ubuntu/24.04
+-----------------------------------+--------------+--------+-------------------------------------+--------------+-----------------+------------+-----------------------+
| ALIAS | FINGERPRINT | PUBLIC | DESCRIPTION | ARCHITECTURE | TYPE | SIZE | UPLOAD DATE |
+-----------------------------------+--------------+--------+-------------------------------------+--------------+-----------------+------------+-----------------------+
| ubuntu/noble (7 more) | 32e401d4f9e8 | yes | Ubuntu noble amd64 (20240708_07:42) | x86_64 | CONTAINER | 122.83MiB | 2024/07/08 02:00 CEST |
+-----------------------------------+--------------+--------+-------------------------------------+--------------+-----------------+------------+-----------------------+
| ubuntu/noble (7 more) | 79a8e3e12118 | yes | Ubuntu noble amd64 (20240708_07:42) | x86_64 | VIRTUAL-MACHINE | 273.61MiB | 2024/07/08 02:00 CEST |
+-----------------------------------+--------------+--------+-------------------------------------+--------------+-----------------+------------+-----------------------+
| ubuntu/noble/arm64 (3 more) | 7c1a84a5fd15 | yes | Ubuntu noble arm64 (20240708_07:42) | aarch64 | CONTAINER | 118.25MiB | 2024/07/08 02:00 CEST |
+-----------------------------------+--------------+--------+-------------------------------------+--------------+-----------------+------------+-----------------------+
| ubuntu/noble/arm64 (3 more) | dabb29401709 | yes | Ubuntu noble arm64 (20240708_07:42) | aarch64 | VIRTUAL-MACHINE | 281.04MiB | 2024/07/08 02:00 CEST |
+-----------------------------------+--------------+--------+-------------------------------------+--------------+-----------------+------------+-----------------------+
| ubuntu/noble/armhf (3 more) | 841fd54510e0 | yes | Ubuntu noble armhf (20240708_07:42) | armv7l | CONTAINER | 115.74MiB | 2024/07/08 02:00 CEST |
+-----------------------------------+--------------+--------+-------------------------------------+--------------+-----------------+------------+-----------------------+
| ubuntu/noble/cloud (3 more) | 07ed7a30f9e3 | yes | Ubuntu noble amd64 (20240708_07:42) | x86_64 | VIRTUAL-MACHINE | 308.01MiB | 2024/07/08 02:00 CEST |
+-----------------------------------+--------------+--------+-------------------------------------+--------------+-----------------+------------+-----------------------+
| ubuntu/noble/cloud (3 more) | 393983c7d83a | yes | Ubuntu noble amd64 (20240708_07:42) | x86_64 | CONTAINER | 149.52MiB | 2024/07/08 02:00 CEST |
+-----------------------------------+--------------+--------+-------------------------------------+--------------+-----------------+------------+-----------------------+
| ubuntu/noble/cloud/arm64 (1 more) | 79dd9bf9a844 | yes | Ubuntu noble arm64 (20240708_07:42) | aarch64 | VIRTUAL-MACHINE | 314.86MiB | 2024/07/08 02:00 CEST |
+-----------------------------------+--------------+--------+-------------------------------------+--------------+-----------------+------------+-----------------------+
| ubuntu/noble/cloud/arm64 (1 more) | 1677dba8fcb2 | yes | Ubuntu noble arm64 (20240708_07:42) | aarch64 | CONTAINER | 143.94MiB | 2024/07/08 02:00 CEST |
+-----------------------------------+--------------+--------+-------------------------------------+--------------+-----------------+------------+-----------------------+
| ubuntu/noble/cloud/armhf (1 more) | 280c5932feb3 | yes | Ubuntu noble armhf (20240708_09:02) | armv7l | CONTAINER | 141.43MiB | 2024/07/08 02:00 CEST |
+-----------------------------------+--------------+--------+-------------------------------------+--------------+-----------------+------------+-----------------------+
| ubuntu/noble/desktop (3 more) | c2393e444f1a | yes | Ubuntu noble amd64 (20240708_07:42) | x86_64 | VIRTUAL-MACHINE | 1093.38MiB | 2024/07/08 02:00 CEST |
+-----------------------------------+--------------+--------+-------------------------------------+--------------+-----------------+------------+--- So if you want to use the ❯ incus image list images: alpine/edge
+----------------------------+--------------+--------+------------------------------------+--------------+-----------------+-----------+-----------------------+
| ALIAS | FINGERPRINT | PUBLIC | DESCRIPTION | ARCHITECTURE | TYPE | SIZE | UPLOAD DATE |
+----------------------------+--------------+--------+------------------------------------+--------------+-----------------+-----------+-----------------------+
| alpine/edge (3 more) | b8a53b8120a7 | yes | Alpine edge amd64 (20240708_13:00) | x86_64 | VIRTUAL-MACHINE | 121.63MiB | 2024/07/08 02:00 CEST |
+----------------------------+--------------+--------+------------------------------------+--------------+-----------------+-----------+-----------------------+
| alpine/edge (3 more) | c8d01b4f7c23 | yes | Alpine edge amd64 (20240708_13:00) | x86_64 | CONTAINER | 3.08MiB | 2024/07/08 02:00 CEST |
+----------------------------+--------------+--------+------------------------------------+--------------+-----------------+-----------+-----------------------+
| alpine/edge/arm64 (1 more) | 2c9a2be5ba67 | yes | Alpine edge arm64 (20240708_13:00) | aarch64 | CONTAINER | 3.36MiB | 2024/07/08 02:00 CEST |
+----------------------------+--------------+--------+------------------------------------+--------------+-----------------+-----------+-----------------------+
| alpine/edge/arm64 (1 more) | c00bf1d2bc00 | yes | Alpine edge arm64 (20240708_13:00) | aarch64 | VIRTUAL-MACHINE | 115.49MiB | 2024/07/08 02:00 CEST |
+----------------------------+--------------+--------+------------------------------------+--------------+-----------------+-----------+-----------------------+
| alpine/edge/armhf (1 more) | a1f376339386 | yes | Alpine edge armhf (20240708_13:04) | armv7l | CONTAINER | 2.72MiB | 2024/07/08 02:00 CEST |
+----------------------------+--------------+--------+------------------------------------+--------------+-----------------+-----------+-----------------------+
| alpine/edge/cloud (1 more) | 1b9543377a89 | yes | Alpine edge amd64 (20240708_13:00) | x86_64 | CONTAINER | 20.65MiB | 2024/07/08 02:00 CEST |
+----------------------------+--------------+--------+------------------------------------+--------------+-----------------+-----------+-----------------------+
| alpine/edge/cloud (1 more) | 4591b5e99e40 | yes | Alpine edge amd64 (20240708_13:00) | x86_64 | VIRTUAL-MACHINE | 145.31MiB | 2024/07/08 02:00 CEST |
+----------------------------+--------------+--------+------------------------------------+--------------+-----------------+-----------+-----------------------+
| alpine/edge/cloud/arm64 | 5f6fd7dcc479 | yes | Alpine edge arm64 (20240708_13:00) | aarch64 | VIRTUAL-MACHINE | 139.44MiB | 2024/07/08 02:00 CEST |
+----------------------------+--------------+--------+------------------------------------+--------------+-----------------+-----------+-----------------------+
| alpine/edge/cloud/arm64 | d8d9ef0d74e3 | yes | Alpine edge arm64 (20240708_13:00) | aarch64 | CONTAINER | 20.48MiB | 2024/07/08 02:00 CEST |
+----------------------------+--------------+--------+------------------------------------+--------------+-----------------+-----------+-----------------------+
| alpine/edge/cloud/armhf | b61947f5a2fd | yes | Alpine edge armhf (20240708_13:06) | armv7l | CONTAINER | 19.40MiB | 2024/07/08 02:00 CEST |
+----------------------------+--------------+--------+------------------------------------+--------------+-----------------+-----------+-----------------------+ resource "incus_image" "alpine" {
source_remote = "images"
source_image = "alpine/edge/arm64"
} @stgraber I'm not sure if this is really needs a fix, but rather an addition to the documentation for |
I think we should be able to make
If we really wanted to be fancy, when |
Issue
I use
incus
cluster on top of several Raspberry PI 4 SBCs. I'm trying to build containers deployment usingopen-tofu
withterraform-provider-incus' provider running it on
x84_64platform PC. I found that
incus_imageresource installs
x86_64architecture image instead of
aarch64if
open-tofu/
terraformruns on
x84_64platform. Running
open-tofu/
terraformin the
aarch64' platformincus_image
resource installsaarch64
platform image.Steps to reproduce
terraform
oropen-tofu
to host(s) which architecture(s) is(are) different from theincus
cluster architecture.incus
cluster and hostsRepeat steps 1-3 using host with compatible architecture with
incus
cluster.Result:
terraform-provider-incus
uses local host architecture instead of cluster architecture to download and install image.The text was updated successfully, but these errors were encountered: