lxc / incus

Powerful system container and virtual machine manager
https://linuxcontainers.org/incus
Apache License 2.0
2.43k stars 190 forks source link

Auto-update flag cleared on images in cluster #1008

Closed cquike closed 1 month ago

cquike commented 1 month ago

Required information

Issue description

According to the documentation on Auto Update (https://linuxcontainers.org/incus/docs/main/image-handling/#auto-update) the feature is enabled for the incus image copy command if the --auto-update option is given and an alias is set. However it seems that it does not have any effect: the images have the Auto update: disabled property and indeed are not updated every six hours. Just in case it makes a difference: this is a cluster setup with four members.

Steps to reproduce

  1. incus image copy --alias my_alias --auto-update --public images:almalinux/9/amd64 local:
  2. incus image info my_alias | grep Auto
  3. Check after 6 hours that the image has not been updated
stgraber commented 1 month ago
stgraber@dakara:~$ incus image copy --alias my_alias --auto-update --public images:almalinux/9/amd64 local:
Image copied successfully!                   
stgraber@dakara:~$ incus image info my_alias
Fingerprint: 832b6584dd73fdd50f54b76cafde3b21fb75526c15482f0c32928be4a655a09d
Size: 111.12MiB
Architecture: x86_64
Type: container
Public: yes
Timestamps:
    Created: 2024/07/15 20:00 EDT
    Uploaded: 2024/07/17 10:21 EDT
    Expires: 1969/12/31 19:00 EST
    Last used: never
Properties:
    type: squashfs
    variant: default
    architecture: amd64
    description: Almalinux 9 amd64 (20240716_23:08)
    os: Almalinux
    release: 9
    requirements.cdrom_agent: true
    serial: 20240716_23:08
Aliases:
    - my_alias
Cached: no
Auto update: enabled
Source:
    Server: https://images.linuxcontainers.org
    Protocol: simplestreams
    Alias: almalinux/9/amd64
Profiles:
    - default
stgraber commented 1 month ago

Looks like it may be a cluster issue, I just had it show disabled on a test cluster too.