Skip to content
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

Backports (stable-5.0) #13215

Merged
merged 119 commits into from
Mar 26, 2024
Merged

Backports (stable-5.0) #13215

merged 119 commits into from
Mar 26, 2024

Commits on Mar 22, 2024

  1. lxd/instance/drivers/qemu: do not check for size.state if shared st…

    …orage is enabled for an instance
    
    Signed-off-by: Gabriel Mougard <gabriel.mougard@canonical.com>
    gabrielmougard authored and tomponline committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    33fd909 View commit details
    Browse the repository at this point in the history
  2. github: ask bug reporters to provide the list of relevant snaps

    Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
    simondeziel authored and tomponline committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    e8d1841 View commit details
    Browse the repository at this point in the history
  3. lxd/storage/drivers/generic_vfs: Return if the right file was found

    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    28ce2eb View commit details
    Browse the repository at this point in the history
  4. Fix linter errors (revive: exported).

    Signed-off-by: Mark Laing <mark.laing@canonical.com>
    markylaing authored and tomponline committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    d5b1223 View commit details
    Browse the repository at this point in the history
  5. lxd/cluster: Fix lint error (revive: early-return).

    Signed-off-by: Mark Laing <mark.laing@canonical.com>
    markylaing authored and tomponline committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    f74f9ea View commit details
    Browse the repository at this point in the history
  6. lxd: Fix lint errors (revive: exported).

    Signed-off-by: Mark Laing <mark.laing@canonical.com>
    markylaing authored and tomponline committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    f63996b View commit details
    Browse the repository at this point in the history
  7. lxd: Ignore lint error (revive: defer).

    This is a false positive.
    
    Signed-off-by: Mark Laing <mark.laing@canonical.com>
    markylaing authored and tomponline committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    8344f24 View commit details
    Browse the repository at this point in the history
  8. lxd/storage/drivers: Add VolumeCopy struct

    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    5cea035 View commit details
    Browse the repository at this point in the history
  9. lxd/device: Fix lint error (revive: exported).

    Signed-off-by: Mark Laing <mark.laing@canonical.com>
    markylaing authored and tomponline committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    96f878d View commit details
    Browse the repository at this point in the history
  10. lxd/device: Fix lint errors (revive: useless-break).

    Signed-off-by: Mark Laing <mark.laing@canonical.com>
    markylaing authored and tomponline committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    650309c View commit details
    Browse the repository at this point in the history
  11. lxd/instance/drivers: Fix lint errors (revive: confusing-results).

    Signed-off-by: Mark Laing <mark.laing@canonical.com>
    markylaing authored and tomponline committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    840d5ba View commit details
    Browse the repository at this point in the history
  12. lxd/network: Fix lint errors (revive: exported).

    Signed-off-by: Mark Laing <mark.laing@canonical.com>
    markylaing authored and tomponline committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    ddc8acd View commit details
    Browse the repository at this point in the history
  13. lxd/network: Fix lint errors (revive: comment-spacings).

    Signed-off-by: Mark Laing <mark.laing@canonical.com>
    markylaing authored and tomponline committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    321805f View commit details
    Browse the repository at this point in the history
  14. lxd/project: Fix lint errors (revive: confusing-results).

    Signed-off-by: Mark Laing <mark.laing@canonical.com>
    markylaing authored and tomponline committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    2f00f7a View commit details
    Browse the repository at this point in the history
  15. lxd: Fix lint error (revive: unchecked-type-assertion).

    Signed-off-by: Mark Laing <mark.laing@canonical.com>
    markylaing authored and tomponline committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    ace7cdc View commit details
    Browse the repository at this point in the history
  16. lxd/storage/drivers/interface: Change function signatures

    This allows passing down VolumeCopy structs and Volume structs for snapshots into the storage driver.
    
    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    1b2673b View commit details
    Browse the repository at this point in the history
  17. lxd/storage/drivers/generic_vfs: Use updated snapshots slice

    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    f3f0e7f View commit details
    Browse the repository at this point in the history
  18. client: Remove WithUnsecure from cookie handler options.

    This must have been missed when we made improvements to OIDC
    security recently.
    
    Signed-off-by: Mark Laing <mark.laing@canonical.com>
    markylaing authored and tomponline committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    dc00ec5 View commit details
    Browse the repository at this point in the history
  19. lxd/storage/drivers/generic_vfs: Use VolumeCopy struct

    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    29bc668 View commit details
    Browse the repository at this point in the history
  20. lxd/storage/drivers/btrfs: Use updated driver interface

    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    c6e937e View commit details
    Browse the repository at this point in the history
  21. lxd/storage/drivers/ceph: Use updated driver interface

    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    c68cf79 View commit details
    Browse the repository at this point in the history
  22. lxd/storage/drivers/cephfs: Use updated driver interface

    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    775871d View commit details
    Browse the repository at this point in the history
  23. lxd/storage/drivers/dir: Use updated driver interface

    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    c61fae1 View commit details
    Browse the repository at this point in the history
  24. lxd/storage/drivers/lvm: Use updated driver interface

    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    41707d6 View commit details
    Browse the repository at this point in the history
  25. lxd/storage/drivers/zfs: Use updated driver interface

    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    f965f28 View commit details
    Browse the repository at this point in the history
  26. lxd/storage/drivers/common: Use updated driver interface

    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    6fcd4ca View commit details
    Browse the repository at this point in the history
  27. lxd/storage/drivers/mock: Use updated driver interface

    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    b07a7c6 View commit details
    Browse the repository at this point in the history
  28. github: build lxc and lxd-migrate binaries with trimpath

    Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
    simondeziel authored and tomponline committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    7d2d556 View commit details
    Browse the repository at this point in the history
  29. github: strip lxc and lxd-migrate native binaries

    Non-native binaries cannot be strip'ed:
    
    $ strip -s bin/lxc.* bin/lxd-migrate.*
    strip: Unable to recognise the format of the input file `bin/lxc.aarch64'
    strip: Unable to recognise the format of the input file `bin/lxd-migrate.aarch64'
    
    Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
    simondeziel authored and tomponline committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    3a4cb54 View commit details
    Browse the repository at this point in the history
  30. lxd/storage/backend_lxd: Update storage driver invocations

    Call the respective storage driver functions with VolumeCopy instead of Volume.
    This allows passing down snapshot related information into the storage driver.
    
    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    86be7d1 View commit details
    Browse the repository at this point in the history
  31. lxd/storage/backend_lxd: Don't validate custom storage volumes twice

    This was added in canonical#6369 but is redundant since the same check is
    also happening afterwards when creating the actual DB record
    
    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    a219cfb View commit details
    Browse the repository at this point in the history
  32. github: build lxc and lxd-migrate binaries with trimpath

    Also use ldflags to omit the debug symbol table, debug and DWARF info.
    
    Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
    simondeziel authored and tomponline committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    73218dc View commit details
    Browse the repository at this point in the history
  33. doc: build lxc with trimpath and without debug info

    Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
    simondeziel authored and tomponline committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    a0de3fc View commit details
    Browse the repository at this point in the history
  34. github: use regex matching to purge disabled snaps

    Exact match on the notes field being "disabled" didn't work for base snaps as
    they show like this:
    
    ```
    $ snap list --all core22
    Name    Version   Rev   Tracking       Publisher   Notes
    core22  20231123  1033  latest/stable  canonical✓  base,disabled
    core22  20240111  1122  latest/stable  canonical✓  base
    ```
    
    Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
    simondeziel authored and tomponline committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    21b77f0 View commit details
    Browse the repository at this point in the history
  35. lxd/instance/drivers/qemu: Handle SELinux for LXD agent

    Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
    (cherry picked from commit b2cd793ae4ce016ca7da128cc2d14544c041c801)
    Signed-off-by: Din Music <din.music@canonical.com>
    License: Apache-2.0
    stgraber authored and tomponline committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    645f907 View commit details
    Browse the repository at this point in the history
  36. lxd/storage/backend_lxd: Don't use storage name when creating source …

    …snapshots
    
    The final snapshotStorageName will contain the projects identifier twice if the storage name
    used to create the vol is used a second time.
    
    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    b8e7401 View commit details
    Browse the repository at this point in the history
  37. github: add labels when PRs target LTS branches

    Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
    simondeziel authored and tomponline committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    8abd194 View commit details
    Browse the repository at this point in the history

Commits on Mar 25, 2024

  1. lxd/storage/backend_lxd: Append the snapshots creation date

    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    d63edf2 View commit details
    Browse the repository at this point in the history
  2. lxd/migrate_storage_volumes: Send snapshot creation timestamp

    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    f80697a View commit details
    Browse the repository at this point in the history
  3. lxd-generate: Return helpful error instead of panicking.

    LXD generate cannot create update method for associative tables if
    the reference table has more than one "natural key" or if it doesn't
    have a field called 'Name' or 'Fingerprint'. In the former case it
    will fail silently (generating incorrect methods). In the latter case
    it will panic.
    
    This commit returns a helpful error message instead.
    
    Signed-off-by: Mark Laing <mark.laing@canonical.com>
    markylaing authored and tomponline committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    d73bbba View commit details
    Browse the repository at this point in the history

Commits on Mar 26, 2024

  1. lxd/storage/backend_lxd: Block volume's volatile.uuid from modification

    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    3a1d1a8 View commit details
    Browse the repository at this point in the history
  2. lxd/storage/backend_lxd: Use quotes consistently for error messages

    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    362991a View commit details
    Browse the repository at this point in the history
  3. lxd/storage/drivers/volume: Set the snapshots parent in NewVolumeCopy

    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    423b13e View commit details
    Browse the repository at this point in the history
  4. lxd/storage/drivers/generic_vfs: Handle volatile.uuid for volume imports

    Ignore if older volumes don't have the volatile.uuid field set.
    
    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    4deec4b View commit details
    Browse the repository at this point in the history
  5. lxd/storage/drivers/generic_vfs: Handle volatile.uuid for volume exports

    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    15695b2 View commit details
    Browse the repository at this point in the history
  6. lxd/storage/drivers/generic_vfs: Handle volatile.uuid for volume migr…

    …ation
    
    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    afffe42 View commit details
    Browse the repository at this point in the history
  7. test: Pass the storage pool name into the snapshots suite

    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    90dcd9f View commit details
    Browse the repository at this point in the history
  8. lxd/storage/drivers/zfs: Pass snapshots when copying

    This fixes a regression introduced with the storage interface changes.
    When copying a VMs root volume snapshots, copy the filesystem snapshots too.
    
    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    b02ae84 View commit details
    Browse the repository at this point in the history
  9. lxd/storage/drivers/ceph: Pass snapshots when copying

    This fixes a regression introduced with the storage interface changes.
    When copying a VMs root volume snapshots, copy the filesystem snapshots too.
    
    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    156b92b View commit details
    Browse the repository at this point in the history
  10. lxd/project: Don't panic on StorageVolumeParts

    Don't panic if the given volume name doesn't contain a project
    
    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    52aefc8 View commit details
    Browse the repository at this point in the history
  11. lxd/storage/drivers/generic_vfs: Use VolumeCopy for genericVFSCopyVolume

    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    8c6388d View commit details
    Browse the repository at this point in the history
  12. lxd/storage/drivers/btrfs: Pass the CopyVolume struct to genericVFSCo…

    …pyVolume
    
    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    e130288 View commit details
    Browse the repository at this point in the history
  13. lxd/storage/drivers/ceph: Pass the CopyVolume struct to genericVFSCop…

    …yVolume
    
    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    4d51a5e View commit details
    Browse the repository at this point in the history
  14. lxd/storage/drivers/dir: Pass the CopyVolume struct to genericVFSCopy…

    …Volume
    
    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    a84e512 View commit details
    Browse the repository at this point in the history
  15. lxd/storage/drivers/lvm: Pass the CopyVolume struct to genericVFSCopy…

    …Volume
    
    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    fb19fe5 View commit details
    Browse the repository at this point in the history
  16. lxd/storage/drivers/zfs: Pass the CopyVolume struct to genericVFSCopy…

    …Volume
    
    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    6564c65 View commit details
    Browse the repository at this point in the history
  17. lxd/storage/drivers/interface: Add HasVolumeSnapshots function

    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    c75e1c8 View commit details
    Browse the repository at this point in the history
  18. lxd/storage/drivers/common: Implement HasVolumeSnapshots

    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    1b8498c View commit details
    Browse the repository at this point in the history
  19. lxd/storage/drivers: Replace vol.SnapshotsMatch with driver.HasVolume…

    …Snapshots
    
    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    5ca8774 View commit details
    Browse the repository at this point in the history
  20. lxd/storage/drivers/volume: Remove SnapshotsMatch

    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    997ef29 View commit details
    Browse the repository at this point in the history
  21. github: don't abort on remount failures

    Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
    simondeziel authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    4d8e294 View commit details
    Browse the repository at this point in the history
  22. lxd/storage/pool_interface: Remove deleteMissing from CheckInstanceBa…

    …ckupFileSnapshots
    
    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    457b3ff View commit details
    Browse the repository at this point in the history
  23. lxd/api_internal: Remove deleteMissing from CheckInstanceBackupFileSn…

    …apshots
    
    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    f728362 View commit details
    Browse the repository at this point in the history
  24. lxd/storage/backend_mock: Remove deleteMissing from CheckInstanceBack…

    …upFileSnapshots
    
    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    985e97d View commit details
    Browse the repository at this point in the history
  25. lxd/storage/backend_lxd: Move the snapshot comparison logic into the …

    …storage driver
    
    By calling the drivers CheckVolumeSnapshots we can offload the actual snapshot comparison.
    This is required for drivers whose volume snapshot naming concept isn't known to the backend.
    
    Additionally the concept of deleting missing snapshots isn't used and can be removed.
    This also allows reusing the snapshot comparison mechanism.
    
    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    26400c2 View commit details
    Browse the repository at this point in the history
  26. lxd/storage/backend_lxd: Remove deleteMissing from CheckInstanceBacku…

    …pFileSnapshots
    
    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    d5b93fd View commit details
    Browse the repository at this point in the history
  27. incusd: Correctly update event location

    Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
    (cherry picked from commit 1112c2d11e50c046bfeffc052a4b45620fb20d1b)
    Signed-off-by: Max Asnaashari <max.asnaashari@canonical.com>
    License: Apache-2.0
    stgraber authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    09d30ce View commit details
    Browse the repository at this point in the history
  28. incusd/events: Upgrade to websocket as late as possible

    Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
    (cherry picked from commit e03daf03d5b53d0988df418da6aab6dfa08c3d46)
    Signed-off-by: Max Asnaashari <max.asnaashari@canonical.com>
    License: Apache-2.0
    stgraber authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    94b4747 View commit details
    Browse the repository at this point in the history
  29. internal/server/db: Remove function doDbScan

    This removes the `doDbScan` function in favor of `queryScan`.
    
    Signed-off-by: Thomas Hipp <thomashipp@gmail.com>
    (cherry picked from commit b2f214116cf82d1b8c7c067ba6307badca289af3)
    Signed-off-by: Max Asnaashari <max.asnaashari@canonical.com>
    License: Apache-2.0
    monstermunchkin authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    2668094 View commit details
    Browse the repository at this point in the history
  30. internal/server: Use Retry function

    This removes the now obsolete `Cluster.retry` function in favor of
    `query.Retry`. This function also gains a context argument.
    
    Signed-off-by: Thomas Hipp <thomashipp@gmail.com>
    (cherry picked from commit 6b5d14e2d723487f31ebad41a290ff48099692c9)
    Signed-off-by: Max Asnaashari <max.asnaashari@canonical.com>
    License: Apache-2.0
    monstermunchkin authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    631e906 View commit details
    Browse the repository at this point in the history
  31. internal/server/db: Unwrap dbQueryRowScan function

    This unwraps the `dbQueryRowScan` function. It no longer depends on a
    Cluster struct but instead takes a pointer to a ClusterTx struct. It
    also gains a context parameter.
    
    Signed-off-by: Thomas Hipp <thomashipp@gmail.com>
    (cherry picked from commit 7ed5f3a1aefab5e262cbe89b5740f32133d22227)
    Signed-off-by: Max Asnaashari <max.asnaashari@canonical.com>
    License: Apache-2.0
    monstermunchkin authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    15ae713 View commit details
    Browse the repository at this point in the history
  32. internal/server/db: Unwrap queryScan function

    This unwraps the `queryScan` function. It no longer depends on a Cluster
    struct but instead takes a pointer to a ClusterTx struct. It also gains
    a context parameter.
    
    Signed-off-by: Thomas Hipp <thomashipp@gmail.com>
    (cherry picked from commit bbcee43531a3e6302e04c0bf2ee725e67bdc7897)
    Signed-off-by: Max Asnaashari <max.asnaashari@canonical.com>
    License: Apache-2.0
    monstermunchkin authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    7cb0585 View commit details
    Browse the repository at this point in the history
  33. internal/server/db: Remove exec function

    This removes the `exec` function in favor of `tx.ExecContext`.
    
    Signed-off-by: Thomas Hipp <thomashipp@gmail.com>
    (cherry picked from commit 539eb221257e89c0b9f4ae44a6314752bb4241fb)
    Signed-off-by: Max Asnaashari <max.asnaashari@canonical.com>
    License: Apache-2.0
    monstermunchkin authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    e309583 View commit details
    Browse the repository at this point in the history
  34. lxd/dns: Serialize DNS queries

    As calculating a full DNS zone is quite costly,
    lets only process one at a time.
    
    Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
    (cherry picked from commit 94cd06812fe37be908ab3e49389a335ed457f88f)
    Signed-off-by: Max Asnaashari <max.asnaashari@canonical.com>
    License: Apache-2.0
    stgraber authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    2c4cd28 View commit details
    Browse the repository at this point in the history
  35. lxd/backups: Simplify missing backup errors

    Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
    (cherry picked from commit d86b5c974faa12b08d80312a39a52602464b75ba)
    Signed-off-by: Max Asnaashari <max.asnaashari@canonical.com>
    License: Apache-2.0
    stgraber authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    b1e67a0 View commit details
    Browse the repository at this point in the history
  36. tests: Update for current backup errors

    Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
    (cherry picked from commit b6aa86b5267990c61d7166fedc42ea58f8b45753)
    Signed-off-by: Max Asnaashari <max.asnaashari@canonical.com>
    License: Apache-2.0
    stgraber authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    44c764d View commit details
    Browse the repository at this point in the history
  37. lxd/cluster: Optimize ConnectIfInstanceIsRemote

    Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
    (cherry picked from commit de094b24bbde7731771b0f56dc2bdee138a0c565)
    Signed-off-by: Max Asnaashari <max.asnaashari@canonical.com>
    License: Apache-2.0
    stgraber authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    42735e8 View commit details
    Browse the repository at this point in the history
  38. lxd/backup/utils: Ensure the volume's config gets updated too

    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    cff8b66 View commit details
    Browse the repository at this point in the history
  39. lxd/storage/backend_lxd: Block volume's volatile.uuid from modification

    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    2891d38 View commit details
    Browse the repository at this point in the history
  40. lxd/storage/backend_lxd: Set volume's volatile.uuid for storage drive…

    …r calls
    
    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    5b141a1 View commit details
    Browse the repository at this point in the history
  41. lxd/storage/backend_lxd: Consistently use GetNewVolume for config gen…

    …eration
    
    When used to instantiate a new volume, it deep copies the given config for later usage.
    
    Modified to avoid volatile.uuid functionality which isn't being backported.
    
    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    7784e33 View commit details
    Browse the repository at this point in the history
  42. lxd/storage/drivers/volume: Deep copy the volume's config when instan…

    …tiating a snapshot
    
    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    1f3deaf View commit details
    Browse the repository at this point in the history
  43. lxd/resources/storage: Add GetDisksByID function

    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    f43a21a View commit details
    Browse the repository at this point in the history
  44. lxd/instance/qemu: No size.state checks at startup needed

    Signed-off-by: Gabriel Mougard <gabriel.mougard@canonical.com>
    gabrielmougard authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    7106e42 View commit details
    Browse the repository at this point in the history
  45. lxd/request: Add a generic methods for getting and setting context va…

    …lues.
    
    Signed-off-by: Mark Laing <mark.laing@canonical.com>
    markylaing authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    5f71a54 View commit details
    Browse the repository at this point in the history
  46. lxd/request: Adds an effective project name context key.

    Signed-off-by: Mark Laing <mark.laing@canonical.com>
    markylaing authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    04552b3 View commit details
    Browse the repository at this point in the history
  47. test/suites: Ensure restricted clients can list inherited resources.

    Signed-off-by: Mark Laing <mark.laing@canonical.com>
    markylaing authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    4d700c1 View commit details
    Browse the repository at this point in the history
  48. lxd/instance/drivers/qemu: Revert linter fix

    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    75704eb View commit details
    Browse the repository at this point in the history
  49. lxd/storage/backend_lxd: Don't instantiate a new volume if existent d…

    …uring migration
    
    When migrating a volume in between LXD cluster nodes, don't instatiate a new volume struct.
    This will assign a new UUID which isn't correct since the volume stays the same.
    
    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    6067ca1 View commit details
    Browse the repository at this point in the history
  50. lxd/storage/drivers/generic: Use VolumeCopy for genericVFSMigrateVolume

    This is already implemented for genericVFSCreateVolumeFromMigration and missing for the sending side.
    
    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    6803a8f View commit details
    Browse the repository at this point in the history
  51. lxd/storage/drivers/zfs: Pass VolumeCopy for genericVFSMigrateVolume

    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    f88ef44 View commit details
    Browse the repository at this point in the history
  52. lxd/storage/drivers/lvm: Pass VolumeCopy for genericVFSMigrateVolume

    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    c36eeed View commit details
    Browse the repository at this point in the history
  53. lxd/storage/drivers/dir: Pass VolumeCopy for genericVFSMigrateVolume

    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    da312fd View commit details
    Browse the repository at this point in the history
  54. lxd/storage/drivers/cephfs: Pass VolumeCopy for genericVFSMigrateVolume

    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    2a4f7ff View commit details
    Browse the repository at this point in the history
  55. lxd/storage/drivers/ceph: Pass VolumeCopy for genericVFSMigrateVolume

    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    75e9a65 View commit details
    Browse the repository at this point in the history
  56. lxd/storage/drivers/btrfs: Pass VolumeCopy for genericVFSMigrateVolume

    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    15141ea View commit details
    Browse the repository at this point in the history
  57. test/main: add log grouping (GHA)

    Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
    simondeziel authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    e4cb448 View commit details
    Browse the repository at this point in the history
  58. test/main: show dmesg on failure

    Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
    simondeziel authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    f3423d1 View commit details
    Browse the repository at this point in the history
  59. github: capture dmesg if setting up microceph fails

    Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
    simondeziel authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    1c6e998 View commit details
    Browse the repository at this point in the history
  60. lxd/db/networks: Differentiate not found errors from other errors in …

    …GetNetworkWithInterface
    
    Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
    tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    ecaf768 View commit details
    Browse the repository at this point in the history
  61. lxd/networks/utils: Don't log not found errors in networkAutoAttach

    Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
    tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    2ea5a29 View commit details
    Browse the repository at this point in the history
  62. lxd/devices: Log the device concerning the error from networkAutoAttach

    Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
    tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    5a26893 View commit details
    Browse the repository at this point in the history
  63. lxd/patches: Remove VM block vols from patchStorageUnsetInvalidBlockS…

    …ettings
    
    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    d86aa62 View commit details
    Browse the repository at this point in the history
  64. lxd/storage/drivers/ceph: Don't unset the block.* settings for VMs

    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    5266042 View commit details
    Browse the repository at this point in the history
  65. lxd/storage/drivers/lvm: Don't unset the block.* settings for VMs

    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    c0635d0 View commit details
    Browse the repository at this point in the history
  66. lxd/api/internal: Use correct quoting for error in internalImportFrom…

    …Backup
    
    Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
    tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    cd6d58d View commit details
    Browse the repository at this point in the history
  67. lxd/db/cluster/devices: Use correct string quoting of device type for…

    … error in NewDeviceType
    
    Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
    tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    e12f8fa View commit details
    Browse the repository at this point in the history
  68. lxd/instances/post: Improve error in createFromBackup

    Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
    tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    7b512a2 View commit details
    Browse the repository at this point in the history
  69. lxd/storage/backend/lxd: Update backup.yaml after instance and volume…

    … DB records have been generated in CreateInstanceFromBackup
    
    This ensures any device modifications are applied to the on-disk backup.yaml file.
    
    Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
    tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    f5bd4f1 View commit details
    Browse the repository at this point in the history
  70. lxd: Move ExpandInstanceConfig and ExpandInstanceDevices from `lx…

    …d/db` to `lxd/instance/instancetype` package
    
    Signed-off-by: Gabriel Mougard <gabriel.mougard@canonical.com>
    Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
    gabrielmougard authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    989393a View commit details
    Browse the repository at this point in the history
  71. lxd: Removes duplicate implementation of ExpandInstanceConfig and Exp…

    …andInstanceDevices
    
    And switches to one in instance/instancetype package.
    
    Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
    tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    5f889b5 View commit details
    Browse the repository at this point in the history
  72. lxd/endpoints/network/util/test: Remove incus references in Test_netw…

    …orkServerErrorLogWriter_shouldDiscard
    
    Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
    tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    2e9c9ac View commit details
    Browse the repository at this point in the history
  73. lxd/storage/backend_lxd: Pass right volume name when refreshing custo…

    …m volumes
    
    This fixes a situation in which the list of target volume snaphots gets appended with the right snapshot
    but wrong parent volume (source instead of target volume).
    
    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    491112d View commit details
    Browse the repository at this point in the history
  74. client/lxd/instances: Adds API extension check for device override on…

    … import
    
    Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
    tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    050f86b View commit details
    Browse the repository at this point in the history
  75. github: build lxd-benchmark binaries and upload as artifacts

    Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
    simondeziel authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    dd485e9 View commit details
    Browse the repository at this point in the history
  76. github: exit on error in microceph setup step

    Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
    simondeziel authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    88d9924 View commit details
    Browse the repository at this point in the history
  77. test/main: don't wrap tests logs in log groups

    Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
    simondeziel authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    b9518eb View commit details
    Browse the repository at this point in the history
  78. lxc: Remove unnecessary client import alias.

    Signed-off-by: Mark Laing <mark.laing@canonical.com>
    markylaing authored and tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    6eed569 View commit details
    Browse the repository at this point in the history
  79. client: Add Devices field to InstanceBackupArgs

    To keep in sync with main branch.
    
    Also adds devices support to CreateInstanceFromBackup.
    
    Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
    tomponline committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    6be15fc View commit details
    Browse the repository at this point in the history