Introduction
The LXD team would like to announce the release of LXD 5.21.1 LTS!
This is the first bugfix release for LXD 5.21 which is supported until June 2029.
Thank you to everyone who contributed to this release!
Bug fixes and improvements
Restricted metrics client certificate security regression fix
This release fixes a security regression introduced in LXD 5.21.0 that incorrectly converted existing restricted metrics client certificates to unrestricted metrics identities.
This allowed a client using a metrics certificate to access read-only metric information about all instances in a system when previously the client certificate may have been configured to only allowed access to metric information about instances in specific projects.
The fix will re-classify the converted unrestricted metrics identities to restricted identities, which means in some cases genuinely unrestricted metrics identities will need to be manually set back to unrestricted.
This can be done using the lxc config trust edit <fingerprint>
command.
The 5.21.0 release was never pushed to any stable snap channels.
For those updating from pre-LXD 5.21.0 the previous database update has been amended to avoid incorrectly converting restricted metrics certificates to unrestricted ones.
New image server remote for non-Ubuntu images
There is now a new image server available (images.lxd.canonical.com
) that provides non-Ubuntu images. This remote is now bundled in the lxc
command by default under the remote name images
.
To see a list of available images run:
lxc image list images:
List all storage volumes API and CLI support
A new API endpoint /1.0/storage_volumes
and API extension storage_volumes_all
was added to provide support for listing all storage volumes in a single API call. Support for this new functionality has been added to the lxc storage volume list
command too such that specifying the pool name is now an optional argument and by default it will list all volumes in the project from all storage pools.
Supporting modifying permissions of existing files with lxc file push
A new API extension instances_files_modify_permissions
has been added that adds support for detecting if the user has specified the --uid
, --gid
or --mode
flags when using lxc file push
, and if overwriting an existing file the fileās permissions and ownership are updates to those requested by the user.
Updated storage volume volatile.uuid
database patch
The previous DB patch in LXD 5.21.0 that was supposed to add a volatile.uuid
setting to all storage volume database records was not reliably doing so for remote storage volumes in cluster setups. A new patch has been added to address this issue.
Replaced UI X-Xss-Protection
header for Content-Security-Policy
The X-Xss-Protection
header is deprecated so this has now been replaced with a new Content-Security-Policy
header when LXD serves the LXD UI.
Updated LXC and LXCFS versions
The LXD snap now comes with the LXC and LXCFS 6.0.0 LTS releases.
Complete changelog
Here is a complete list of all changes in this release:
Full commit list
- test/suites/basic: check version number format (X.Y.Z for LTSes, X.Y otherwise)
- lxd/storage/s3/miniod: Specify a port for minio --console-address
- lxc: Add context to socket access errors
- doc/devices/nic: add missing spaces
- doc/devices/unix-*: add configuration examples
- doc/explanation: Add authorization explanation page.
- doc: Add instructions for OIDC clients post āaccess_managementā extension.
- doc: Update authentication page for authorization.
- doc: Add links to authorization page.
- doc: Add IAM related words to wordlist.
- lxd/auth: Remove no-op methods from authorizer interface.
- lxd/instance/drivers: Remove authorizer calls to no-op methods.
- lxd/storage: Remove authorizer calls to no-op methods.
- lxd: Remove authorizer calls to no-op methods.
- doc/devices: add CLI examples for more device types
- doc: except commands from the spelling check
- lxc: Correctly parse remote when listing permissions.
- doc/devices/proxy: add CLI examples for proxy device
- doc/devices/gpu: add configuration examples for gpu devices
- lxd/patches: Add patchStorageSetVolumeUUIDV2
- lxd/patches: Deactivate patchStorageSetVolumeUUID
- lxd/storage/backend_lxd: Ensure new images have a volatile.UUID
- lxd: Pre-check permissions when performing bulk state update.
- scripts: Add bash completions for
lxc auth
- lxd: Improves efficiency of operation cancel with permission checker.
- lxd: Update
X-Xss-Protection
(deprecated) forContent-Security-Policy
- lxd: add explanations on the security headers provided for the UI responses.
- lxd/storage/drivers/btrfs: Add createVolumeFromCopy for copy and refresh
- lxd/storage/drivers/btrfs: Use createVolumeFromCopy when copying a volume
- lxd/storage/drivers/btrfs: Use createVolumeFromCopy when refreshing a volume
- shared/api: Implement xerrors.Unwrap for StatusError.
- lxd/auth: Wrap errors in api.StatusErrorf.
- lxd/response: Wrap errors in api.StatusErrorf.
- lxd: Wrap errors in api.StatusErrorf.
- lxc: Wrap errors in api.StatusErrorf.
- lxd/auth: Return appropriate HTTP error codes when getting request details.
- lxd/request: Add a
CtxTrusted
context key. - lxd/auth: Get authentication status from request.
- lxd/auth: Handle untrusted requests in authorizer.
- lxd: Add
trusted
value to context. - lxd: Remove checkTrustedClient method.
- lxd: Update allowAuthenticated access handler.
- lxd: Remove call to
checkTrustedClient
. - lxd: Handle certificate creation from untrusted users.
- lxd: Remove
Authenticate
call from operation wait handler. - lxd: Remove
isTrustedClient
call from image export handler. - lxd: Remove
isTrustedClient
call from image alias get handler. - lxd: Remove
isTrustedClient
call from image get handler. - lxd: Remove
isTrustedClient
call from images get handler. - lxd: Remove
isTrustedClient
call from images post handler. - lxd/project: Update cluster target restriction tests.
- build(deps): bump github.com/mdlayher/ndp from 1.0.1 to 1.1.0
- lxc/file: Get owner mode only if
--gid
or--uid
is unset - lxd/device/nic: fix default IP for routed NIC (
ipv4.host_address
) - lxdmetadata: update metadata
- github: Add stable-5.21 branch to dependabot config
- lxd: Add security response headers to documentation
- lxd: enable server side gzip compression on all API routes
- scripts/bash/lxd-client: use column to select the image alias
- scripts/bash/lxd-client: fix
lxc storage <TAB>
- scripts/bash/lxd-client: add missing keys to
lxc storage <TAB>
- scripts/bash/lxd-client: show pool names on
lxc storage info <TAB>
- scripts/bash/lxd-client: Use long option names
- lxd/instance/drivers/common: Clone the device config
- scripts/bash/lxd-client: add missing args to
lxc network
completion - lxc: handle
GetImage
logic insidedereferenceAlias
- i18n: update .pot files
- doc/reference: reorder pages and update the landing page
- doc/explanation: reorder pages and update the landing page
- lxd/storage/drivers/btrfs: Clarify fallback in case UUID discovery times out
- lxd/storage/drivers/btrfs: Move config modifications into FillConfig
- doc/howto: reorder pages and update the landing pages
- doc: update the start page and add links to sections
- doc: fix exceptions for Markdown linter
- lxd/patches: Add selectedPatchClusterMember for patch coordination
- lxd/patches: Add patchStorageRenameCustomISOBlockVolumesV2
- lxd/patches: Supersede patchStorageRenameCustomISOBlockVolumes
- lxd/patches: Add patchStorageUnsetInvalidBlockSettingsV2
- lxd/patches: Supersede patchStorageUnsetInvalidBlockSettings
- instance/drivers/driver_lxc: do not set āsoftā limit when hard limit is set
- incusd/instance/qemu: Fix handling of > 64 limits.cpu
- doc: workaround for undefined references
- lxd/api: Revert gzip compression on API
- build(deps): bump github.com/openfga/openfga from 1.5.0 to 1.5.1
- lxd/storage/drivers/generic: Return cleanup hooks from genericVFSCopyVolume
- lxd/storage/drivers/ceph: Use the revert pattern for local refreshes
- lxd/storage/drivers/dir: Use cleanup hooks from genericVFSCopyVolume
- lxd/storage/drivers/lvm: Use cleanup hooks from genericVFSCopyVolume
- lxd/storage/drivers/powerflex: Use cleanup hooks from genericVFSCopyVolume
- lxd/storage/drivers/zfs: Use cleanup hooks from genericVFSCopyVolume
- lxd/storage/drivers/generic: Return cleanup hooks from genericVFSCreateVolumeFromMigration
- lxd/storage/drivers/ceph: Use the revert pattern for migrations
- lxd/storage/drivers/btrfs: Use cleanup hooks from genericVFSCreateVolumeFromMigration
- lxd/storage/drivers/dir: Use cleanup hooks from genericVFSCreateVolumeFromMigration
- lxd/storage/drivers/lvm: Use cleanup hooks from genericVFSCreateVolumeFromMigration
- lxd/storage/drivers/powerflex: Use cleanup hooks from genericVFSCreateVolumeFromMigration
- lxd/storage/drivers/zfs: Use cleanup hooks from genericVFSCreateVolumeFromMigration
- lxd/storage/backend_lxd.go: remove unused parameters
- lxd/api_internal.go: remove impossible conditions
- lxd: Update instance types URL
- lxd/shared/util: create function for applying device overrides
- lxc/utils: create function for getting profile devices
- lxd/api_internal: eliminate duplicated code
- lxc/init: eliminate duplicated code
- lxc/copy: apply profile expansion on device override
- test: add test for device overriding on copy
- i18n: update translations
- grafana: connect nulls and use instant type where appropriate
- grafana: add legend to stats
- shared: Move
ParseIPRange
toshared/
- lxd/network: Use
shared.ParseIPRanges
- doc: remove nesting for the tutorial
- doc/server settings: change display of /etc/sysctl.conf settings
- api: Add storage_volumes_all extension
- shared/api: Add Pool field to api.StorageVolume
- lxd: Remove uncecessary parameter from URL function
- shared/api: Update call to URL function
- lxd: Remove uncecessary parameter from storagePoolVolumeUsedByGet
- lxd: Update storagePoolVolumeUsedByGet usage
- lxd/db: Update get volume query
- lxd: Add endpoints to list all volumes
- client: Add functions to get all volumes
- lxc/storage_volume.go: Update lxc storage volume list
- test: Add tests for listing volumes from all pools
- i18n: Update translations
- doc: Run make update-api
- doc/config options: update the config option index
- doc/config options: link to config options where possible
- instances: fix typo in config option
- doc/api extensions: link to config options
- shared: Ignore invalid uid/gid values and truncate mode to perm bits
- lxd: Update uid/gid/mode API docs
- doc: Run
make update-api
- gitignore: Ignore all pycache under doc/
- shared/ioprogress: Support simple readers
- lxd/storage/drivers/btrfs: Report migration progress from receiver
- lxd/storage/drivers/btrfs: Use daemons shutdown context
- test/lint/client-imports: rename godeps.list file
- test/lint/client-imports: export LC_ALL for predictable sorting
- test/lint: add lxd-agent-imports
- gitignore: Ignore all
.bak
- shared/api: Fix typo
- lxd/api_metrics: Check individual project permissions if set
- lxd/metrics: Use label aware permission check when filtering samples
- lxd/api_metrics: Filter metrics by looping only once
- lxd/auth/driver_tls: Allow viewing metrics for unrestricted metrics certs
- lxd/db/cluster: Add identityTypeCertificateMetricsRestricted and identityTypeCertificateMetricsUnrestricted
- lxd/db/cluster/identities: Handle unrestricted metrics certificates
- shared/api/auth: Replace IdentityTypeCertificateMetrics with a restricted and unrestricted type
- lxd/daemon: Use IdentityTypeCertificateMetricsRestricted and IdentityTypeCertificateMetricsUnrestricted
- lxd/db/cluster/certificates: Use IdentityTypeCertificateMetricsRestricted and IdentityTypeCertificateMetricsUnrestricted
- lxd/identity: Use IdentityTypeCertificateMetricsRestricted and IdentityTypeCertificateMetricsUnrestricted
- lxd/auth/openfga: Extend can_view_metrics entitlement to projects
- lxd/db/cluster/update: Fix updateFromV69
- test/suites/auth: Update test to account for can_view_metrics
- test/suites/metrics: Add restricted and unrestricted certificate tests
- shared: Return new structure from
ParseLXDFileHeaders
- lxd: Refactor calls to
shared.ParseLXDFileHeaders
- client: Refactor calls to
shared.ParseLXDFileHeaders
- api: Add
instances_files_modify_permissions
extension - shared: Parse
X-LXD-modify-perm
header - lxd: Allow setting permissions for existing files via API
- client: Send
X-LXD-modify-perm
on file POST - lxc/file: Set ModifyExisting when --mode, --uid, or --gid are passed
- doc: Run
make update-api
- gomod: Update dependencies
- incusd/instance/qemu: Set auto-converge on all migrations
- incusd/device/disk: Remove bad comment
- lxc/config/default: Add images remote for images.lxd.canonical.com
- Revert ādriver_lxc: Include running state in metricsā
- lxd/instance/drivers/lxc: default some metrics to
0
instead of-1
- lxd/metrics: Replace
lxd_containers
andlxd_vms
metrics bylxd_instances
- lxd/api_metrics: Make
lxd_instances
and internal metrics visible - tests: Fix metrics tests
Downloads
The release tarballs can be found on our download page.
Binary builds are also available for:
- Linux: snap install lxd
- MacOS: brew install lxc
- Windows: choco install lxc
Notes on upgrading when using ZFS on Ubuntu 18.04
If you are using LXD on Ubuntu 18.04 with ZFS and LXD does not start after upgrading, you may find this error in the /var/snap/lxd/common/lxd/logs/lxd.log
log file:
Error: Required tool āzpoolā is missing
This is due to LXD 5.21.x requiring ZFS 2.1 or later in the kernel.
Because of database schema changes in LXD 5.21.x you will find that if you revert to a previously installed version LXD will still no longer start.
To resolve this we have started including ZFS 0.8 support in the 5.21/stable
channel.
In order to add ZFS 0.8 support to an Ubuntu 18.04 system please upgrade the kernel to the Ubuntu Hardware Enablement kernel (HWE).
sudo apt-get install --install-recommends linux-generic-hwe-18.04
Please note that the latest/stable
channel still requires ZFS 2.1 or higher and so is no longer compatible with Ubuntu 18.04 when using ZFS, even when using the HWE kernel.
At this time it is possible to switch from latest/stable
to 5.21/stable
channels as the DB schemas are the same. So if you are running seeking to switch to an LTS series, it is currently possible to do that using:
sudo snap refresh lxd --channel=5.21/stable
Going forward the default track for new LXD installs is 5.21
which means that new users in the future wonāt inadvertently install from the rolling latest/stable
channel where the minimum system requirements do change over time.
Documentation: Choose your release