roka
(ROKA Admin)
October 28, 2021, 3:59am
1
After the cluster upgrade to version 4.19 find an issue in lxc image copy with projects. Steps to replicate error:
# Create a test container
$ lxc create ubuntu:20.04 test1 --project test1
$ lxc stop test1 --project test1
$ lxc publish test1 --alias test-image-1 --project test1
$ lxc image copy test-image-1 local: --auto-update --project test1
Error: Not Found
$ lxc image info test-image-1 --project test1
Fingerprint: xxxxxxxxxxxxxx (removed for clarity)
Size: 1449.47MB
Architecture: x86_64
Type: container
Public: no
Timestamps:
Created: 2021/10/28 03:10 UTC
Uploaded: 2021/10/28 03:10 UTC
Expires: never
Last used: never
Properties:
description: Ubuntu 20.04 LTS server (20210825)
os: ubuntu
release: focal
architecture: x86_64
Aliases:
- test-image-1
Cached: no
Auto update: disabled
Profiles:
- default
This used to work until version 4.18 and stopped working as soon as LXD upgrade to 4.19.
Probably some changes done in the new updates for image handling.
tomp
(Thomas Parrott)
October 28, 2021, 12:09pm
2
Please can you show the output of lxc project show test1
?
roka
(ROKA Admin)
October 29, 2021, 1:28am
3
The output of command is:
config:
features.images: "true"
features.profiles: "false"
features.storage.volumes: "false"
description: ""
name: test1
used_by:
- /1.0/images/194281a78761e6c322b3d1a8bbeb418b6f43d1e0a2c19d807192b467d32f4739?project=test1
- /1.0/images/5fc94479f588171282beb094da96bb83eb51420d6cf13b223c737d1fda9169cd?project=test1
- /1.0/instances/test1?project=test1
tomp
(Thomas Parrott)
October 29, 2021, 2:36pm
4
I’m assuming you mean lxc launch
rather than lxc create
.
What did you expect to happen with this command?
lxc image copy test-image-1 local: --auto-update --project test1
Thanks
tomp
(Thomas Parrott)
October 29, 2021, 2:38pm
5
@stgraber do you know what this operation is supposed to do?
I’m confused why you would copy an already local image to local:?
stgraber
(Stéphane Graber)
October 29, 2021, 2:56pm
6
I suspect the goal here is to copy the image across projects which should be fine, the auto-update part I’m not sure would work though, in theory we could store the source project in the image source and refresh across project so long as the source image is public.
One thing that got fixed in 4.19 is copy from remote servers when the image is not in the default project, so that may have affected the behavior for this command somehow.
In general the expectation is that if lxc project list
shows you’re in the default
project and you do lxc image copy some-image local: --project blah --alias some-image
, this will look for an image called some-image
in the default
project and copy it to the blah
project, also as some-image
.
tomp
(Thomas Parrott)
October 29, 2021, 3:20pm
7
I get a different error when trying to copy an image by hash from default to another project:
lxc project ls
+-------------------+--------+----------+-----------------+----------+---------------------+---------+
| NAME | IMAGES | PROFILES | STORAGE VOLUMES | NETWORKS | DESCRIPTION | USED BY |
+-------------------+--------+----------+-----------------+----------+---------------------+---------+
| default (current) | YES | YES | YES | YES | Default LXD project | 4 |
+-------------------+--------+----------+-----------------+----------+---------------------+---------+
| test | YES | NO | NO | NO | | 3 |
+-------------------+--------+----------+-----------------+----------+---------------------+---------+
lxc image ls
+-------+--------------+--------+-------------------------------------+--------------+-----------------+----------+-------------------------------+
| ALIAS | FINGERPRINT | PUBLIC | DESCRIPTION | ARCHITECTURE | TYPE | SIZE | UPLOAD DATE |
+-------+--------------+--------+-------------------------------------+--------------+-----------------+----------+-------------------------------+
| | a33719937baa | no | Ubuntu focal amd64 (20211018_07:42) | x86_64 | CONTAINER | 103.43MB | Oct 26, 2021 at 12:53pm (UTC) |
+-------+--------------+--------+-------------------------------------+--------------+-----------------+----------+-------------------------------+
| | d91bf665b110 | no | Ubuntu focal amd64 (20211018_07:42) | x86_64 | VIRTUAL-MACHINE | 241.38MB | Oct 26, 2021 at 12:53pm (UTC) |
+-------+--------------+--------+-------------------------------------+--------------+-----------------+----------+-------------------------------+
lxc image copy a33719937baa local: --project test
Error: The source server isn't listening on the network
stgraber
(Stéphane Graber)
October 29, 2021, 4:16pm
8
Ah yeah, I don’t know if we have an API for a server-local copy of an image like that or if it’s indeed hitting the network and transfers it from itself (obviously not ideal).
roka
(ROKA Admin)
October 29, 2021, 11:01pm
9
Right I mean lxc launch.
The expectation is to change the image to auto-update. It worked fine in versions earlier than 4.19. It just updates the image flag of auto-update.
tomp
(Thomas Parrott)
November 8, 2021, 10:29am
10
Please could you open an issue over at https://github.com/lxc/lxd/issues so we can track this.
Please add on there the reproducer steps and what you expected it to do.
Thanks
tomp
(Thomas Parrott)
November 8, 2021, 10:32am
11
Also, does lxc image edit <image>
work for you, when changing the auto_update
property?
Maybe we need an lxc image set
command @stgraber
roka
(ROKA Admin)
November 12, 2021, 6:37am
12
tomp:
lxc project ls
+-------------------+--------+----------+-----------------+----------+---------------------+---------+
| NAME | IMAGES | PROFILES | STORAGE VOLUMES | NETWORKS | DESCRIPTION | USED BY |
+-------------------+--------+----------+-----------------+----------+---------------------+---------+
| default (current) | YES | YES | YES | YES | Default LXD project | 4 |
+-------------------+--------+----------+-----------------+----------+---------------------+---------+
| test | YES | NO | NO | NO | | 3 |
+-------------------+--------+----------+-----------------+----------+---------------------+---------+
lxc image ls
+-------+--------------+--------+-------------------------------------+--------------+-----------------+----------+-------------------------------+
| ALIAS | FINGERPRINT | PUBLIC | DESCRIPTION | ARCHITECTURE | TYPE | SIZE | UPLOAD DATE |
+-------+--------------+--------+-------------------------------------+--------------+-----------------+----------+-------------------------------+
| | a33719937baa | no | Ubuntu focal amd64 (20211018_07:42) | x86_64 | CONTAINER | 103.43MB | Oct 26, 2021 at 12:53pm (UTC) |
+-------+--------------+--------+-------------------------------------+--------------+-----------------+----------+-------------------------------+
| | d91bf665b110 | no | Ubuntu focal amd64 (20211018_07:42) | x86_64 | VIRTUAL-MACHINE | 241.38MB | Oct 26, 2021 at 12:53pm (UTC) |
+-------+--------------+--------+-------------------------------------+--------------+-----------------+----------+-------------------------------+
lxc image copy a33719937baa local: --project test
Error: The source server isn't listening on the network
Created the issue. at https://github.com/lxc/lxd/issues/9525
1 Like