Weekly status for the week of the 18th April to the 24th April.
Introduction
This past week we have been focusing on bug fixes for the up coming LXD 5.1 release.
In addition to that, @stgraber has released a video covering the many ways to expose network services running inside an instance onto an external network (which is a topic that comes up frequently on this forum):
https://www.youtube.com/watch?v=TmGvbXfwJEA
LXD
Improvements:
- Images in LXD can have a set of profiles applied to them. By default it’s just the
default
profile, but this can be changed throughlxc image edit
. Now when copying an image withlxc image copy
, the set of profiles can also be modified on the copy directly using an invocation like:lxc image copy images:ubuntu/22.04 local: --alias ubuntu --profile foo --profile bar
. - Improved the network zone name validation to prevent the use of
/
at the beginning of the zone name.
Bug fixes:
- Fixed cross-pool instance refresh when using ZFS (which was broken since the optimized refresh feature was introduced).
- Fixed an issue with
sriov
networks that were being marked asUnavailable
even though they were operational. - Ensure that path encoded URL segments are not decoded when being matched against the API routes map. This allows passing entity names that contain characters that are path encoded (like
/
) and ensures they are correctly decoded in the route handler. - Fixed an issue with VMs not starting on s390x due to the NVRAM file being incorrectly used on non-UEFI architectures.
- Fixed an issue we saw intermittently during the clustering handover tests where a cluster member would get the error
RAFT cluster is unavailable
. This was being caused by a slow responding member that would then use the entire 5s timeout budget allowed for getting the current leader member, which was preventing the other members from being checked for leadership status. We now use a per-member 1s timeout ensuring that all members will be checked. - Instance devices that were added to an instance at create time were being added in random order (rather than the defined ordering we use to start devices at instance start time). This was manifesting itself as confusing
volatile.<device>.name
settings being generated (such asvolatile.eth0.name=eth1
) when an instance had multiple NICs without explicitname
properties. We now add devices in the same order they will be started and remove devices in the reverse order. - When mounting a storage volume to perform a task (e.g copying its contents) if the task fails, still attempt to un-mount the volume rather than leaving it mounted.
- Now using correct server name during cluster member join from preseed config (rather than automatic default one).
- Don’t timeout a VM stateful stop operation after 30s as it can often take longer than this.
- Fix missing entities (indexes, triggers and views) in the
lxd sql <type> '.dump'
command, and don’t include theschema
tableINSERT
statements when in schema-only mode. - Fixed restoring LVM non-thin pool VM and block volume snapshots.
- Fixed VM vsock kernel module detection so that if the module cannot be loaded the max vsock ID wasn’t attempted to be used.
- Use parallel out-of-order writes mode during VM image unpack to block devices. This improves performance on several storage drivers and restores a performance regression on ceph since switching to the
qemu-img convert
mode fromqemu-img dd
. - Fix deadlock in the clustering subsystem caused when a remote leader request was being handled at the same time as the member was shutting down.
Distrobuilder
Improvements:
- Change the systemd generator to only override systemd unit features when
security.nesting=false
. This way if nesting is enabled (allowing namespaces to be created inside the container) then allow systemd units that normally would use hardening features that depend on being able to create namespaces to function.
Bug fixes:
- Drop support for Ubuntu Core images as they do not function correctly.
- Add template validation.
- Fix unmarshalling of filter type.
- Only use systemd
ReadWritePaths
if systemd version is at least 231.
YouTube videos
The LXD team is running a YouTube channel with live streams covering LXD releases and weekly videos on different aspects of LXD. You may want to give it a watch and/or subscribe for more content in the coming weeks.
https://www.youtube.com/lxd-videos
Contribute to LXD
Ever wanted to contribute to LXD but not sure where to start?
We’ve recently gone through some effort to properly tag issues suitable for new contributors on Github: Easy issues for new contributors
Upcoming events
- Nothing planned currently.
Ongoing projects
The list below is feature or refactoring work which will span several weeks/months and can’t be tied directly to a single Github issue or pull request.
- Stable release work for LXC, LXCFS and LXD
Upstream changes
The items listed below are highlights of the work which happened upstream over the past week and which will be included in the next release.
LXD
- lxd/storage/drivers/zfs: Fix optimized refresh in migration
- Add a --profile option to lxc image copy
- Network: Mark
sriov
network as available on successful start - LXD: Ensure that encoded URL segment variables are not considered for route matching
- VM: Only attempt to open NVRAM file on UEFI architectures
- Network: Improve network zone name validation
- Cluster: Separate, smaller timeout for client leader request
- Instance: Ensure that devices are added and removed in the correct order
- Storage: Attempt to unmount volume if even mount task fails
- Fix cluster join cert name issue
- Lower log level of “Detected poll(POLLNVAL) event” message
- lxc/utils: Fix bad error string
- lxd/instance/qemu: Don’t timeout during migration
- test: restore “set -x” at the end of respawn_lxd()
- Database: Package-based Tx functions and unified DB
- test: avoid unbound var if cleanup() is called early on
- Sql dump schema table
- Storage: Fix restoring non-thin LVM block volumes
- lxd/sys: Fix vsockID detection
- lxd/storage: Allow parallel writes in qemu-img
- Improve ceph.conf parser
- LXD: Removes TransactionCTX function and updates Transaction function to accept context
- Recursive rlock shutdown
- Replace 20.04/Focal Fossa by 22.04/Jammy Jellyfish
- Sql dump all entities
- Cosmetic fixes for test
LXC
- Nothing to report this week
LXCFS
- Nothing to report this week
Distrobuilder
- main: override systemd features only when security.nesting=false
- source: Return error correctly
- sources/ubuntu: Drop Ubuntu Core
- Add template validation
- shared/definition: Fix unmarshalling of DefinitionFilterType
- test: Add TestDefinitionFilterTypeUnmarshalYAML
- main: systemd’s ReadWritePaths came with version 231
Dqlite (RAFT library)
- Nothing to report this week
Dqlite (database)
Dqlite (Go bindings)
- Nothing to report this week
LXD Charm
- Nothing to report this week
Distribution work
This section is used to track the work done in downstream Linux distributions to ship the latest LXC, LXD and LXCFS as well as work to get various software to work properly inside containers.
Ubuntu
- Nothing to report this week
Snap
- lxd: Cherry-pick upstream bugfixes