LXD 2.0.12 has been released

Introduction

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

This is the twelfth bugfix release for LXD 2.0 which is supported until June 2021.

Bugfixes and improvements

As our oldest LTS, LXD 2.0 has not seen a release since 2.0.11 in October 2017.

This LTS branch is very much in security-only mode and this release only includes some older bugfixes that missed 2.0.11 and then fixes to keep this branch of LXD buildable.

As part of this, some of our dependencies no longer build on old Go versions, LXD 2.0.11 was confirmed to build and run with Go 1.13, 1.14 and 1.15 and was confirmed not to be buildable on 1.11 at least.

With no critical fix or security issues in there, distributions requiring an older Go version should stay on 2.0.11.

And lastly, we urge any user who’s still using LXD 2.0 LTS to upgrade to something more modern as this branch only gets critical security updates and will reach its end of life in less than a year. Upgrades from 2.0 LTS directly to 4.0 LTS are supported.

The full list of commits is available below:

Detailed changelog
  • Fix file transfers to/from stdin/stdout in snap
  • If running as root in the snap, use /proc/1/root
  • Fix failure due to bind-mount through /proc
  • all: move to bakery.v2
  • Update the “lxc list” help to match stable-2.0
  • tests: Don’t use godeps for import check
  • Make current gofmt happy
  • Make current gofmt happy (stable-2.0 specific)
  • liblxc: detect version at runtime
  • Update for newer ZFS releases
  • zfs: try pool import
  • Revert most of the macaroon support in client
  • client: Add GetOperationUUIDs and GetOperations
  • lxd/logs: Don’t allow removing lxc.conf or lxc.log
  • shared/api: Add API extension label to AuthMethods
  • Drop logging setup in Daemon.Init()
  • Add helper to redirect the global logger to the testing logger
  • Add a shared.KeyPairAndCA function to get coventionally named certs
  • Add new debug sub-package with support for memory profiling
  • Add lxd/task sub-package for running functions periodically
  • Fix output of --print-goroutines-every
  • Add cpu profiling and goroutines printing to the debug sub-package
  • Move execPath global variable to sys.OS.ExecPath
  • Move global aaAvailable global variable to sys.OS
  • Move global aaStacking global variable to sys.OS
  • Move global runningInUserns global variable to sys.OS
  • Move global aaAdmin global variable to sys.OS
  • Move global aaConfined global variable to sys.OS
  • Move global cgBlkioController global variable to sys.OS
  • Move global cgCpuController global variable to sys.OS
  • Move remaining global cgXXX global variables to sys.OS
  • Move directory initialization to sys.OS.
  • Drop unnecessary checks on MockMode
  • Vendor a copy of log15 in shared/log15
  • Revert “Temporary workaround for log15 API breakage”
  • Switch to the built-in log15
  • Add a endpoints.Endpoints class for managing HTTP endpoints
  • Wire endpoints.Endpoints into Daemon
  • lxd/daemon: Fix unsetting https address
  • Move optional Daemon config values to DaemonConfig
  • Don’t skip Daemon.Ready() in tests, it can be run unconditionally
  • Wire debug utilities into main_daemon.go
  • Track the lifecycle of the goroutine performing log expiration
  • Streamline Daemon init and shutdownn
  • Control all goroutines spawned in Daemon.Ready() using task.Task
  • Don’t use global path variables in sys.OS
  • Switch to the built-in log15
  • Return the initial schema version in Schema.Ensure()
  • Add a Schema.Fresh() method to set a “bootstrap” SQL statement
  • Complete moving schema creation logic to schema.Schema
  • Rename Daemon.db to Daemon.nodeDB
  • Convert a few call sites of sql.DB.Begin to db.DB.Begin
  • Rename State.DB to State.NodeDB
  • Convert remaining call sites of the low-level db.Begin function
  • Rename db.QueryScan to db.queryScan, making it unexported
  • Remove direct use of the low-level db.Exec() func outside of lxd/db/
  • Rename db.Exec to db.exec, making it unexported
  • Move certificate db APIs to the db.Node facade
  • Move container db APIs to the db.Node facade
  • zfs: Fix slowdown because of mountpoint check
  • tests: Deal with missing ttyS0/ttyS1 (on s390x)
  • Move profile db APIs to the db.Node facade
  • Move patches db APIs to the db.Node facade
  • Move image db APIs to the db.Node facade
  • Move devices db APIs to the db.Node facade
  • Drop all references to Daemon.nodeDB
  • Use instance-level cache dir variable instead of the environment one
  • Use instance-level log dir variable instead of the environment one
  • Use instance-level var dir variable instead of the environment one
  • Add initial Go-level daemon integration-like test
  • Add lxd/config sub-package implementing structured config maps
  • Rename db_test.go to db_internal_test.go, since it’s white box
  • Add db.NewTestNode helper for database-related unit tests
  • Add a db.NodeTx structure to abstract away low-level transactions
  • Add low-level query helpers for changing config tables
  • Add db APIs for fetching and changing node-local config values
  • Add node.Config high-level API for modifying node-level config
  • Cleanup test state at every test, to improve isolation.
  • Move node-level schema updates to their own db/local/ sub-package.
  • Add Schema.ExerciseUpdate() for testing a individual update
  • Fix spurious tx.Exec argument in lxd/db/schema/query.go
  • Extract the APIExtensions list from api10Get
  • Add error messages to lxdTestSuite setup and teardown
  • Add query.Count utility
  • Switch to the built-in log15
  • Setup mock storage driver
  • Extract initialization of the REST and /dev/lxd http Server
  • Add support for gracefully aborting schema.Ensure
  • Drop the containerLXC.OS() convenience
  • Rename container.StateObject() to container.DaemonObject()
  • Drop the storageShared.OS() convenience
  • Move util.AppArmorCanStack to a private appArmorCanStack in lxd/sys
  • Drop trailing slash from cgroup paths definitions
  • Drop pointless comments about function calls being no-op
  • Rename variable “code” to “kind” for consistency
  • Drop logging message when retrying to listen to a network port
  • Fixed typos in the task sub-package
  • Fix docstring in shared.KeyPairAndCA
  • Drop unused import in lxd/db/certificates.go
  • Rename Cert to Certificate in API names of lxd/db/certificates.go
  • Fix import formatting in lxd/db/patches.go
  • Split version declarations in shared/version into several files
  • shared/logging: Add freebsd build conditional to log_posix.go
  • Switch to the built-in log15
  • Gracefully cancel tasks on daemon shutdown
  • Fixed wording in comment
  • Tweak schedule function for pruning images
  • Expose task.Task instead of returning an integer handle
  • client: Name all the return values in interfaces
  • Fix some typos
  • Fix some typos
  • tests: Check for typos
  • tests: Add test for unused variables
  • api: add console structs
  • client: add client API ConsoleContainer()
  • container_lxc: add lxcParseRawLXC()
  • client: add client API GetContainerConsoleLog()
  • client: add client API DeleteContainerConsoleLog()
  • container_exec: check for OpenPty() error
  • client: add “ConsoleDisconnect” argument
  • shared/idmap: Fix handling of hardlinks
  • lxd/containers: Skip sockets in tarballs
  • lxd/dameon: Add LXD_EXEC_PATH to override execPath
  • Fix a number of unchecked variables
  • lxd/containers: Only init the config if needed
  • lxc/file: Log downloads/uploads
  • lxd/init: Re-add missing ZFS pool name question
  • lxd/init: Fix bad handling of dir backend
  • Added documentation about shell env to lxc exec
  • lxd-benchmark: Change the default count of containers from 100 to 1
  • shared/util: add EscapePathFstab()
  • devlxd: Properly lock the internal struct
  • migrate.proto: silence protobuf compiler warning
  • migrate: older than lxc 2.0.4 will fail
  • Makefile: Better detect sqlite3.h
  • client: URL escape all user input
  • devlxd: Cleanup in preparation for events
  • lxd/certificates: Add missing name value
  • Makefile: Don’t hardcode gcc
  • container_lxc: actually return an error
  • i18n: Update translation templates
  • travis: Bump Go versions
  • shared/utils: deal with symlinks
  • travis: Limit to just Go 1.9
  • Update LVM documentation
  • zfs: fix argument order of zfs get commands.
  • network: fix insertNetworkDevice()
  • container_lxc: escape paths fstab style
  • migrate: prepare for pre-copy migration
  • Fixed typo in comment about SubCommands in lxd/main.go KishanRPatel katiewasnothere dinopanda jialin-li kianaalcala
  • lxd/containers: Fix race condition in shutdown
  • lxd/containers: Log auto-start errors
  • lxc/exec: Fix typo
  • lxd/containers: Fix tc egress rules
  • lxd/events: Cleanup event listener setup
  • Update issue template
  • doc: Add /images//secret to API list
  • lxd/containers: No slahses in snapshot names
  • lxd/init: Strip leading and trailing spaces
  • change “your first time using LXD” to something less confusing
  • doc/README: Update source build instructions
  • doc/containers: Document CPU limits
  • i18n: Update translation template
  • scripts/vagrant: The LXD PPA is gone
  • allow arbitrary users to read idmaps
  • drop \n from IdmapSet’s ToLxcString
  • lxd/containers: Fix container shutdown on exit
  • lxd/main: Don’t mention --preseed on 2.0
  • i18n: Fix bad japanese translation
  • fix parsing for container name tab-completion
  • lxc/file: Fix edit in a snap environment
  • shared/idmap:DefaultIdmapSet(): take a user argument
  • *: move download function to shared
  • shared/hostpath: Also check SNAP_NAME
  • shared/hostpath: Properly handle prefix check
  • termios: Workaround vet on go tip
  • test: fix shellcheck complaints
  • lxd,shared: move archive functions to shared
  • containers: Default to pids cgroup for fork bomb mitigation
  • tests: Check for mixed tabs/spaces and trailing whitespaces
  • tests: Fix mixed tabs/spaces
  • api: Include message format for events
  • events: Use api message type
  • api: Add NetworkLease struct
  • client: Add network leases handling
  • lxc: Properly handle the --version flag
  • lxd-benchmark: Fix new go vet warnings
  • lxc: Make the / syntax work
  • i18n: Update translation templates
  • Make the test suite use lxc.apparmor.profile instead of lxc.aa_profile
  • Check for LXC version to decide which apparmor profile config key to use
  • setup-lvm: Fix pyflakes warnings
  • shared/cancel: Properly lock map
  • shared/cancel: Make the cancel code golint clean
  • lxd: Rework listening logic
  • lxd-benchmark: Fix golint
  • lxd/types: Make golint clean
  • client: Check API extension for storage
  • client: Check API extension for network
  • shared/api: add local storage volume {copy,move}
  • client: add {Copy,Move}StoragePoolVolume()
  • api: Add description field on operation
  • shared/eagain: Make our EAGAIN code a new package
  • lxd/netcat: Port to using shared/eagain
  • lxd/daemon: Cleanup startup code a bit
  • tests: Wait up to 20s for image to expire
  • tests: Consistency
  • fuidshift: Drop specific Makefile
  • shared/version: Include storage backends in agent
  • lxc: Fix golint
  • lxd/util: Fix golint
  • tests: Update list of golint clean packages
  • i18n: Look at all lxc files
  • lxc: Introduce a new utils package
  • lxd: Move migration code to own package
  • shared: Remove dead code
  • lxd: Restrict pongo2 file functions
  • tests: Fix recent Go test breakages
  • lxc/utils: Sync stringList with master
  • scripts/bash: tweak complete line for snaps
  • Add some missing “Return:” headings to make sample return values formatting right
  • container_lxc: keep full capability set
  • Fix version parsing of LXC betas
  • Ignore io.EOF errors when performing PUT /internal/shutdown
  • lxd/shutdown: Fix error string check
  • lxd/shutdown: Fix typo in error handling
  • lxd/init: Prevent non-root execution
  • lxd/init: Don’t fail test when non-root
  • memory: fix format string
  • db: Fix bad format string
  • client: Remove debug statements
  • db: Fix more format issues
  • lxd/migration: Update protocol
  • i18n: Update message catalogs and Japanese translation
  • shared/api: Don’t re-define fields
  • doc: add the appropriate titles to some documents
  • lxc: Fix manpage subcommand
  • shared/idmap: Workaround Go tip change
  • lxc: Remove dead code
  • Manually release the liblxc structs
  • lxd/containers: Adapt to go-lxc Release
  • tests: Bump LV size to 50MB
  • lxd/util: Fix formatting
  • tests: Tweak fdleak test
  • lxd/util: Add missing import
  • travis: Sync with current
  • Release LXD 2.0.12

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

Will LXD 2.0.12 be available as a deb package for Ubuntu 16.04?

No, there’s not really any point as the Go version in 16.04 is fixed (1.10 which we don’t support with this release) and LXD already works with all kernels on 16.04 so any of those fixes aren’t relevant.