You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you copy a remote image to a local LXD server and a cached image already exists for that fingerprint, its Auto update property is correctly set to disabled, but its Cached property isn't set to false.
Download fresh image to local server as alias foo:
lxc image copy images:alpine/3.19 local: --alias foo
lxc image info foo
Fingerprint: e0a6de8ce6a290330969969c77c75f5f78fad63c9eb56cc281f76dddea2b866e
Size: 2.93MiB
Architecture: x86_64
Type: container
Public: no
Timestamps:
Created: 2024/04/08 00:00 UTC
Uploaded: 2024/04/08 07:20 UTC
Expires: never
Last used: never
Properties:
release: 3.19
requirements.secure_boot: false
serial: 20240408_0017
type: squashfs
variant: default
architecture: amd64
description: alpine amd64 (20240408_0017)
os: alpine
Aliases:
- foo
Cached: no
Auto update: disabled
Source:
Server: https://images.lxd.canonical.com
Protocol: simplestreams
Alias: alpine/3.19
Profiles:
- default
Note:
Aliases:
- foo
Cached: no
Auto update: disabled
Now lets delete the image and see what happens when its downloaded implicitly as part of an instance create:
lxc image delete e0a6de8ce6a290330969969c77c75f5f78fad63c9eb56cc281f76dddea2b866e
lxc init images:alpine/3.19 c1
lxc image info e0a6de8ce6a290330969969c77c75f5f78fad63c9eb56cc281f76dddea2b866e
Fingerprint: e0a6de8ce6a290330969969c77c75f5f78fad63c9eb56cc281f76dddea2b866e
Size: 2.93MiB
Architecture: x86_64
Type: container
Public: no
Timestamps:
Created: 2024/04/08 00:00 UTC
Uploaded: 2024/04/08 07:22 UTC
Expires: never
Last used: 2024/04/08 07:22 UTC
Properties:
os: alpine
release: 3.19
requirements.secure_boot: false
serial: 20240408_0017
type: squashfs
variant: default
architecture: amd64
description: alpine amd64 (20240408_0017)
Aliases:
Cached: yes
Auto update: enabled
Source:
Server: https://images.lxd.canonical.com
Protocol: simplestreams
Alias: alpine/3.19
Profiles:
- default
Note:
Aliases:
Cached: yes
Auto update: enabled
Now lets copy the remote image explicitly to the local server with an alias like we did before (without deleting the cached image first):
lxc image copy images:alpine/3.19 local: --alias foo
lxc image info e0a6de8ce6a290330969969c77c75f5f78fad63c9eb56cc281f76dddea2b866e
Fingerprint: e0a6de8ce6a290330969969c77c75f5f78fad63c9eb56cc281f76dddea2b866e
Size: 2.93MiB
Architecture: x86_64
Type: container
Public: no
Timestamps:
Created: 2024/04/08 00:00 UTC
Uploaded: 2024/04/08 07:22 UTC
Expires: never
Last used: 2024/04/08 07:22 UTC
Properties:
type: squashfs
variant: default
architecture: amd64
description: alpine amd64 (20240408_0017)
os: alpine
release: 3.19
requirements.secure_boot: false
serial: 20240408_0017
Aliases:
- foo
Cached: yes
Auto update: disabled
Source:
Server: https://images.lxd.canonical.com
Protocol: simplestreams
Alias: alpine/3.19
Profiles:
- default
Note:
Aliases:
- foo
Cached: yes
Auto update: disabled
So the Aliases and Auto updated properties have been set to the same values as when we copied the image explicitly the first time, but the Cached property is still set to yes which means it will be a candidate for auto removal.
We should ensure that if an image is explicitly copied to a local alias and that the fingerprint already exists as a cached image that it has Cached set to No so that it mirrors the behaviour that occurs when no pre-existing cached image exists.
The text was updated successfully, but these errors were encountered:
If you copy a remote image to a local LXD server and a cached image already exists for that fingerprint, its
Auto update
property is correctly set todisabled
, but itsCached
property isn't set tofalse
.Download fresh image to local server as alias
foo
:Note:
Now lets delete the image and see what happens when its downloaded implicitly as part of an instance create:
Note:
Now lets copy the remote image explicitly to the local server with an alias like we did before (without deleting the cached image first):
Note:
So the
Aliases
andAuto updated
properties have been set to the same values as when we copied the image explicitly the first time, but theCached
property is still set toyes
which means it will be a candidate for auto removal.We should ensure that if an image is explicitly copied to a local alias and that the fingerprint already exists as a cached image that it has
Cached
set toNo
so that it mirrors the behaviour that occurs when no pre-existing cached image exists.The text was updated successfully, but these errors were encountered: