LXD 4.0.1 LTS has been released

Introduction

The LXD team is pleased to announce the release of LXD 4.0.1!

This is the first bugfix release for LXD 4.0 which is supported until June 2025.

Bugfixes and improvements

This release fixes a number of issues that were reported shortly following the original 4.0.0 release.

Some of the highlights include:

  • Tweaked and improved the resources API
    • NUMA node tracked on a per core basis
    • Support for CPUs using the die_id kernel attribute
    • DMI information now available in a system section
  • Added os and os_version to Environment data in /1.0
  • Added lxd cluster remove-raft-node disaster recovery function
  • Improved activateifneeded to consider VMs and scheduled snapshots
  • Improved sorting order in the command line tool to improve numbered entries
  • Implemented ceph rbd/fs disk devices can now be attached to virtual machines
  • Fixed some data migration issues for users of < 3.0 upgrading to 4.0 directly
  • Fixed file descriptor leakage in exec

The full list of commits is available below:

Detailed changelog
  • doc/instances: Fix escaping
  • lxc/network: Updates network detach checks to use bridged network property
  • lxd/network/network/utils: Updates network setting detection in IsInUse
  • lxd/instance/drivers/driver/qemu: Adds host_name info to RenderState when lxd-agent is running
  • lxd/networks: Fix clustered configs
  • shared/api: Move NUMANode to thread
  • lxd/resources: Set NUMANode on a per-thread basis
  • lxc/info: Update for NUMANode on thread
  • i18n: Update translation templates
  • api: resources_cpu_threads_numa
  • api: resources_cpu_core_die
  • lxd/resources: Parse and report die_id
  • lxd/storage/drivers/driver/lvm/volumes: Mount xfs snapshot with nouuid option
  • lxd/storage/drivers/driver/ceph/volumes: Adds mounting logging
  • lxd/instance/drivers/driver/lxc: Updates Render() to accept options arguments
  • lxd/instance/drivers/driver/qemu: Updates Render() to accept options arguments
  • lxd/instance/instance/interface: Updates Render() to accept options arguments
  • lxd/storage/drivers/utils: Zeros btrfs transaction log in regenerateFilesystemBTRFSUUID
  • lxd/storage/utils: Removes unused functions and constants
  • lxd/storage/utils: Adds RenderSnapshotUsage function
  • lxd/instance/snapshot: Adds storagePools.RenderSnapshotUsage to Render() in containerSnapshotsGet and snapshotGet
  • lxd/instance/drivers/driver/lxc: Use storagePools.RenderSnapshotUsage in RenderFull()
  • lxd/instance/drivers/driver/qemu: Use storagePools.RenderSnapshotUsage in RenderFull()
  • lxd/instance/instance/utils: Removes unused WriteBackupFile
  • lxd/storage/drivers/utils: Changes regenerateFilesystemUUID to use expanded arg definitions
  • lxd/storage/drivers/driver/ceph/utils: Changes generateUUID to not map device
  • lxd/storage/drivers/driver/ceph/volumes: d.generateUUID updated signature usage
  • lxd/storage/drivers/driver/ceph/volumes: Adds BTRFS UUID regeneration to MountVolumeSnapshot
  • lxd/storage/drivers/driver/zfs/volumes: Comment clarification
  • lxd/storage/drivers/volume: Adds support for setting custom mount path
  • lxd/storage/drivers/driver/btrfs/volumes: Create temporary snapshot in BackupVolume()
  • lxd/storage/drivers/driver/btrfs/volumes: Renames container vars to instance
  • lxd/storage/drivers/driver/btrfs/volumes: Consistent quoting of error message variables
  • lxd/instance/drivers: Removes storagePools.RenderSnapshotUsage from RenderFull()
  • lxd/storage/drivers/driver/zfs/volumes: Create temporary snapshot in BackupVolume()
  • lxd/storage/backend/lxd: Checks for existance of volume before deleting
  • lxd/instance: Switches to revert package for instanceCreateAsSnapshot
  • lxd/storage/backend/lxd: Comment tweak
  • lxd/storage/drivers/driver/ceph/volumes: Tweaks HasVolume detection
  • shared/subprocess/proc: Fixes race in process stopping
  • lxd/main_activateifneeded: s/container/instance/
  • lxd/main_activateifneeded: Retrieve all instances
  • lxd/main_activateifneeded: Check for scheduled instance snapshots
  • lxd/main_activateifneeded: Check for scheduled volume snapshots
  • test/suites/basic: Update activateifneeded tests
  • lxd/main_activateifneeded: Use defer statement to close db
  • lxd/storage/btrfs: Workaround permission issue
  • lxd/cluster: add RemoveRaftNode() to force removing a raft node
  • api: Add “DELETE /internal/cluster/raft/” endpoint
  • Increase timeout when calling dqlite.Client.Add() to join the cluster
  • lxd/storage/drivers/driver/zfs/volumes: Comment
  • lxd/storage/drivers/driver/lvm/volumes: Always return -1/ErrNotSupported for snapshot usage
  • lxd/storage/drivers/driver/dir/volumes: Always return -1/ErrNotSupported for snapshot usage
  • lxd/storage/drivers/driver/zfs/volumes: Always used ‘used’ property for ZFS snapshot usage
  • lxd/storage/drivers/driver/cephfs/volumes: Always return -1/ErrNotSupported for snapshot usage
  • lxd/storage/drivers/driver/btrfs/volumes: Return -1/ErrNotSupported when no quota available
  • lxd/instance: Fix typo in comment
  • lxc/action: Fix typo in help message
  • i18n: Update translation templates
  • lxd: Add “lxd cluster remove-raft-node” recovery command
  • doc: Add paragraph about “lxd cluster remove-raft-node”
  • test: Add test exercising “lxd cluster remove-raft-node”
  • lxd/storage/lvm: Always call vgchange on mount
  • lxd/patches: Fix snapshot migration
  • tests: Fix btrfs storage usage
  • lxd/storage/drivers/volume: Only chmod if needed in EnsureMountPath
  • lxd/storage/drivers/volume: Removes unnecessary variable
  • lxd/storage/drivers/driver/zfs/volumes: Ensure volumes created from copy have correct perms
  • lxd/storage/drivers: Call EnsureMountPath() in MountVolume()
  • lxd/storage/drivers: Call EnsureMountPath() in MountVolumeSnapshot()
  • lxd/storage/drivers/driver/btrfs/volumes: Adds revert to CreateVolume
  • lxd/storage/drivers/driver/btrfs/volumes: Comment in CreateVolumeFromCopy
  • lxd/storage/drivers/driver/lvm/utils: EnsureMountPath after copying thin volume
  • lxd/storage/drivers/driver/cephfs/volumes: typo
  • lxd/storage/drivers/driver/cephfs/volumes: Calls vol.EnsureMountPath after filling
  • lxd/storage/drivers/driver/ceph/volumes: Calls EnsureMountPath to fix perms after copying volume
  • lxd/storage/drivers/driver/lvm/volumes: Fixes temporary snapshot volume cleanup for VMs
  • lxd/storagr/drivers/driver/ceph/volumes: Adds support for snapshot usage reporting
  • lxd/storage/drivers/driver/lvm/volumes: Clarifies comments on LVM volume usage reporting
  • shared/osarch: Coding style
  • shared/osarch: Don’t fail on missing os-release
  • shared/api: Add OS information
  • lxd/api: Add OS information
  • api: Add api_os
  • lxc: Use natural string sorting
  • lxc: Group snapshot and parent
  • lxd/main: Move forkzfs mntns to cgo
  • doc/networks: Adds note about firewalld and DHCP/DNS
  • lxd/device/nic/routed: Improves validation of sysctl settings when using vlan option
  • lxd/device/nic/routed: Corrects misleading error message when setting sysctls
  • lxd/storage/drivers/generic/vfs: Log when creating snapshots
  • lxd/storage/drivers/driver/zfs/volumes: Fix migrating VM block volumes in MigrateVolume
  • lxd/storage/memorypipe: Adds context support for cancellation
  • lxd/storage/backend/lxd: memorypipe cancellation usage
  • lxd/device/nic/sriov: Updates networkGetVirtFuncInfo to use json output from ip tool
  • doc: Add missing os_api extension
  • lxd/storage/drivers/driver/dir/utils: Removes default project quota
  • forkexec: mark fd cloexec so the attaching process doesn’t inherit it
  • forkexec: close all inherited fds
  • forkexec: log unexpected fds
  • lxd/daemon: Ignore .zfs in volumes
  • lxd/network: Push MTU over DHCP
  • shared/api: Drop invalid Managed key in NetworksPost
  • lxd: Drop invalid use of Managed property
  • lxd/devices/disk: Prevent recursive & readonly
  • lxc/instance/drivers: Set new name before renaming backups
  • test: Extend backup rename
  • lxd/instance/drivers: Add revert steps when renaming instance
  • lxd/instance/drivers/driver/qemu: Allow up to 8 NIC devices
  • lxd/instance/drivers/driver/qemu/templates: Note that lxd_ disk device name prefix should not be changed
  • doc/instances: Clarify config conditions
  • doc/index: Clarify bind-mount in FAQ
  • lxd/instances: Better use userRequested on Update
  • lxd/device/nic/routed: Fix sysctl command suggestion when using vlans
  • lxd/device/nic/ipvlan: Improve validation of sysctl settings when vlan setting used
  • test/clustering: increase timing to detect offline node
  • shared/version/api: Add resources_system API extension
  • doc/api-extensions: Add resources_system
  • shared/api/resource: Add system resources
  • lxd/resources: Add new system resources
  • lxd/resources: Retrieve system information
  • shared/util: Never look into the snap
  • lxd/resources: serial/uuid may not be accessible
  • doc/instances: Fixes default ceph.cluster_name value
  • lxd/device/disk: Adds support to use ceph: prefix for disk source for VMs
  • firewalld & lxd : how to let Firewalld control the LXD’s iptables rules this is related to https://github.com/lxc/lxd/pull/7195 but this a bit more generic
  • Update networks.md
  • doc/networks: Fix typo
  • i18n: Update translations from weblate
  • Update networks.md
  • lxd/storage/ceph: Suppport alternate conf syntax
  • lxd/init: Try to bind LXD network address when running interactively
  • lxd/instance/drivers/driver/qemu/templates: Use static PCIe address prefix for 9p devices
  • lxd/instance/drivers/drivers/qemu: Adds support for 9p disk device PCIe indexes
  • lxd/device/nic/bridged: Dont load br_netfilter
  • doc/instances: Fix swapped description
  • index.md: add PATH env variable to sudo command example
  • shared/simplestreams: Fix VM image preference
  • lxd/devoce/device/utils/disk: Comment on diskCephfsOptions
  • lxd/device/disk: Adds cephfs support for VMs
  • lxd/device/proxy: Check for br_netfilter enabled and log warning if not
  • lxd/firewall/drivers/driver/xtables: Adds MASQUERADE hairpin proxy NAT rule
  • lxd/firewall/drivers/drivers/xtables: comments
  • lxd/device/proxy: Sets bridge port hairpin mode on when br_netfilter loaded
  • lxd/firewall/drivers/drivers/xtables: Renames toDest to connectDest
  • lxd/firewall/drivers/drivers/nftables: Renames toDest to connectDest
  • lxd/init: Improve error messages when failing to bind an address
  • lxd/firewall/drivers/drivers/nftables: Adds MASQUERADE hairpin proxy NAT rule
  • test/suites/container/devices/proxy: Updates tests for checking hairpin rule
  • lxd/instance/drivers/driver/qemu: Wait for onStop when restarting
  • lxd/instance/drivers/driver/qemu: Makes onStop unexported
  • lxd/instance/drivers/driver/qemu: Comment
  • lxd/instance/lxc: Don’t crash in setNetworkPriority
  • lxd/instances: Export type to templates
  • lxd-agent: Reboot after cloud-init seed
  • lxd/util: Tweak NetworkInterfaceAddress to only return global
  • lxd/net/util: Updates comment on NetworkInterfaceAddress behaviour change
  • shared/usbid: Use system database

Try it for yourself

This new LXD release is already available for you to try on our demo service.

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
1 Like

This is going to roll out to snap users almost immediately as we’ve been pushing almost daily updates as those fixes landed upstream, resulting in effectively no delta between the current snap and this 4.0.1 release.