News

LXD 5.14 リリースのお知らせ

26th of May 2023

はじめに

LXD チームは LXD 5.14 のリリースをお知らせできることにとてもワクワクしています!

このリリースは、チームが 2 週間ほどプラハへ出張していたため、いつもより少し時間がかかりました。このリリースには、すばらしい改良がいくつかと、多数のバグ修正が含まれています。

Enjoy!

新機能とハイライト

クラスターオートヒーリング

Ceph と OVN を使って LXD を使用している方からのリクエストが多かった機能です。LXD がクラスターメンバーの障害時、効果的にすべてのインスタンスを他のシステムに退避させることにより、LXD を自動的に回復できるようになりました。

この機能は、サーバー固有のデバイスや設定に依存しない Ceph を使ったインスタンスでのみ動作します。

この機能は、新しい cluster.healing_threshold で制御します。この設定は、クラスターメンバーがオフラインであるとみなされ、そのインスタンスが再配置されるまでの秒数を定義します。

ドキュメント : https://linuxcontainers.org/lxd/docs/latest/server/#server-options-cluster
仕様 : https://discuss.linuxcontainers.org/t/lxd-automated-cluster-healing/16995

OIDC Web 認証

LXD 5.13 で OpenID Connect 認証が追加されたのに続き、今回のリリースでは REST API 経由で直接 OpenID Connect 認証を使うことをサポートしました。

そのために、新たに API エンドポイントを 3 つ追加しました:

  • /oidc/login
  • /oidc/logout
  • /oidc/callback

OIDC ログインを LXD に設定し、/oidc/callback の LXD のアドレスへのリダイレクトを許可するように OIDC プロバイダーを設定します。この状態で、Web ブラウザーで /oidc/login へアクセスし、ログインフローを完結させます。

lxc publish --reuse

lxc snapshot --reuse と同様に、lxc publish --reuse --alias NAME を使って、既存のエイリアスを再利用して、イメージとしてインスタンスを LXD に公開(publish)できるようになりました。

ディスクとメモリ総量レポート

既存の使用量データに加えて、ディスクとメモリーの総量を取得するために、インスタンス状態(state) API に新たな API フィールドを追加しました。

stgraber@dakara:~$ lxc query /1.0/instances/u1/state | jq .disk
{
  "root": {
    "total": 10737418240,
    "usage": 1327104
  }
}

stgraber@dakara:~$ lxc query /1.0/instances/u1/state | jq .memory
{
  "swap_usage": 0,
  "swap_usage_peak": 0,
  "total": 65109124000,
  "usage": 32620544,
  "usage_peak": 0
}

すべての変更点

このリリースでの完全な変更点のリストは次の通りです:

すべてのChangeLogを見る
  • doc/metrics: restructure existing content
  • shared/version: add regexp.Compile() error handling, avoid unneeded capture group and trailing pattern
  • lxd/sys: version.Parse ignores trailing stuff, no need to split on "-"
  • lxd-agent/metrics: avoid unneeded capture group and use raw string
  • lxd/apparmor: fix AppArmor forkdnsProfile
  • lxd/instance/drivers/driver/qemu: Comment whitespace
  • lxd/instance/drivers/driver/qemu: Rename snapshot file handle for clarity in migrateSendLive
  • lxd/network/openvswitch/ovn: Add support for storing instance port location in external-ids
  • lxd/network/openvswitch/ovn: Adds LogicalSwitchPortOptionsSet function
  • lxd/network/driver/ovn: Set instance switch port Location in InstanceDevicePortStart
  • lxd/network/driver/ovn: Skip clearing up logical switch port if last active host wasn't local in InstanceDevicePortStop
  • lxd/device/nic/ovn: Start setting requested-chassis ID for logical switch port in post start hook
  • doc/metrics: update metrics documentation
  • lxd-agent/metrics: use strconv.ParseUint() instead of regexp matching for PID
  • lxd/db/db: add regexp.Compile() error handling, require segment numbers and use raw string
  • shared/validate: use simpler regexp.MatchString(), avoid unneeded capturing groups and use raw strings
  • lxd/devlxd: use regexp.Compile() with error handling instead of MustCompile() and anchor regex
  • lxd/seccomp: use regexp.Compile() with error handling instead of MustCompile()
  • lxd/ip: use regexp.Compile() with error handling instead of MustCompile()
  • lxd/storage/ceph: use regexp.Compile() with error handling instead of MustCompile()
  • shared/util: use regexp.Compile() with error handling instead of MustCompile()
  • lxd/device/config/devices/sort: Start non-nested OVN NICs before nested OVN NICs
  • lxd/network/acl/driver/common: Fix comment on Project
  • lxc: Fix missing "be" word in comment
  • doc: Fix OVN peers doc incorrectly listing a ports option
  • lxd/device/config/devices/sort: Fix device sorting for nested NICs
  • lxd/device/config/devices/test: Rework device sorting tests to check for more scenarios
  • lxd/instance/drivers/driver/lxc: Forcefully stop SFTP forkfile processs when forcefully stopping container
  • lxd/device/nic/ovn: Fix unnecessary warning when stopping instance that has nested OVN NICs
  • lxc/query: Handle empty plain-text files
  • lxd: Pass state to migrateInstance
  • lxd/storage/backend/lxd: Only add profiles the instance is using to backup config
  • lxd/rsync: Don't use a shell wrapper
  • lxd/rsync: Introduce RunWrapper
  • lxd/apparmor: apparmor profile for rsync
  • lxd/daemon: Setup rsync to use AppArmor
  • lxd/db/storage/buckets: Fixed comment in StorageBucketKeyFilter
  • shared/api/storage/pool/bucket: Adds StorageBucketKey URL function
  • lxd/storage/buckets: Reduce transactions in storagePoolBucketKeysGet
  • lxd/storage/buckets: Use URL function storagePoolBucketKeysGet
  • lxd/storage/buckets: Only return api.StorageBucketKey to client
  • instance: no timeout on the operationlock for creating an instance
  • lxd/api_cluster: Split up evacuateClusterMember
  • config: Add cluster.healing_threshold config key
  • lxd: Add internal cluster healing endpoint
  • db: Add ClusterHeal operation type
  • lxd: Add cluster healing task
  • api: Add cluster_healing API extension
  • doc: Add cluster.healing_threshold config key
  • instance_post: Drop srcMember from instancePostClusteringMigrateWithCeph
  • instance: rename common.snapshot to common.isSnapshot
  • instance: stop API races while creating/deleting snapshots
  • api: instances_state_total
  • shared/api: Add total for disk and swap in instance state
  • doc/rest-api: Refresh swagger YAML
  • lxd/instance/lxc: Add memory total to state
  • lxd-agent: Add memory total to state
  • lxd/storage: Introduce a VolumeUsage struct.
  • lxd/storage: Update GetInstanceUsage to return VolumeState and corresponding callers.
  • lxd/instance/lxc: Add Total field to InstanceStateDisk
  • lxd/instance/qemu: Add Total field to InstanceStateDisk
  • lxd/storage_volumes_state: Update for VolumeUsage
  • lxd/apparmor/rsync: Allow locking and linking
  • lxd/apparmor/rsync: Add setfcap for fscaps setting
  • lxd/network: Skip ovn/dhcp range overlap check when DHCP is off.
  • lxd/instance/drivers/driver/common: Adds deleteSnapshots that accepts custom snapshot delete function
  • lxd/instance/drivers/driver/lxc: Adds missing call to d.updateBackupFileLock in Stop
  • lxd/instance/drivers/driver/lxc: Use non-locking d.deleteSnapshots function when deleting snapshots as part of instance delete
  • lxd/instance/drivers/driver/qemu: Use non-locking d.deleteSnapshots function when deleting snapshots as part of instance delete
  • lxd/instance/drivers/driver/lxc: Only update instance backup file when handling a request to delete a snapshot
  • lxd/instance/drivers/driver/qemu: Only update instance backup file when handling a request to delete a snapshot
  • lxd/instance/instance/utils: Removes unused DeleteSnapshots
  • lxd/instance/drivers/driver/lxc: Removes redundant revert in LockExclusive
  • lxd/instance/drivers/driver/qemu: Adds version function
  • lxd/instance/drivers/driver/qemu: Updates addCPUMemoryConfig to use d.version function
  • lxd/instance/drivers/driver/qemu: Disable vhost-net network accelerator for veth devices on QEMU 7.2 and later in addNetDevConfig
  • lxd/instance/drivers/driver/qemu: Don't call d.checkFeatures again in setupSEV
  • lxd/instance/drivers/driver/qemu: Use DriverStatuses Info directly
  • lxd/apparmor/rsync: Fix snap use inside of containers
  • doc/network: clarify the difference between default and initial value
  • lxd/db/snapshots: Delete expired snapshots when expiry time is reached rather than exceeded
  • github: Fix static-analysis workflows
  • lxd/instance: Fix expired snapshot pruning when no new snapshots being created in autoCreateAndPruneExpiredInstanceSnapshotsTask
  • instance/logs: Add qemu.conf to log list
  • doc/devices/proxy: add video link
  • doc/migration: add link to spec for live migration
  • doc/storage: clarify that you cannot shrink your storage pool
  • doc/authentication: add info about OpenID Connect
  • doc: fix broken link
  • lxc/storage_volume: Set target before getting storage volume
  • client: Update return type of GetStoragePoolVolumeNamesAllProjects.
  • client: Updates urlsToResourceNames to use strings.Cut.
  • shared/ws: Introduce new websocket package
  • shared/ws/rwc: Merge duplicate implementations from shared
  • lxd/instance/exec: Switch to ws.Mirror* and don't immediately stop mirror when child process ends
  • lxd-agent/exec: Switch to ws.Mirror* and don't immediately stop mirror when child process ends
  • lxd-migrate/utils: Switch to ws.NewWrapper
  • lxd: Switch to ws.NewWrapper
  • shared/netutils/network/linux: Removes unused WebsocketExecMirror
  • shared/util/linux: Removes unused ExecReaderToChannel and GetPollRevents
  • shared/network: Removes unused WebsocketIO
  • lxc/export: Rename backup file based on file type
  • doc/storage_backup_volume: Update file naming for backups
  • lxc/export: Revert change to import statement
  • doc/storage/buckets: add info on configuring the S3 address
  • lxd: Use protobuf helpers to avoid panics
  • scripts: add missing oidc.* keys to bash completion
  • lxc/utils: Add IsAliasesSubset and GetCommonAliases
  • lxd/storage/drivers/driver/zfs/volumes: Clean up volume on failure in CreateVolumeFromCopy
  • lxd/storage/drivers/driver/zfs/volumes: Don't block on receive error in CreateVolumeFromCopy
  • lxd/storage/drivers/driver/zfs/volumes: Pass true to allowUnsafeResize when setting volume size in CreateVolumeFromCopy
  • doc/storage: clarify that "attach" is an alias for "device add"
  • lxd/db/query: Adds marshaling interfaces.
  • lxd-generate: Update scanner function to use the unmarshaler when specified.
  • lxd-generate: Add method to get different field params if marshal is true.
  • lxd-generate: Updates GetMany to marshal a filter before using it.
  • lxd-generate: Updates ID to marshal field when necessary.
  • lxd-generate: Updates Create to marshal fields when necessary.
  • lxd-generate: Updates Rename to marshal fields when necessary.
  • lxd-generate: Updates Update method to marshal fields when necessary.
  • lxd-generate: Updates Delete method to marshal fields when necessary.
  • lxd-generate: Updates comment to match generated method signature.
  • lxd/db/cluster: Regenerates mapper files.
  • lxd-generate: Updates README with marshal tag.
  • doc/devices/nic: add link to video and missing info about macvlan
  • Revert "instance: no timeout on the operationlock for creating an instance"
  • lxd/instance/operationlock: Remove concept of automatic lock timeout
  • lxd/instance/drivers: Update operation lock usage without automatic timeouts
  • lxd/instance/drivers: Move more common restart functionality into restartCommon
  • lxd/instance/state: Set a 10 minute default shutdown timeout if no timeout specified in doInstanceStatePut
  • lxd/storage/drivers/driver/zfs/volumes: Removes operation lock timeout constant dependency
  • lxd/auth/oidc: Add support for code flow login in browser
  • lxd/daemon: Update for change to oidc Auth function
  • lxd/api: Add OIDC login/callback/logout routes
  • test: Extend storage pools tests on cluster
  • lxd/db: remove the old snapshot records in the storage_volumes table
  • lxd/db: remove useless RemoveStorageVolumeImages function
  • lxd/auth/oidc: Return email address if available
  • client/oidc: Add Email scope
  • tests: Clean storage pools in scriplet tests
  • SECURITY: Add GPG keys
  • lxc/action: Add freeze as alias to pause
  • oidc: Always set OIDC headers if needed in case of an error
  • lxd/cgroup: Better matching of devID and io stats
  • lxc/publish: Add support for 'reuse' flag
  • tests: Add and fix tests for 'publish --reuse'
  • i18n: Update translation templates
  • lxd-generate: Fix declaration order of unmarshalable variables.
  • lxd-generate: Change call order of update method to match other methods.
  • lxd/storage/backend/lxd/patches: Fix storage_delete_old_snapshot_records so it runs on older sqlite versions
  • lxd/srorage/backend/lxd/patches: patchDeleteOldSnapshotRecords
  • response: Add Unauthorized response
  • oidc: Have Auth() return an AuthError
  • daemon: Handle OIDC AuthError
  • client: Only perform OIDC authentication if Unauthorized
  • lxd/cgroup: err of strconv.ParseInt should return -1 for consistency
  • lxd/seccomp: use GetProcessesUsage to get process count
  • lxd/instance/lxc: use cg.GetProcessesUsage (through processesState) instead of cg.GetTotalProcesses
  • lxd/cgroup: remove useless cg.GetTotalProcesses function
  • lxd/endpoints: Rename vsock socket to vmvsock to avoid naming conflicts
  • lxd/endpoints/vsock: Always listen on vsock host context ID in createVsockListener
  • lxd/instance/drivers/driver/qemu: Push vsock host context ID to lxd-agent in getAgentConnectionInfo
  • lxd-agent: Use vsock.Listen function directly
  • lxd/vsock/vsock: Removes unused Listen function
  • lxc/config: Don't crash on nil map
  • cluster: Disable cluster group creation by anyone authenticated
  • lxd-agent/devlxd: Improve client errors
  • lxd/endpoints/vsock: Update createVsockListener to use listeners.NewFancyTLSListener
  • lxd/endpoints/network: Update NetworkUpdateCert to also update vmvsock, metrics and buckets listeners certificate
  • lxd/nic/p2p: Disable accept_ra on host
  • lxd/api: Redirect /ui to /ui/
  • events: Pass state to eventsSocket
  • operations: Pass state instead of daemon
  • api_cluster: Pass state instead of daemon
  • api_internal: Pass state instead of daemon
  • project: Pass state to projectChange
  • api_vsock: Pass state to authenticateAgentCert
  • images: Pass state instead of daemon
  • instance: Pass state instead of daemon
  • networks: Pass state instead of daemon
  • certificates: Pass state to instead of daemon
  • operations: Pass state to autoRemoveOrphanedOperations
  • profiles: Pass state to profile update functions
  • response: Pass state to instead of daemon
  • storage: Pass state instead of daemon
  • tokens: Pass state to autoRemoveExpiredTokens
  • warnings: Pass state to pruneResolvedWarnings
  • lxc/config_device: Don't panic on nil device map.
  • client: Always set Authorization if using OIDC
  • client: Simplify response check in OIDC
  • acme: Use state if possible
  • api: Use state if possible
  • api_cluster: Reduce calls to d.State() and use state if possible
  • api_internal: Reduce calls to d.State() and use state if possible
  • api_metrics: Use state if possible
  • api_project: Use state if possible
  • certificates: Reduce calls to d.State() and use state if possible
  • devlxd: Reduce calls to d.State() and use state if possible
  • images: Reduce calls to d.State() and use state if possible
  • instance_sftp: Drop unused Daemon field from sftpServeResponse
  • instance: Reduce calls to d.State() and use state if possible
  • network: Reduce calls to d.State() and use state if possible
  • operations: Reduce calls to d.State() and use state if possible
  • profiles: Reduce calls to d.State() and use state if possible
  • storage: Reduce calls to d.State() and use state if possible
  • warnings: Reduce calls to d.State() and use state if possible
  • lxd/storage/drivers/driver/zfs/volumes: Fix block volume shrink regression
  • doc/images: add new --reuse flag for publishing images
  • lxd/certificates: Allow non-admin users to delete only their certificates
  • test: Add test for removing trusted certificate
  • doc/getting started: add information about how to access the web UI
  • lxd/endpoints/listeners/fancytls: Update doc block description
  • lxd/endpoints/network: Clean up NetworkUpdateTrustedProxy
  • lxd/endpoints/endpoints: Move tertiary listeners into own Up functions
  • lxd/daemon: Start storage buckets and metrics listeners after managed networks
  • doc/instance options: clarify CPU limits
  • doc: clarify TSIG key name generation for network zones
  • doc: Update doc/howto/network_zones.md
  • doc/bridge/resolved: clarify use of "~"
  • lxd/network_zones: Use zone for consistency
  • doc: Update REST API
  • doc/storage: add lxc storage info command
  • shared/subprocess/proc: Respect LXD_SECURITY_APPARMOR env var
  • lxd/sys/apparmor: Use shared.IsFalse when detecting LXD_SECURITY_APPARMOR env var
  • lxd/network/openvswitch/ovn: Adds switch name to logical switch ports in LogicalSwitchPortAdd
  • shared/instance: Adds .last_state.ip_addresses to ConfigKeyChecker
  • lxd/network/openvswitch/ovn: Fixes issue with LogicalSwitchDHCPv4RevervationsGet when no reservations exist
  • lxd/network/openvswitch/ovn: Adds LogicalSwitchPortIPs function
  • lxd/network/openvswitch/ovn: Updates LogicalSwitchPortSetDNS to accept list of IPs
  • lxd/network/driver/ovn: client.LogicalSwitchPortSetDNS usage
  • lxd/network/network/utils: Adds IPInSlice function
  • lxd/network/driver/ovn: Adds LastStateIPs field to OVNInstanceNICSetupOpts
  • lxd/network/driver/ovn: Refactor DHCPv4 reservation logic
  • lxd/network/driver/ovn: Updates InstanceDevicePortStart to return list of IPs associated to port for DNS
  • lxd/network/driver/ovn: Comment spacing
  • lxd/device/nic/ovn: Update InstanceDevicePortStart definition and usage
  • lxd/network/driver/ovn: Update InstanceDevicePortStart to use last state allocated IPs as sticky DHCPv4 hint
  • lxd/device/nic/ovn: Populate and use volatile last_state.ip_addresses config to use sticky DHCPv4 allocations
  • doc/reference/instance/options: Document volatile..last_state.ip_addresses
  • lxd: Drop storageGetVolumeNameFromURL function
  • client: Switch to shared/ws websocket package
  • lxd/operations/websocket: Switch to shared/ws websocket package
  • shared/ws/mirror: Comment improvements
  • shared/network: Removes unused websocket functions
  • test/godeps.list: Adds github.com/lxc/lxd/shared/ws
  • lxd: Use consistent route variable names
  • doc: Update REST API
  • lxc/storage: Rework cmdStorageInfo.Run() to be more resilient to used by resource URLs
  • doc/faq: clean up existing FAQ
  • doc/faq: add an entry for common firewall issues
  • lxd: Improve errors for image record creation
  • lxc/export: Fix export rename when run inside snap
  • lxc/project: Corrects project edit help text to match reality
  • i18n: Update translation templates
  • lxd/instance/console: Switch to ws.Mirror in connectVGA
  • lxd/instance/console: Switch doConsole to ws.Mirror
  • lxd/instance/console: Use logger.Debug instead of logger.Debugf
  • shared/network: Removes unused WebsocketConsoleMirror
  • lxd-agent: Switch to ws.Upgrader
  • lxd: Switch to ws.Upgrader
  • shared/network: Removes unused WebsocketUpgrader
  • lxc-to-lxd/transfer: Switch to ws.Mirror
  • lxd-migrate/transfer: Switch to ws.Mirror
  • shared/network: Removes unused WebsocketMirror and associated functions
  • lxd/storage/volumes: Prevent moving volumes to projects that dont have features.storage.volumes enabled
  • lxc/storage: Exclude entity snapshots from lxc storage info output
  • lxd/instance/post: Fix comment in instancePost
  • doc/howto/network_ovn_setup: Fix link to netplan docs again
  • doc/howto/network/bridge/firewalld: Updates docker firewall fixes to include easier forwarding option
  • lxd/instance/drivers/qmp/monitor: Define the events we use as constants
  • lxd/instance/drivers/driver/qemu: qmp event constant usage
  • lxd/instance/drivers/qmp/monitor: Log when monitor connects and disconnects
  • lxd/instance/drivers/qmp/monitor: Trigger shutdown event if monitor unexpectedly disconnects
  • lxd/instance/drivers/driver/qemu: Log warning when instance stops due to monitor disconnect
  • shared/logger/toplevel: The toplevel AddContext should use the top level logger
  • lxd-agent/exec: logger.AddContext usage
  • lxd/storage/backend/lxd: b.logger.AddContext usage
  • lxd: logger.AddContext usage
  • lxd/api/cluster: Refactor cluster healing logic so it doesn't create an operation (and logs) every minute
  • lxd/storage/drivers/utils: Clarify comment on loopFileSizeDefault
  • lxd/db/storage/volume/snapshots: Populate NodeID field returned from GetExpiredStorageVolumeSnapshots
  • lxd/db/storage/volume/snapshots: Adds memberSpecific filtering to GetExpiredStorageVolumeSnapshots
  • lxd/storage/volumes/snapshot: Fix pruneExpireCustomVolumeSnapshotsTask to understand cluster members and remote pools
  • lxd/storage/volumes/snapshot: Don't start taking snapshots if daemon is shutting down
  • lxd/db/storage/volumes: Adds memberSpecific argument to GetStoragePoolVolumesWithType
  • lxd/main/activateifneeded: tx.GetStoragePoolVolumesWithType usage
  • lxd/storage/volumes/snapshot: Merges auto create and auto prune custom volume snapshots into single task
  • lxd/storage/volumes/snapshot: Update autoCreateCustomVolumeSnapshots to return an error
  • lxd/storage/volumes/snapshot: Updates errors from pruneExpiredCustomVolumeSnapshots to align with autoCreateCustomVolumeSnapshots
  • lxd/instance: Don't start any more instance snapshot tasks if context is cancelled in autoCreateInstanceSnapshots and pruneExpiredInstanceSnapshots
  • lxd/instance: Rework instance snapshots task to prune first and then create scheduled ones
  • lxd/api/cluster: Fix cluster healing for non-default project instances in internalClusterHeal
  • lxd/api/cluster: Fix cluster healing so instances are started in internalClusterHeal
  • lxd/api/cluster: Fix cluster healing so that state variable isn't held forever in autoHealClusterTask
  • lxd/api/cluster: Fix cluster healing to use task's context in autoHealClusterTask
  • lxd/api/cluster: Improve logging in autoHealClusterTask
  • lxd/api/cluster: Improve logging and errors in autoHealCluster
  • lxd/api/cluster: Fix member rename in clusterNodePost
  • lxd/instance/drivers/qmp/monitor: Add ability to enable/disable on disconnect shutdown event
  • lxd/instance/drivers/driver/qemu: Don't log warning if no child processes found in killQemuProcess
  • lxd/instance/drivers/driver/qemu: Disable monitor disconnect event during VM start
  • lxd/instance/drivers/driver/qemu: Enable vhost-net for TAP devices in addNetDevConfig
  • lxd/network/driver/bridge: Simplify ipv{n}.routing logic
  • lxd/api/internal: Remove force argument from internalImportFromBackup
  • lxd/instances/post: Fail import if conflicting DB records are present in createFromBackup
  • lxd/device/unix_common: simplify check logic
  • lxd/instance/drivers/driver_lxc: simplify check logic
  • lxd/network/driver_bridge: simplify check logic
  • lxd/network/network_utils: simplify check logic
  • lxd/storage/drivers/volume: Don't copy zfs.block_mode setting in NewVMBlockFilesystemVolume
  • lxd/storage/drivers/driver/zfs/volumes: Use vol.NewVMBlockFilesystemVolume for image volume creation in CreateVolume
  • doc/network/bridge: clarify options for using LXD with Docker
  • doc/cluster: clarify lxc cluster group assign command
  • Document how to enable manual testing of zone DNS.
  • lxd/instance/drivers/driver/qemu: Move lifecycle stop & shutdown event generarion into onStop function
  • lxd/instance/drivers/driver/qemu: Remove unused operation argument from pidWait
  • lxd/instance/drivers/driver/qemu: Reworks VM Stop and forceStop functions to better handle non-response QEMU processes
  • lxd/storage/drivers/driver/lvm: Fail if conflicting PV or VG exist when creating loop-backed pool
  • lxd/storage/drivers/driver/lvm: Make providing a size when using existing PV or VG for non-thin pools an error
  • lxd/storage/drivers/driver/lvm/utils: Updates createDefaultThinPool to consistently use settings from d.config
  • lxd/storage/drivers/driver/lvm: d.createDefaultThinPool usage
  • lxd/storage/drivers/driver/lvm: Make providing size an error when the thinpool already exists
  • lxd/storage/drivers/driver/lvm: Updates createDefaultThinPool to accept thin pool size argument
  • gomod: Update dependencies
  • i18n: Update translations from weblate

試用環境

この新しい LXD リリースは私たちの デモサービス で利用できます。

ダウンロード

このリリースの tarball は ダウンロードページ から取得できます。

ビルド済みバイナリーは次のようにして使えます:

  • Linux: snap install lxd
  • MacOS: brew install lxc
  • Windows: choco install lxc

LXD 5.13 リリースのお知らせ

15th of April 2023

はじめに

LXD チームは LXD 5.13 のリリースをお知らせできることにとてもワクワクしています!

今回のリリースは、OVN ネットワークを使っているユーザーにとって多くの改良点があるリリースとなっています。また、より高速なライブマイグレーションと AMD SEV サポートという、VM ユーザーにとっても非常にエキサイティングなリリースでもあります。それに加えて、ユーザー認証のための OpenID Connect の追加、マルチユーザー環境向けの専用ネットワークブリッジ、そして長年の要望であった LXD 自身がストレージプールのリサイズを変更する機能も追加されています。

Enjoy!

新機能とハイライト

仮想マシン用の高速なライブマイグレーション

かなり前から、LXD は仮想マシンのライブマイグレーションをサポートしていました。
しかし、この方法は理想的とは言えませんでした。これは、LXD のステートフルストップにすべて依存した機能でした。つまり、メモリーと CPU の状態をすべてディスクに書き出し、それから仮想マシンを完全に停止させ、停止させたところから再び正確に起動するという機能でした。

つまり、ライブマイグレーションでは、実際は(場合によっては数 GB の)すべてのメモリーを書き出し、CPU の状態を書き出し、それから VM を停止させ、すべての状態(ディスク、メモリー、CPU)を移動先のシステムに移動させ、最後に復元するというプロセスでした。

Ceph のような共有ストレージと、1GiB 程度の RAM を持った VM の場合、VM がネットワーク上で応答しない時間が 5〜10 秒程度のダウンタイムで行うことができていました。

ローカルストレージを使用している場合は、VM サイズによっては状況はもっと悪く、1 分近くかかることもよくありました。

LXD 5.13 で状況が変わりました。今は、移行元と移行先のサーバーが、マイグレーションの開始直後から通信できるメカニズムを持ちました。VM が実行されている間にバックグラウンドでディスクの状態を転送し、その後、移行ロジックを複数回繰り返し、残りのディスクの変更とメモリーを転送し、最後に移行先のシステムに切り替えられます。

この機能によりほとんどダウンタイムを感じさせずに、ライブマイグレーションに対してほとんどの人々が期待する機能を提供できます。

仕様 : https://discuss.linuxcontainers.org/t/lxd-online-vm-live-migration-qemu-to-qemu/16635

仮想マシンに対する AMD SEV サポート

LXD が、仮想マシンのメモリ暗号化のために AMD SEV をサポートするようになりました。

この機能は、いくつかの新しい設定キーを使って制御します:

  • security.sev
  • security.sev.es
  • security.sev.session.dh
  • security.sev.session.data

(ファームウェアとカーネルでの AMD EPYC サポートが有効な)互換性のあるシステムでは、security.sevtrue に設定すると、ファームウェアが扱う VM ごとのキーを使って、VM のメモリーが暗号化されるようになります。

AMD SEV-ES をサポートするシステムは、security.sev.es を有効にすることで、CPU の状態も暗号化し、よりセキュリティを強化できます。

最後に、LXD はカスタムセッションキーの供給もサポートしており、すでにサポートしている LXD の vTPM サポートと組み合わせて、ファームウェアがユーザーが提供するキーで設定されていることを確認し、ホストオペレーターが VM を操作する能力を持たないようにするために使用できます。

仕様 : https://discuss.linuxcontainers.org/t/lxd-support-for-amd-sev-in-vm/16642
ドキュメント : https://linuxcontainers.org/lxd/docs/latest/reference/instance_options/#instance-options-security

OpenID Connect 認証

LXD における認証と認可について、業界標準のソリューションを提供するためのさらなる取り組みの一環として、認証に OpenID Connect サポートを追加するための作業を始めました。

現時点では、認証のみがサポートされていることを強調する必要があります。LXD に設定された OIDC Identity Provider によって承認されたユーザーは、lxd グループに属しているユーザーと同等のフルアクセス権を得ることができます。

この機能は、いくつかの新しい設定キーを使って設定します:

  • oidc.issuer
  • oidc.client.id
  • oidc.audience (一部のプロバイダーのみ該当)

LXD は認証にデバイスフロー(原文: "Device Code flow")を使用し、CLI ツールがブラウザーベースの認証フローを起動し、アクセスとリフレッシュトークンを取得して保存し、すべてのやりとりでそれを LXD に提供します。

仕様 : https://discuss.linuxcontainers.org/t/lxd-openid-connect-authentication/16570
ドキュメント : https://linuxcontainers.org/lxd/docs/latest/server/#openid-connect-configuration

OVN 上のネットワークアクセラレーションのための VDPA

LXD は、少し前から OVN ネットワーク上での SR-IOV ベースのアクセラレーション NIC をサポートしています。これらはほとんど、通常の Virtual Function をゲストに渡します。しかし、VF を通して送られるトラフィックが、カード上の物理スイッチを通してでなく、OpenVswitch ブリッジで終端するように設定されます。

このメカニズムにより、LXD はこれらの VF を特定の OVN ネットワークに関連付けることができます。OpenVswitch のフローオフローディングと組み合わせることで、接続の最初のパケットだけを OpenVswitch が見て、後続のトラフィックは物理 NIC にプッシュされるフローロールで処理されるため、システムの CPU 消費がほとんどなく、非常に高いスループットを実現できます。

これはすばらしい機能である一方で、やっかいな制限がいくつかあります。
その主な制限は、VM に渡される VF は物理 NIC と同じベンダー、同じモデルとして現れます。ゲストはそれに適したドライバーを持つ必要があるということです。
2 つ目は 1 つ目の結果です。物理カードからの VF を扱っているため、NIC の内部状態を抽出するメカニズムも、移行先システムに全く同じ NIC があるという保証もないため、このような VM をライブマイグレーションすることはできません。

VDPA の話に入ります。VDPA では、ゲストは物理 NIC が何であるかは認識しません。代わりにゲストでは、アクセラレーションされていないネットワークと同様の、完全に通常の virtio-net デバイスが見えます。
舞台裏では、virtio-net デバイスは実際に VF にマップされた RX/TX キューを持っており、SR-IOV が行うのと同様に OpenVswitch と OVN に接続されています。これで、ゲストはドライバーが不要であり、理論的には移行前に標準のアクセラレーションされていない virtio-net デバイスに再マッピングできるため、ライブマイグレーションできるようになります。

実際には、これは OVN NIC の acceleration プロパティの新しい値を通して使用します。既存の sriov と並んで、vdpa をサポートするようになりました。この機能は仮想マシンに限定されていることに注意してください。コンテナでは VDPA は使えません。

ハードウェア面では、NVIDIA ConnectX-6 以降だけが、VDPA がこのように動作するために必要なものをサポートしています。

ドキュメント : https://linuxcontainers.org/lxd/docs/latest/reference/devices_nic/#nictype-ovn

OVN でのレイヤー 3 専用ネットワークのサポート

通常の OVN ネットワークでは、IPv4 では標準的な /24 サブネット、IPv6 では /64 サブネットという、完全に標準的なネットワークが利用できます。つまり、ブロードキャスト、マルチキャストなどをサポートする L2 ネットワークです。

しかし、L3 専用のネットワークが必要な場合はどうすれば良いでしょう?

次の 2 つの新しい設定を使うことでそれができるようになりました:

  • ipv4.l3only
  • ipv6.l3only

これらを設定すると、マッチングプロトコルがそれぞれ /32 もしくは /128 を使用するようになり、ブロードキャストやマルチキャストができなくなり、すべてのトラフィックが(仮想)ルーターを経由する必要があるようになります。

ドキュメント : https://linuxcontainers.org/lxd/docs/latest/reference/devices_nic/#nictype-ovn

OVN ネットワークのネスト NIC のサポート

OVN の特徴は、追加の仮想 NIC のために追加の PCI アドレスを使用することなく、インスタンスに最大 4096 個の追加の NIC を起動できる機能があることです。

これを行う方法は、プライマリインターフェース上の VLAN に対して OVN インターフェースを割り当てることです。
そして、インスタンスで VLAN を分割し、直接使用したり、コンテナに与えたり、ブリッジに追加したりできます。

LXD は、メイン NIC の名前を設定する必要がある parent プロパティと、使用する VLAN ID を指定するために使う vlan プロパティを使用して、追加の OVN nic デバイスを定義できるようにすることで、この機能をサポートするようになりました。

ドキュメント : https://linuxcontainers.org/lxd/docs/latest/reference/devices_nic/#nictype-ovn

マルチユーザーセットアップでのユーザーごとのブリッジ

マルチユーザーシステムでのオンデマンドのプロジェクト作成を提供する lxd-user デーモンが、これからまでのいくつかのリリースで導入した機能を利用するために更新されました。

この機能は、プロジェクト内で利用可能なネットワークのリストを制限する機能です。プロジェクト作成時に、lxd-user は自動的にプロジェクト専用のネットワークを作成し、そのひとつのネットワークのみを使えるようにプロジェクトを設定します。

これにより、システム上のユーザー間でネットワークの競合が発生することを防げます。

既存のストレージプールの拡張サポート

長年の要望であった、ループバックストレージプールを直接リサイズできるようになりました。

行う方法は簡単で、単に size プロパティを希望するサイズに変更するだけで、プールが大きくなります。これは、LXD によってループファイル上に作られたプールでのみ動作します。またこの方法は、以前のこのようなプールの拡張のマニュアルでの操作にとってかわるものです。

縮小はサポートされないことに注意してください。これを正しく行うには、かなり大きな頭痛の種になる可能性があるためです。

ドキュメント : https://linuxcontainers.org/lxd/docs/latest/howto/storage_pools/#storage-resize-pool

プロジェクトのドキュメントの再作成

ドキュメントでは、プロジェクトのドキュメントが新しいレイアウトになりました。

ドキュメント : https://linuxcontainers.org/lxd/docs/latest/explanation/projects/

すべての変更点

このリリースでの完全な変更点のリストは次の通りです:

すべてのChangeLogを見る
  • storage: Correctly set VolumeOnly in VolumeSourceArgs
  • storage, migration: Add snapshots argument to MigrationTypes
  • btrfs: Use rsync when refreshing volume only
  • zfs: Use rsync when refreshing volume only
  • doc: Update optimized volume transfer
  • lxd/instance/qemu: vmgenid isn't supported on aarch64
  • doc: Add source.wipe
  • lxd/storage/drivers/driver/ceph/volumes: Don't fail CreateVolumeSnapshot when freezing filesystem not possible
  • lxd/instance/post: Stop instance before moving statelessly between cluster members
  • client/connection: Add URL to debug logging in ConnectLXDWithContext
  • lxd/instance/post: Reworks instancePostClusteringMigrate to avoid self-connecting to the source member's API
  • lxd/instance/post: Removes delete action from internalClusterInstanceMovedPost
  • lxd/migrate: Add clusterSameNameMove field to migrationSourceWs
  • lxd/migrate/instance: Adds clusterSameNameMove to newMigrationSource
  • lxd: newMigrationSource usage
  • lxd/instance/post: Pass cluster same name move hint to newMigrationSource in instancePostClusteringMigrate
  • lxd/instance/instance/interface: Moves ClusterSameNameMove from MigrateReceiveArgs to MigrateArgs
  • lxd/migrate/instance: MigrationArgs usage in migrationSink.Do
  • lxd/migrate/instance: Set ClusterSameNameMove in migrationSourceWs.Do
  • lxd/instance/qemu: struct/insert func for vmgenid description in qemu.conf
  • lxd/instance/qemu: add VM Generation ID to QEMU config
  • lxd-user: Use per-user bridge
  • lxd/instance/drivers/driver/qemu: Fix VM start with vmgenid
  • doc/devices/pci: add link to YouTube video
  • lxd/instance: checkFeatures returns a map[string]any instead of []string
  • lxd/db/generate/db/method: Use tx.ExecContext over tx.Exec
  • lxd/db/cluster: Update generated code
  • lxd/migrate: Setup timeouts in migrationSink.Connect
  • shared/network: Add read lock to WebsocketIO
  • shared/network: Use WriteMessage optimized method in WebsocketIO.Write
  • lxd/storage/drivers: Removes use of cmd.StdoutPipe when piping stdout to websocket
  • client/lxd: Log warning when failing to call tcp.SetTimeouts
  • lxd: Log warning when failing to call tcp.SetTimeouts
  • lxd: auto snap create and pruning are in the same task
  • lxd: chan mgmt improvement for goroutines created by autoCreateInstSnap and early return if cancelled ctx
  • lxd/instance/qemu: Defer call to remove file descriptors after QEMU process starts
  • lxd/instance/qmp: Add query-sev-capabilities
  • lxd/apparmor/qemu: Add /dev/sev and /tmp/lxd_sev_* to profile
  • lxd/instance/qemu: Add QEMU config definition for SEV
  • lxd/device: Skip virtiofs when SEV is enabled
  • lxd/instance/qemu: Check if SEV is supported on host
  • lxd/instance/qemu: Use KVM acceleration
  • lxd/instance/qemu: Enable SEV if security.sev=true
  • shared/instance: Add security.sev config options
  • doc: Add security.sev
  • api: amd_sev
  • doc/network: Expand on txqueuelen
  • doc/authentication: Update minimum TLS
  • lxc/config: Fix config trust fail when remote is specified
  • shared/simplestreams: Add support for disk-kvm.img.vcdiff
  • lxd/api: Don't crash by passing a nil localConfig
  • lxd/storage/pool/interface: Adds CleanupInstancePaths definition
  • lxd/storage/backend/mock: Adds CleanupInstancePaths function
  • lxd/storage/backend/lxd: Adds CleanupInstancePaths function
  • lxd/migrate: Replace clusterSameNameMove with clusterMoveSourceName property
  • lxd/instance: newMigrationSource clusterMoveSourceName arg usage
  • lxd/instance/instance/interface: Replace ClusterSameNameMove with MigrateArgs.ClusterMoveSourceName
  • lxd/instance/post: Forward request to target member if source member offline in instancePost
  • lxd/instance/post: Reworks instancePostClusteringMigrate
  • lxd/instance/post: Reworks instancePostClusteringMigrateWithCeph
  • lxd/instance/post: Updates migrateInstance to load source & target cluster member info
  • lxd: migrateInstance usage
  • lxd: Removes unused internal/cluster/instance-moved API endpoint
  • lxd/instance/drivers/driver/qemu: Make instance agent vsock advertise message a warning
  • lxd/instance/drivers: args.ClusterMoveSourceName usage
  • lxd/instance/drivers: Don't remove remote volumes on error during cluster move
  • lxd/migration/migration/volumes: Adds ClusterMove to VolumeSourceArgs and ClusterMoveSourceName to VolumeTargetArgs
  • lxd/instance/drivers: Populate VolumeSourceArgs.ClusterMove in MigrateSend
  • lxd/instance/drivers: Populate VolumeTargetArgs.ClusterMoveSourceName in MigrateReceive
  • lxd/instances/post: Reworks createFromMigration to use req.Source.Source name
  • lxd/storage/backend/lxd: Fix typo
  • lxd/storage/backend/lxd: Updates CreateInstanceFromMigration to handle remote shared storage cluster moves
  • lxd/storage/drivers/driver/ceph/volumes: Move cluster move logic from MigrateVolume to CreateVolumeFromMigration
  • lxd/instance/qemu: Cleanup vmgenid
  • lxd/instance/qemu: Refactor cpuTopology
  • lxd/migrate: Removes separate src and dest migrationFields fields from migrationSink
  • lxd: Updates use of embedded migrationFields in migrationSink
  • lxd/migrate/instance: Simplify logic in newMigrationSink
  • shared/cancel: Replace http.Client with http.Client.Do
  • shared: Update to new CancelableDownload
  • lxd: Update to new CancelableDownload
  • client: Use DoHTTP on all CancelableDownload
  • client: Make lxdDownloadImage use DoHTTP
  • lxd/instances: Don't use notify for targetting
  • lxd/instance/instance/interface: Updates MigrateArgs to use functions for returning migration connections
  • lxd/migrate/instance: instance.MigrateArgs usage
  • lxd/instance/drivers/driver/lxc: Updates MigrateSend to use connection functions
  • lxd/instance/drivers/driver/lxc: Updates MigrateReceive to use connection functions
  • lxd/instance/drivers/driver/qemu: Updates MigrateSend to use connection functions
  • lxd/instance/drivers/driver/qemu: Updates MigrateReceive to use connection functions
  • shared/network: Sets 5s handshake timeout in WebsocketUpgrader
  • lxd/migration/connection: Adds migrationConn concept
  • lxd/migrate: Replaces the individual connection variables with a map of migrationConn types
  • lxd/migrate/instance: Updates newMigrationSource to accept pushTarget information
  • lxd/migrate/instance: Updates newMigrationSink to setup migrationConn map
  • lxd/migrate/storage/volumes: Updates newStorageMigrationSource to accept push target info
  • lxd/migrate/storage/volumes: Updates newStorageMigrationSink to use the migrationConn map
  • lxd/storage/volumes: newStorageMigrationSink usage
  • lxd/storage/volumes: Pass req.Target to newStorageMigrationSource
  • lxd/instances/post: Use setupWebsocketDialer in createFromMigration
  • lxd/instance/post: Pass req.Target to newMigrationSource
  • lxd/instance/post: Update instancePostClusteringMigrate with newMigrationSource usage
  • lxd/instance/snapshot: Pass req.Target to newMigrationSource
  • lxd/storage/backend/lxd: Clarify freezing comment in MigrateInstance
  • lxd/migrate/instance: Change connection stream helper functions to return error
  • lxd/instance: Updates usage of migration connection stream helper functions
  • lxd/migrate: Log push mode on source
  • lxd/migrate/instance: Only wait for control connection to be established in top level migration subsystem
  • lxd/instance/drivers/driver/lxc: Wait for essential connections in MigrateSend and MigrateReceieve
  • lxd/instance/drivers/driver/qemu: Wait for essential connections in MigrateSend and MigrateReceieve
  • lxd/instance/drivers/driver/qemu: Remove unnecessary variable defintion in MigrateSend
  • lxd/instance/drivers/driver/qemu: Separate checkpoint restore from restoreState into restoreStateHandle
  • lxd/instance/drivers/driver/qemu: Separate checkpoint save from saveState into saveStateHandle
  • lxd/instance/drivers/driver/qemu: Update saveState and restoreState to support restoring from live migration handle
  • lxd/instance/drivers/load: Adds global temporary instance reference storage
  • lxd/instance/drivers/driver/common: Adds volatileSetPersistDisable
  • lxd/migration: Update protobuf version
  • lxd/migration: Adds CRIUType_VM_QEMU protobuf type
  • lxd/storage/drivers/driver/types: Adds LiveMigrationQEMU to Info struct
  • lxd/storage/drivers/driver/ceph: Enable LiveMigrationQEMU
  • lxd/instance/drivers/driver/qemu: Add support for using an existing instance reference in getMonitorEventHandler stop hook handler
  • lxd/instance/drivers/driver/qemu: Add support shared remote storage live migration in MigrateSend and MigrateReceive
  • drivers: Add function loopDeviceSetCapacity
  • zfs: Allow growing pool size
  • btrfs: Allow growing pool size
  • lvm: Allow growing pool size
  • storage: Prevent shrinking storage pools
  • test: Test storage pool resize
  • api: Add storage_pool_resize API extension
  • doc: Update storage pool resize
  • doc: Update description of storage pool size key
  • lxd/instance/drivers/qmp/monitor: Remove whitespace
  • lxd/instance/drivers/qmp/commands: Don't wait for initial check in MigrateIncoming
  • lxd/instance/drivers/qmp/commands: Split Migrate into MigrateWait
  • lxd/instance/drivers/qmp/commands: Fix revert in AddBlockDevice
  • lxd/instance/drivers/qmp/commands: Remove invalid comment in RemoveBlockDevice
  • lxd/instance/drivers/qmp/commands: Remove unnecessary disconnected checks
  • lxd/instance/drivers/qmp/commands: Comment endings
  • lxd/instance/drivers/qmp/commands: Simplify CloseFile by using m.run
  • lxd/instance/drivers/qmp/commands: Updates SendFileWithFDSet to return a pointer to AddFdInfo
  • lxd/instance/drivers/driver/qemu: Updates saveState to only support saving to state file
  • lxd/instance/drivers/driver/qemu: Move live state transfer logic into MigrateSend
  • api: Adds migration_vm_live extension
  • lxd/storage/backend/lxd: Adds info log about freezing instance during migration
  • lxd/instance/drivers/qmp/commands: Adds live migration related functions
  • lxd/apparmor/instance/qemu: Allow qemu to use abstract unix sockets
  • lxd/storage/drivers: Removes LiveMigrationQEMU
  • lxd/instance/drivers/driver/qemu: Improve errors in start
  • lxd/instance/drivers/driver/qemu: Consider a VM in postmigrate status as api.Frozen
  • lxd/instance/drivers/driver/qemu: Allow a frozen VM to be forcefully stopped
  • lxd/instance/drivers/driver/qemu: Improve comment on saveStateHandle
  • lxd/instance/drivers/driver/qemu: Add config validation check to MigrateSend
  • lxc/network: Add an example to create
  • i18n: Update translation templates
  • doc/projects: draft new structure
  • doc/projects: move existing content
  • doc/projects: clean up "About projects"
  • doc/projects: add "How to create and configure projects"
  • doc/projects: add "How to work with different projects"
  • doc/projects: clean up "Project configuration"
  • doc/server: fix copy&paste error
  • doc/projects: add "How to confine projects to specific users"
  • lxc/cluster: Don't allow both arg and flag name on add
  • i18n: Update translation templates
  • lxd/instance/drivers/driver/qemu: Adds non-shared storage live migration support
  • lxd/instance/drivers/qmp/commands: Comment typo
  • lxd/instance/drivers/qmp/commands: Allow cancellation of MigrateIncoming
  • lxd/instance/drivers/driver/qemu: Cancel restoreStateHandle in restoreState when remote connection is closed
  • lxd/instance/drivers/driver/qemu: Fix migration block device cleanup on error in migrateSendLive
  • doc: add links to YouTube videos
  • lxd/storage/drivers/driver/zfs/volumes: Don't ascertain current volmode status for block backed volumes twice in UnmountVolume
  • lxd/storage/drivers/driver/zfs/volumes: Avoid double caching VM volumes in the ARC cache
  • lxd/storage/drivers/driver/zfs/volumes: Fix block volumes not being deactivated
  • lxd/device/nic/ovn: Improve same instance multi-NIC DNS name conflict error in checkAddressConflict
  • lxd/device/nic/bridged: Improve same instance multi-NIC DNS name conflict error in checkAddressConflict
  • api: Adds ovn_nic_nesting extension
  • doc: Adds nested and vlan properties to the ovn NIC
  • lxd/network/openvswitch/ovn: Add nested VLAN port support OVNSwitchPortOpts and LogicalSwitchPortAdd
  • lxd/network/driver/ovn: Add nested VLAN port support to InstanceDevicePortStart
  • lxd/device/nic/ovn: Adds validation for nested and vlan combination settings
  • lxd/device/nic/ovn: Don't perform DNS name conflict checks on nested NICs in checkAddressConflict
  • lxd/device/nic/ovn: Add support for nested VLAN ports
  • lxd/auth/candid: Move candid to own package
  • client: Move candid to own file
  • api: Add oidc extension
  • lxd/auth/oidc: Add new package
  • lxd/cluster/config: Add OIDC config keys
  • lxd/daemon: Add OpenID Connect support
  • client: Add support for OIDC
  • lxc: Add support for OIDC
  • doc: Add OIDC subsection
  • doc: Add OpenID and OIDC to sphinx wordlist
  • tests: Update godeps.list
  • gomod: Update dependencies
  • i18n: Update translation templates
  • lxd/device/device/utils/network: Improve errors in networkSRIOVSetupVF
  • lxd/device/device/utils/network: Use combined probe and interface wait via networkPCIBindWaitInterface
  • lxd/network/network/utils: Removes unused InterfaceBindWait
  • lxd/network/network/utils/sriov: Split SRIOVFindRepresentorPort into its own separate function
  • lxd/device/nic/ovn: Improve errors in Start
  • lxd/device/nic/ovn: Clean up allocated VF on failure in Start
  • lxd/device/nic/ovn: Remove representor port from integration bridge when using acceleration=sriov
  • lxd/device/nic/ovn: Fix VF interface cleanup on Stop when using acceleration=sriov
  • gomod: Update dependencies
  • i18n: Update translations from weblate
  • lxd/metrics: Don't duplicate entries
  • lxd/metrics: Also cache empty projects
  • lxd/instance/qemu: Only use KVM mode for feature detection on X86
  • lxc/launch: Extend examples
  • i18n: Update translations
  • doc/cheat-sheet: update with more markup
  • api: Adds network_ovn_l3only extension
  • lxd/network/openvswitch/ovn: Support indicating netmask in DHCPv4 options
  • lxd/network/openvswitch/ovn: Add Discard support to LogicalRouterRouteAdd
  • lxd/network/network/utils: Adds IPToNet function
  • lxd/network/driver/ovn: Add l3only mode
  • doc: Adds l3only settings to ovn network
  • doc/authentication: mention that RBAC is covered by Ubuntu Pro
  • doc/footer: add community links
  • lxd/response: Add support for compression
  • lxd/metrics: Add compression support
  • lxd/ip: Add utility functions for vDPA device create/list/delete
  • api: Add the ovn_nic_acceleration_vdpa extension
  • shared/api: Add vDPA net card to resources API
  • doc/rest-api: Refresh swagger YAML
  • lxd/resources: Expose VDPA to the resources API
  • lxd/device/nic: Add support for vDPA in OVN NIC device
  • lxd/instance/qemu: Add vDPA QEMU parameters to create net device
  • doc/reference: Add VDPA related options
  • gomod: Update dependencies
  • i18n: Update translations from weblate

試用環境

この新しい LXD リリースは私たちの デモサービス で利用できます。

ダウンロード

このリリースの tarball は ダウンロードページ から取得できます。

ビルド済みバイナリーは次のようにして使えます:

  • Linux: snap install lxd
  • MacOS: brew install lxc
  • Windows: choco install lxc

LXD 5.12 リリースのお知らせ

20th of March 2023

はじめに

LXD チームは LXD 5.12 のリリースをお知らせできることにとてもワクワクしています!

このリリースには、特にストレージとインスタンスのマイグレーションに関係するたくさんの修正が含まれています。
これらの修正に加えて、3 つの小さな、しかしかなり便利な新機能も含まれています。

Enjoy!

新機能とハイライト

ストレージ作成時のデバイスのワイプ

ストレージプールを作成する前に、LXD に source デバイスをワイプするように指示できるようになりました。これは、間違った source 値を設定すると、LXD がそのディスクのヘッダーがワイプしてしまうことになるので、最新の注意を払って使用する必要があります。

これは、すべてのディスクが管理され、この操作が安全に実行できる MicroCloud で使用するために追加しました。他のユースケースでは、この機能を使用する前には、ディスク上に必要なデータが存在する可能性がないことを確認する必要があります。

この機能を使うには、ストレージプールの作成時に source.wipe=true を指定するだけです。

VM Generation ID

LXD に VM Generation ID(VM 世代 ID)が実装されました。

この機能は x86_64 の VM で利用できる機能です。ゲストが消費し、起動時に使用する UUID との比較ができる UUID を LXD が公開します。値に変化があれば、ゲストが以前の状態に復元されたことを示します。そして、乱数生成器のような気密性の高い暗号関数を再度シードする必要があることを示します。

LXD では、VM Generation ID の初期値は VM の UUID と同じです。
VM Generation ID は、VM の UUID と同じリセットルールに従います。スナップショットのリストアは VM Generation ID のリセットを引き起こしますが、インスタンスの UUID は同じままです。

ユーザーは、この機能については何もする必要はありません。ゲスト OS が使うかもしれないし、使わないかもしれない、追加のセキュリティ機能です。この機能は、機能をサポートするアーキテクチャー上のすべての LXD VM に対して、デフォルトで実行されます。

VM のブロックキャッシュモード

新しいディスクデバイスの設定オプション、io.cache を導入しました。
このオプションは、仮想マシンのディスクに対するキャッシュの動作をコントロールするために使用できます。

デフォルト値(none)は、LXD はキャッシュを設定せず、基礎となるストレージプールがサポートしている場合はダイレクト I/O を使用するように設定します。代わりに、writeback を使用すると、書き込みをキャッシュし、ゲストがフラッシュ要求を送ったときにバッキングプールにそれらをフラッシュするリクエストを送ります。最後のオプションは unsafe で、writeback と同じですが、ディスクにキャッシュをフラッシュするゲストのリクエストを無視します。

すべての変更点(翻訳なし)

このリリースでの完全な変更点のリストは次の通りです:

すべてのChangeLogを見る
  • lxd/storage/drivers/generic/vfs: Improve logging in genericVFSCreateVolumeFromMigration
  • lxd/migrate/instance: Improve migrationSourceWs errors
  • lxd/migrate/instance: Improve migrationSink errors and logging
  • lxd/migrate/storage/volumes: Improve migrationSink errors
  • lxd/operations: Improves operationWebsocketGet error
  • lxd/instance/snapshot: Fix wrapping and quoting of errors in snapshotPost
  • lxd/migrate: Improve errors in {migrationSourceWs,migrationSink}.Connect
  • lxd/migrate/instance: Clean up operation on failure
  • lxd/main/forkmigrate: Improve error in cmdForkmigrate
  • lxd/instance/drivers/driver/common: Allow onStopOperationSetup to inherit Start operation
  • lxd/instance/drivers/driver/common: Adds validateStartup function
  • lxd/instance/drivers/driver/qemu: Call d.common.validateStartup from validateStartup
  • lxd/instance/drivers: d.validateStartup usage
  • lxd/instance: Removes unused SaveConfigFile functions
  • lxd/migrate/instance: Update checkForPreDumpSupport to not depend on liblxc
  • lxd/instance/instance/interface: Adds operation lock to CriuMigrationArgs
  • lxd/instance/drivers/driver/lxc: Adds reverter to initLXC
  • lxd/instance/drivers/driver/lxc: Call d.UpdateBackupFile from startCommon
  • lxd/instance/drivers/driver/lxc: Comment endings
  • lxd/instance/drivers/driver/lxc: Simplify ctx var creation in Start
  • lxd/instance/drivers/driver/lxc: Rework the way Start calls Migrate when doing stateful start
  • lxd/instance/drivers/driver/lxc: Rework Stop to fix stateful stop
  • lxd/instance/drivers/driver/lxc: Rework Snapshot to fix stateful snapshots
  • lxd/instance/drivers/driver/lxc: Cleanup Restore
  • lxd/instance/drivers/driver/lxc: Removes unused liblxc.MIGRATE_FEATURE_CHECK check
  • lxd/instance/drivers/driver/lxc: Remove UpdateBackupFile call from Migrate when restoring stateful checkpoint
  • lxd/instance/drivers/driver/lxc: Fix liblxc initialisation in Migrate
  • client: Don't indicate live migration when copying snapshots in CopyInstanceSnapshot
  • test: Update CRIU tests
  • lxd/instance: Improve stateful copy error message
  • Move C and therefore CGO out of shared package
  • doc: fix in documentation for physical NIC with the network option
  • doc: add a page about troubleshooting failing instances
  • doc/devices/disk: add video link and clarify content
  • doc/devices/unix-*: add link to YouTube video
  • doc/devices/unix-*: add title for YouTube video
  • Move socket to linux
  • doc/storage: Document zfs.block_mode
  • lxd/instance/drivers/driver/lxc: Prevent panic in cgroup if liblxc not initialized
  • lxd/instance/drivers/driver/lxc: Adds is running check to Metrics
  • lxd/api/metrics: Detect and ignore ErrInstanceIsStopped error from inst.Metrics()
  • lxd/instance/drivers/driver/lxc: Only intialise cgroup reader/writer when needed
  • lxc/query: Also handle json UnmarshalTypeError
  • lxc/query: Validate actions
  • i18n: Update translation templates
  • lxd/device/nic/ipvlan: Configure host-side routes and neighbour proxy entries with LXD
  • lxd/instances: Fix incorrect alias path in instanceSFTPCmd
  • lxd/instances/get: Correct comment terminology and endings
  • lxd/instances/get: Use if/else if for clarity
  • lxd/instances/get: Lose unnecessary recursionStr var
  • lxd/instances/get: Fix filtering in non-recursive mode
  • lxd/instance/filter: Removes unused function Filter
  • doc/clustering: add link to scriptlet specification
  • doc/storage: add link to ZFS block mode spec
  • doc/projects: add link to projects tutorial
  • lxd/db/instances: Add Instance type and rework GetProjectAndInstanceNamesByNodeAddress into GetInstancesByMemberAddress to return them
  • lxd/db/instances: Remove unused GetProjectInstanceToNodeMap function
  • lxd/instances/get: Reworks doInstancesGet to use tx.GetInstancesByMemberAddress
  • lxd/instances: Update instanceLoadNodeProjectAll to accept a context
  • lxd/scriptlet/starlark: No need to check all map key types
  • lxd/scriptlet/starlark: Use predictable ordering of Starlark dict keys
  • lxd/instances/get: Limit the scope of localInstancesByID
  • lxd/instances/get: Keep recursion and clauses logic together in doInstancesGet
  • lxd/instances/get: Sort the result by project and then name in doInstancesGet
  • lxd/instances/get: Simplify non-recursive URL output in doInstancesGet
  • doc/explanation/clustering: Show use of fail() in instance placement scriptlet
  • lxd/storage/backend/lxd: Pass volume config into SetVolumeQuota in SetInstanceQuota
  • lxd/storage/drivers/driver/ceph/volumes: Log volume name during mount
  • lxd/storage/drivers/driver/lvm/volumes: Log volume name during mount
  • lxd/storage/drivers/zfs: don't force atime to on
  • lxd/storage/drivers/driver/zfs/volumes: Adds activateVolume and deactiveVolume functions
  • lxd/storage/drivers/driver/zfs/volumes: Improve mount and unmount logging consistency
  • lxc/storage/drivers/driver/zfs/volumes: Only call InUse once during SetVolumeQuota
  • lxd/storage/drivers/driver/zfs/volumes: Fix block mode filesystem volume resize in SetVolumeQuota
  • test: Update zfs block mode tests
  • lxd-agent: Retry getting vsock client
  • test: test overlapping addresses between proxy device and network forward
  • instance: Check that there is no collisions between proxy device and a network fwd listenAddr
  • refactor: create ProxyParseAddr as part of the network pkg
  • refactor: update ProxyParseAddr references
  • refactor: remove old ProxyParseAddr func in device pkg
  • doc/debugging: remove information about lxd --debug
  • doc/troubleshooting: move example for instance troubleshooting
  • lxd/ip/link: Add support for applying Link setings atomically at Add time
  • lxd-agent/network: ip.Link usage in reconfigureNetworkInterfaces
  • lxd/device/device/utils/network: ip.Link usage in NetworkSetDevMTU
  • lxd/device/device/utils/network: ip.Link usage in networkSRIOVSetupContainerVFNIC
  • lxd/device/infiniband/physical: ip.Link usage in Start
  • lxd/device/infiniband/sriov: ip.Link usage in startContainer
  • lxd/device/nic/macvlan: ip.Link usage in Start
  • lxd/device/nic/physical: ip.Link usage in Start
  • lxd/network/driver/bridge: ip.Link usage for setting MTU
  • lxd/network/driver/physical: ip.Link usage for setting MTU
  • lxd/ip/link/veth: Restructure Veth type to replace PeerName with Peer Link field
  • lxd/network/driver/ovn: ip.Link usage for setting MTU
  • lxd/network/driver/ovn: ip.Veth Peer usage
  • lxd/device/device/utils/network: Reworks networkCreateVethPair to use ip.Veth settings
  • lxd/device/nic/macvlan: Update macvlan to apply settings to host interface atomically
  • lxd/device/device/utils/network: Updates networkCreateTap to support queue.tx.length setting
  • lxd/network/openvswitch/ovs: Update BridgeAdd to accept MAC and MTU settings
  • lxd/network/driver/ovn: ovs.BridgeAdd usage
  • lxd/network/driver/bridge: Create and apply bridge interface settings atomically
  • lxd: Indent swagger docs to indicate preformatted blocks.
  • lxd/sys: Updates comments to ensure they are properly gofmt'd.
  • lxd/storage: Updates comments to ensure they are properly gofmt'd.
  • lxd/storage/drivers: Updates comments to ensure they are properly gofmt'd.
  • lxd/node: Updates comments to ensure they are properly gofmt'd.
  • lxd/firewall/drivers: Updates comments to ensure they are properly gofmt'd.
  • lxd/endpoints: Updates comments to ensure they are properly gofmt'd.
  • lxd/db/schema: Updates comments to ensure they are properly gofmt'd.
  • lxd/db/operationtype: Updates comments to ensure they are properly gofmt'd.
  • lxd/db: Updates comments to ensure they are properly gofmt'd.
  • lxd/ip/link: Update SetAddress to take net.HardwareAddr
  • lxd/device: link.SetAddress usage
  • lxd/network/driver/bridge: bridge.SetAddress usage
  • lxd/storage/backend/lxd: No need to activate VM's block volume in UpdateInstanceBackupFile
  • lxd/device/none: Allow hot plugging for VMs
  • lxd/instance/drivers/driver/qemu: Don't collect metrics unless VM is running
  • client/lxd: Handle error responses from LXD in rawWebsocket
  • lxd-agent/server: Correct error handling in createCmd
  • lxd/daemon: Correct error handling in createCmd
  • lxd/storage/drivers: Match ceph keyring lookup logic
  • lxd/storage/s3/types: Adds ErrorInvalidRequest constant
  • lxd/api: Fixes storageBucketsServer to parse URL to properly extract bucket name from path
  • lxd/storage/zfs: Don't force the zpool creation
  • api: storage_pool_source_wipe
  • lxd/storage: Add support for source.wipe
  • doc: add sphinx-copybutton extension
  • doc: fix documentation warnings
  • doc/cloud-init: move content around
  • doc/cloud-init: add information from Advanced Guide on website
  • instance: add support for VM generation ID
  • test: test if the instance UUID is different after restoring its snapshot
  • zfs: Regenerate UUID on optimized migration
  • api: Add zfs_block_mode API extension
  • lxd/main_interactive: Tweak LVM thin pool error
  • doc/faq: provide the path to the client.crt for snap users too
  • doc/authentication: provide the path to the client config for snap users too
  • doc/debugging: mention path for snap users
  • doc: use RFC5737 (reserved for doc) IPv4 instead of RFC1918
  • Parameterize dig and explain origin of the port
  • doc/cloud-init: clean up existing documentation
  • doc/faq: add a section explaining where lxc stores its config
  • lxd/storage/zfs: Also pass -f to zpool create on source.wipe=true
  • lxd/storage/drivers/zfs: remove redundant ZFS version detection
  • lxd/storage/drivers/driver/lvm: Improve error in Create
  • lxd/storage/drivers/driver/common: Adds filesystemFreeze function
  • lxd/storage/drivers/driver/ceph/volumes: Updates CreateVolumeSnapshot to use filesystemFreeze
  • lxd/storage/drivers/zfs/volumes: Freeze source filesystem volume when taking temporary snapshot in CreateVolumeFromCopy
  • lxd: tweak do_move_forkmount()
  • doc/installing: add link to side-loading tutorial
  • doc/lxd.benchmark: fix instructions for delete command
  • test: Use per-instance storage pool VG for clustering tests
  • doc/devices/tpm: add video link and general explanation
  • GitHub actions: cancel running tests
  • shared/network: Comments
  • lxd/apparmor: Don't use deprecated io/ioutil
  • lxd/instance/drivers/driver/lxc: Use internal migrate function
  • lxd/instance/instance/interface: Split Migrate into MigrateSend and MigrateReceive
  • lxd/instance/drivers/driver/qemu: Implement MigrateSend and MigrateReceive
  • lxd/instance/drivers/driver/lxc: Implement MigrateSend and MigrateReceive
  • lxd/migrate/instance: Use MigrateSend and MigrateReceive
  • lxd/apparmor: fix AppArmor instance_qemu profile
  • lxd/instance/instance/interface: Update MigrateSend to accept MigrateSendArgs
  • lxd/instance/instance/utils: Move SnapshotToProtobuf into instance package
  • lxd/instance/drivers/driver/lxc: Move container migration send logic into lxc driver
  • lxd/instance/drivers/driver/qemu: Move VM migration send logic into qemu driver
  • lxd/migrate/instance: Removes container migration logic from migrationSourceWs
  • shared/network: Make sure subsequent reads after close block until next message in WebsocketIO
  • lxd/instance/drivers/driver/qemu: Fix stateful error message in Snapshot
  • lxd/instance/instance/utils: Adds SnapshotProtobufToInstanceArgs function
  • lxd/migration/utils: Adds ControlResponse type
  • lxd/migrate: migration.ControlResponse usage
  • lxd/migrate/storage/volumes: migration.ControlResponse usage
  • lxd/migrate: Removes unused migrationControlResponse type
  • lxd/storage/migration: Removes unused snapshotProtobufToInstanceArgs
  • lxd/instance/instance/interface: Update MigrateReceive to accept MigrateReceiveArgs
  • lxd/instance/drivers/driver/lxc: Move container migration receive logic into lxc driver
  • lxd/instance/drivers/driver/qemu: Adds start function
  • lxd/instance/drivers/driver/qemu: Move VM migration receive logic into qemu driver
  • lxd/storage: Removes unused resetContainerDiskIdmap function
  • lxd/migrate/instance: Removes instance type specific migration receive logic from migrationSink
  • lxd/instances/post: Persist operation for duration of createFromMigration
  • lxd/device/disk: Use explicit args and pass charset to mkisofs in generateVMConfigDrive
  • doc: enable an extension for terminal output
  • doc: add terminal output where suitable
  • test: Shorten boot.host_shutdown_timeout in clustering_evacuation tests
  • Revert "instance: add support for VM generation ID"
  • test: UUID should remain the same after back/snap restore
  • test: UUID should be the same after instance move to other server
  • lxd/migrate: Add send timeout to send function
  • lxd/migrate/instance: Add error sending synchronisation in migrationSourceWs.Do
  • lxd/instance/drivers/driver/qemu: Improve migration protocol error handling in MigrateReceive
  • lxd/instance/drivers/driver/lxc: Improve migration protocol error handling in MigrateReceive
  • lxd/migrate/instance: Removes control socket error response from migrationSink.Do
  • lxd/instance/qemu: Fix SMP on s390x
  • instance: Add volatile.uuid.generation to VM instance config
  • lxd/devices: Updates deviceTaskBalance to check the container's InitPID as running indicator
  • test: check generation UUID with snap/backup restore
  • lxd/instances/get: Fix clustered instances list
  • doc: Add volatile.uuid.generation and instance_generation_id extension to doc
  • lxd/shared/version: Add the instance_generation_id API extension
  • zfs: Ensure snapdev=visible is set correctly
  • zfs: Add private mountVolumeSnapshot function
  • zfs: Add "noload" mount option for ext4 mounts
  • zfs: Always mount volume snapshots read-only
  • zfs: Use mountVolumeSnapshot in readonlySnapshot
  • zfs: Regenerate UUID on volume restore
  • test: Test different filesystems for zfs block mode
  • zfs: Properly clean up clone
  • lxd/migrate: Unexport migrationSinkArgs
  • lxd/instances/post: migrationSinkArgs usage
  • lxd/migrate/instance: Add live field to logging
  • lxd/instance/drivers: Clarify logging of control response sending
  • lxd/migrate: Adds 30s send timeout to disconnect
  • doc/devices/usb: add link to video and some explanation
  • doc/images: link to Discourse post on LXD image servers
  • lxd/instance/instance/interface: Adds Disconnect function to MigrateArgs
  • lxd/migrate/instance: Setup Disconnect function
  • lxd/instance/drivers: Disconnect all sockets on MigrateReceieve error
  • lxd/instances/post: Fix incorrect redirection logic in instancesPost
  • lxd/instance/drivers: Update comments for accuracy
  • lxd/instances/post: Update comment for accuracy
  • lxd/instance/instance/interface: Rename DataConn and LiveConn to FilesystemConn and StateConn
  • lxd: Replace criuConn and dataConn references with stateConn and filesystemConn
  • shared/api/migration: Define the migration secret names used in the migration protocol
  • client: api.SecretName* usage
  • lxc-to-lxd/utils: api.SecretName* usage
  • lxd-agent/exec: api.SecretName* usage
  • lxd-migrate/utils: api.SecretName* usage
  • lxd: api.SecretName* usage
  • lxd/instance/drivers/driver/lxc: Use correct constant CRIUType_NONE in comment
  • lxd/migrate: Fix panic in migrationFields.send
  • gomod: Adds golang.org/x/sync/errgroup
  • lxd/instance/drivers/driver/lxc: Reworks MigrateSend to use errgroup and separate control monitor routine
  • lxd/instance/drivers/driver/qemu: Reworks MigrateSend to use errgroup separate control monitor routine
  • lxd/instance/drivers/driver/lxc: Rework MigrateReceive to use errgroup
  • lxd/instance/drivers/driver/qemu: Rework MigrateReceive to use errgroup
  • lxd/migrate/instance: Removes end control message exchange in migrationSourceWs.Do
  • lxd/instance/qemu: Default to writeback for RBD
  • api: disk_io_cache
  • shared/simplestream: Don't write zero length cache files in cachedDownload
  • doc: enable the extension for config options
  • doc: add a cheat sheet for config options
  • lxd/device/disk: Add io.mode
  • lxd/instance/qemu: Add support for io.cache
  • doc: Add io.cache to disk devices
  • lxd/storage/drivers/driver/zfs/volumes: Add cleanup in createVolumeFromMigrationOptimized
  • lxd/instance/drivers/driver/lxc: Fix possible panic on error in MigrateSend
  • lxd/storage/backend/lxd: Allow migrating running VMs stateless using rsync+dd when specifying --allow-inconsistent mode
  • lxd/instance/instance/utils: Return error when failing to delete instance snapshot in DeleteSnapshots
  • lxd/migrate/storage/volumes: Fix incorrect error message in newStorageMigrationSource
  • zfs: Ensure source FS is synced before migrating
  • lxd/db/instances: Updates UpdateInstanceNode to accept poolID
  • lxd/instance/instance/interface: Adds ClusterSameNameMove hint field to MigrateReceiveArgs
  • lxd/instance/post: Update internalClusterInstanceMovedPost to support deleting local instance volumes
  • lxd/instance/post: Reworks instancePostClusteringMigrate to use full migration protocol
  • lxd/instance/post: tx.UpdateInstanceNode usage
  • lxd/instance/post: instancePostClusteringMigrate usage
  • lxd/migrate: Adds cluster move hint to migration sink
  • lxd/instances/post: Update createFromMigration to use cluster notification as instance move hint
  • lxd/storage/backend/lxd: Update DeleteInstance to only check for existing snapshot volume DB records
  • lxd/instance/drivers/driver/lxc: Update MigrateReceive to support cluster moves
  • lxd/instance/drivers/driver/qemu: Update MigrateReceive to support cluster moves
  • lxd/instance/post: instancePostClusteringMigrate
  • test: Update clustering containers tests to check for live migration support
  • lxd/migrate: Improve error messages
  • lxd/migrate: Prevent reconnect attempts in migrationSourceWs.Connect and migrationSink.Connect
  • lxd/migrate: Prevent panics if allConnected is closed multiple times by using a Canceller
  • lxd/instance/drivers/driver/qemu: Improve operation cleanup and error reporting
  • lxd/instance/drivers/qmp/command: Differentiate errors
  • lxd/network: disable dnsmasq negative query cache
  • Documentation: fixed typo
  • gomod: Update dependencies
  • i18n: Update translations from weblate

試用環境

この新しい LXD リリースは私たちの デモサービス で利用できます。

ダウンロード

このリリースの tarball は ダウンロードページ から取得できます。

ビルド済みバイナリーは次のようにして使えます:

  • Linux: snap install lxd
  • MacOS: brew install lxc
  • Windows: choco install lxc

LXD 5.11 リリースのお知らせ

17th of February 2023

はじめに

LXD チームは LXD 5.11 のリリースをお知らせできることにとてもワクワクしています!

このリリースは、インスタンス配置スクリプトレット、ZFS の zvol サポートといった、いくつかの大きなハイライトとなる機能と、その他いくつかの小さな機能やパフォーマンス改善、バグフィックスなどが含まれています。

Enjoy!

新機能とハイライト

インスタンス配置スクリプトレット

クラスターユーザーからの共通のリクエストとして、LXD のデフォルトの配置アルゴリズムの代わりになるより良い方法を提供してほしいというリクエストがありました。

デフォルトでは、LXD はすべての適切なクラスターメンバーをすべて調べ、ホストしているインスタンス数がもっとも少ないメンバーを選択します。インスタンスがコンテナであるのか VM であるのか、現在稼働しているのかしていないのか、どれだけのリソースを持っているのか、その時点でどれくらいのリソースが使われているのかは気にしません。

クラスターの配置についてはクラスターの数ほど多くの意見があるため、非常に柔軟でありながら、高速で信頼性の高いものを採用することにしました。
すべての人のニーズに合うかどうかわからないかなり複雑な内部スケジューラーや、ダウンする可能性がある外部スケジューラーの代わりに、LXD のための新しいものを採用しました。

スクリプトの登場です。スクリプトレットは名前のとおり小さなスクリプトです。
LXD の場合、厳密には Starlark スクリプトを使っています。これは Python の非常に限定された方言です。これらのスクリプトは直接アプリケーションである LXD にロードされます。そしていくつかのデータや呼び出す関数を提供できます。

重要なことは、このスクリプトレットはローカルデータにアクセスしたり、ネットワークにアクセスしたり、複雑な時間を消費するようなこと(ループなど)は実行できないということです。

LXD では、新たに instances.placement.scriptlet という設定キーを新たに導入しました。ここに Starlark スクリプトレットを設定できます。LXD がインスタンスを配置する必要があるときは常にこのスクリプトレットを呼び出し、候補となるクラスターメンバーのリスト、インスタンス作成リクエスト、クラスターメンバーについての追加情報を取得するのに使えるいくつかの関数を提供します。

仕様 : https://discuss.linuxcontainers.org/t/lxd-scriptlet-based-instance-placement-scheduler/15728
ドキュメント : https://linuxcontainers.org/lxd/docs/latest/explanation/clustering/#instance-placement-scriptlet

ZFS プールのブロックストレージモード

5 年以上前からの要望ですが、Docker や Android のおかげで最近注目されたのが、ZFS をストレージバックエンドとして使いながら、ZFS データセットにデータを保存するのではなく、ZFS ボリュームとして使いたいという話です。

これにより、LVM や Ceph に似たような体験を、非常に高性能な ZFS バックエンド上で実現できます。いくつかの特定のカスタムボリュームでは zvol を使い、その他のデータではデータセットを使うというように、混在して使用することもできます。

これは Android コンテナや Docker ストレージの両方のケースで興味深いことです。どちらの場合でも、ZFS はデータを保存する方法と互換性がありません。この機能を使って、Android コンテナについてはストレージモードを zvol に切り替え、期待される ext4 ファイルシステム上で実行できるようになります。そして、Docker では /var/lib/docker として使う ext4 としてフォーマットしたカスタムストレージボリュームとして切り出し、より速い overlay2 vfs ドライバーが使用できるようになります。

仕様 : https://discuss.linuxcontainers.org/t/lxd-zfs-block-mode/15872
ドキュメント : https://linuxcontainers.org/lxd/docs/latest/reference/storage_zfs/#storage-volume-configuration

lxc cluster info コマンド

先に述べた配置スクリプトレットの作業の一部として、クラスターメンバーの負荷情報を取得する簡単な方法が必要になりました。

これを内部関数としてだけでなく、API 経由でも利用できるようにすることにしました。そして CLI コマンドも準備しました。

stgraber@dakara:~$ lxc cluster info s-shf-cluster:athos
sysinfo:
  uptime: 30219
  load_averages:
  - 12.13
  - 9.77
  - 9.62
  total_ram: 676309450752
  free_ram: 319631790080
  shared_ram: 123550392320
  buffered_ram: 32219648000
  total_swap: 8589926400
  free_swap: 8589926400
  processes: 4330
storage_pools:
  hdd:
    space:
      used: 23882062033615
      total: 30893314601679
  ssd:
    space:
      used: 2452640672159
      total: 10217284610463

システム負荷、メモリーやディスクの使用量、プロセス数などかなりの生データを提供します。

管理された physical ネットワークをインスタンスにアタッチする機能のサポート

physical な LXD で管理されたネットワークは、最初は OVN ネットワークのアップリンクとして提供するために導入しました。しかし、LXD が物理ネットワークインターフェースへアタッチもサポートしていることを考えると、network プロパティを通してその使用を許可することを許可しない理由はありませんでした。

ドキュメント : https://linuxcontainers.org/lxd/docs/latest/reference/devices_nic/#nic-physical

イメージに関するドキュメントの再作成

我々のドキュメントの見直しを続け、このリリースではイメージに関するドキュメントを、他のドキュメントに合わせるように再構成しました。

https://linuxcontainers.org/lxd/docs/latest/images/

すべての変更点(翻訳なし)

このリリースでの完全な変更点のリストは次の通りです:

すべてのChangeLogを見る
  • test: Fix race against snapshot prune task in test_storage_volume_snapshots
  • lxd/db/storage/pools: Adds GetStoragePools in the style of GetNetworkForwards
  • lxd/db/storage/pools: Update GetStoragePoolInAnyState and GetStoragePool to use GetStoragePools
  • lxd/cluster/resolve: Update ResolveTarget to avoid starting transaction if target is local server
  • lxd/state/state: Adds StartTime to State
  • lxd/response: Updates forwardedResponseToNode and forwardedResponseIfTargetIsRemote to accept state
  • lxd/api/1.0: forwardedResponseIfTargetIsRemote usage
  • lxd/api/metrics: forwardedResponseIfTargetIsRemote usage
  • lxd/api/cluster: clusterNodeStatePost usage of forwardedResponseToNode
  • lxd/network/forwards: forwardedResponseIfTargetIsRemote usage
  • lxd/network/load/balancers: forwardedResponseIfTargetIsRemote usage
  • lxd/network/peer: forwardedResponseIfTargetIsRemote usage
  • lxd/networks: forwardedResponseIfTargetIsRemote usage
  • lxd/resources: forwardedResponseIfTargetIsRemote usage
  • lxd/storage/buckets: forwardedResponseIfTargetIsRemote usage
  • lxd/storage/pools: forwardedResponseIfTargetIsRemote usage
  • lxd/storage/volumes: forwardedResponseIfTargetIsRemote usage
  • lxd/storage/volumes/backup: forwardedResponseIfTargetIsRemote usage
  • lxd/storage/volumes/snapshots: forwardedResponseIfTargetIsRemote usage
  • lxd/acme: Reduce calls to d.State()
  • lxd/api: Reduce calls to d.State()
  • lxd/api/1.0: Reduce calls to d.State()
  • lxd/api/cluster: Reduce calls to d.State()
  • lxd/api/internal: Reduce calls to d.State()
  • lxd/api/internal/recover: Reduce calls to d.State()
  • lxd/api/metrics: Reduce calls to d.State()
  • lxd/api/project: Reduce calls to d.State()
  • lxd/api/vsock: Reduce calls to d.State()
  • lxd/backup: Reduce calls to d.State()
  • lxd/certificates: Reduce calls to d.State()
  • lxd/daemon: Adds StartTime to State
  • lxd/daemon: Reduce calls to d.State()
  • lxd/daemon/images: Decouple imageOperationLock and ImageDownload from daemon
  • lxd/devlxd: Assign d.State() to own variable
  • lxd/events: Assign d.State() to own variable
  • lxd: Update image functions to accept state.State rather than Daemon
  • lxd/network/forwards: Reduce calls to d.State()
  • lxd/network/load/balancers: Reduce calls to d.State()
  • lxd/network/peer: Reduce calls to d.State()
  • lxd/networks: Reduce calls to d.State()
  • lxd/resources: Reduce calls to d.State()
  • lxd/storage/buckets: Reduce calls to d.State()
  • lxd/storage/pools: Reduce calls to d.State()
  • lxd/storage/volume: Reduce calls to d.State()
  • lxd/storage/volumes/backups: Reduce calls to d.State()
  • lxd/storage/volumes/snapshot: Reduce calls to d.State()
  • doc/ref/devices_nic: Add queue.tx.length
  • lxd: liblxc.HasAPIExtension usage
  • lxd/instance/drivers/driver/lxc: Simplify Shutdown timeout handling
  • api: Adds cluster_member_state extension
  • shared/api: Adds StoragePoolState, ClusterMemberSysInfo and ClusterMemberState struct types
  • lxd/db/storage/pools: Exports StoragePoolCreated and StoragePoolPending constants
  • lxd/db: Storage pool state constant usage
  • lxd/storage/pool/load: Adds LoadByRecord and updates LoadByName to use it
  • lxd/cluster/member/state: Adds MemberState function
  • lxd/api/cluster: Adds clusterNodeStateGet handler
  • client: Adds GetClusterMemberState function
  • doc/rest-api: Refresh swagger YAML
  • lxc/cluster: Adds lxc cluster <member> info command
  • i18n: Update translation templates
  • test: Add basic test for lxc cluster info <member> command
  • lxd/db/images: Use explicit type for each argument in getNodesByImageFingerprint
  • lxd/db/instances: Remove use of c.GetNodeOfflineThreshold in GetProjectAndInstanceNamesByNodeAddress
  • lxd/instances/get: tx.GetProjectAndInstanceNamesByNodeAddress usage
  • lxd/operations: Remove use of tx.GetNodeOfflineThreshold
  • lxd/instances/get: Pass request context to transaction in doInstancesGet
  • lxd/instances/get: Don't pass daemon to doInstancesGet
  • lxd/api: Auto-forward to the UI if accessed from browser
  • lxd/api: Handle UI sub-paths
  • lxd/instances_post: Fix copying profiles during instance copy
  • lxc/migrate: Make live migration error message more helpful
  • doc/clustering: add link to YouTube video about cluster groups
  • Add mipsle and mips64le architecture aliases
  • lxd/cluster/member/state: Fix TotalRAM field in MemberState output
  • lxd/instance/drivers/driver/lxc: Comment typo and spacing
  • shared/util: Update RunCommandCLocale to pass LANGUAGE=en env var
  • doc/images: move out unrelated docs
  • test: Make unix device checks less flaky
  • lxd/api/cluster: Adds evacuateHostShutdownDefaultTimeout constant
  • lxd/api/cluster: Adds instance already stopped detection to restoreClusterMember
  • lxd/instance/drivers/driver/lxc: Switch log level to warn in networkState
  • lxd/instance/operationlock: Add support for never expiring timeouts
  • lxd/instance/drivers/driver/common: Adds more debug logging to onStopOperationSetup
  • lxd/instance/drivers/driver/lxc: Don't wait in liblxc for container to stop in Shutdown
  • lxd/instance/drivers/driver/lxc: Extend operation lock in onStopNS and onStop
  • lxd/instance/drivers/driver/lxc: Don't report intermediate state during ongoing operations
  • lxd/instance/drivers/driver/qemu: Avoid extra go routine to keep operationlock alive in Shutdown
  • lxd/instance/drivers/driver/qemu: Use constants in statusCode
  • lxc/action: Clarify --timeout and --force flags to lxc stop command
  • i18n: Update translation templates
  • drivers: Unify allowed filesystems variable
  • lxd/migration: Remove leftover stats definitions
  • doc/clustering: document lxc cluster info
  • lxd/instance/drivers/driver/qemu: Add QEMUDefaultCPUCores and export QEMUDefaultMemSize constants
  • lxd/storage: Exports DefaultBlockSize constant
  • lxd/api/cluster: Consistent import of github.com/lxc/lxd/lxd/instance/drivers
  • api: Adds instances_placement_scriptlet extension
  • gomod: Adds go.starlark.net/starlark
  • shared/api/scriptlet: Adds InstanceResources type
  • lxd/scriptlet/starlark: Adds StarlarkMarshal function
  • lxd/scriptlet: Adds instance placement scriptlet functions
  • lxd/cluster/config/config: Adds instances.placement.scriptlet global config option
  • lxd/cluster/config/config: Adds InstancesPlacementScriptlet function
  • lxd/api/1.0: Adds handler for loading scriptlet when instances.placement.scriptlet changes
  • lxd/daemon: Load instance placement scriptlet at start up
  • lxd/instances/post: Integrate instance placement scriptlet into instancesPost
  • lxd/api/cluster: Improve errors in evacuateClusterMember
  • lxd/api/cluster: Restructure evacuateClusterMember to accomodate future instance placement scriptlet integration
  • lxd/api/cluster: Integrate instance placement scriptlet into evacuateClusterMember
  • test: Adds instance placement scriptlet tests
  • doc: Rename clustering-assignment to clustering-instance-placement
  • doc: Adds instance placement scriptlet documentation
  • lxd/instance/drivers: Add location to instance creation event.
  • lxd/ip/link: Adds SetAllMulticast function
  • lxd/device/nic/macvlan: Enable all multicast processing on VM macvtap host interface
  • lxd/storage: Add location to local volume creation event.
  • lxd/storage/filesystem: Moves ResolveMountOptions to filesystem package
  • lxd/storage/drivers: filesystem.ResolveMountOptions usage
  • lxd/storage/drivers/utils: Removes unused resolveMountOptions function
  • lxd/device/disk: Fix incorrect splitting of raw.mount.options in createDevice
  • lxd/device/device/utils/disk: Removes readonly argument from DiskMount
  • lxd/device/device/utils/unix: DiskMount usage
  • lxd/instance/drivers/driver/qemu: device.DiskMount usage in Start
  • lxd/device/disk: DiskMount usage in createDevice
  • client: add TransportWrapper to ConnectionArgs
  • test: Update disk device tests to check for mount flag support in raw.mount.options
  • client: fix cast to http.Transport when using TransportWrapper
  • doc/server: bring back doc for net.core.bpf_jit_limit
  • doc/images: draft new structure for the images section
  • doc/images: move content
  • doc/metrics: greatly simplify the cluster's scrape_configs
  • lxd/db/node: s/containers/instances/
  • lxd/db/node/test: s/containers/instances/
  • lxd/db/node/test: s/container/instance/ in comments
  • lxd/backup : update the error message when "backup/index.yaml" can't be found
  • drivers: Add source indicator to Volume
  • storage: Add hasSource option to VolumeDBCreate
  • storage: Update VolumeDBCreate usage
  • lxd/storage/drivers/driver/btrfs/utils: Only check for minimum number of columns in btrfs qgroup show command
  • doc/storage: explain how optimized instance transfer works
  • doc/api: add related link to blog post about the LXD API
  • doc/index: give a better introduction to the online demo
  • doc/architectures: clean up architecture reference
  • lxd: allow IdmappedStorage() to detect filesystems
  • shared/api/scriptlet/instance: Adds InstancePlacement type and reason constants
  • lxd/scriptlet/instance/placement: Updates InstancePlacementRun to accept scriptlet.InstancePlacement argument
  • lxd/scriptlet/instance/placement: Removes unused constants
  • lxd/api/cluster: Avoid calling inst.Project() multiple times
  • lxd/api/cluster: Pass apiScriptlet.InstancePlacement to InstancePlacementRun
  • lxd/api/cluster: instProject.Name usage
  • lxd/instances/post: Pass apiScriptlet.InstancePlacement to InstancePlacementRun
  • test: Updates instance_placement tests for new function signature
  • doc: Updates instance placement scriptlet documentation for new placement function signature
  • lxd: Scriptlet API constant usage
  • lxd/cluster/gateway: Removes unimplemented Snapshot function
  • lxd/api/internal: Avoid calling d.gateway.Snapshot in internalRAFTSnapshot
  • lxd/scriptlet/instance/placement: Tweak error prefix when scriptlet fails
  • doc: use "entity" instead of "object" to avoid confusion
  • doc: use "directory" instead of "folder" for consistency reasons
  • drivers: Add Volume.Clone function
  • test: Updates instance placement tests to show usage of fail() call to end scriptlet with error
  • storage: Use Volume.Clone() in Pool.GetVolume()
  • test: Updates instance placement tests to check for config in embedded struct
  • lxd/scriptlet/starlark: Updates StarlarkMarshal to handle more starlark.Value types
  • lxd/scriptler/starlark: Update StarlarkMarshal to sort map keys
  • lxd/scriptlet/starlark: Update StarlarkMarshal to support anonymous non-struct fields
  • lxd/scriptlet/starlark/test: Adds tests for StarlarkMarshal function
  • doc/images: Clean up "About images"
  • lxd: hotplug mounts
  • Makefile: Immediately fail on lint errors
  • lxd: User friendly error for missing volume.
  • backend_lxd: Pass config when creating instance from backup
  • backend_lxd: Pass config when renaming instances and custom volumes
  • volume: Update IsBlockBacked
  • backend_lxd: Check vol.IsBlockBacked
  • lvm: Fix logging
  • ceph: Set mountFilesystemProbe to true in ListVolumes
  • lvm: Set mountFilesystemProbe to true in ListVolumes
  • storage: Drop call to Volume.SetMountFilesystemProbe
  • doc/images: Clean up "How to use remote images"
  • doc/images: Clean up "Remote image servers"
  • lxd/scriptlet/starlark: Updates StarlarkMarshal to handle multi-level embedded structs
  • client: Allow empty target if storage location is 'none'.
  • lxc/storage_volume: Fixes --destination-server flag when copying between remotes.
  • i18n: Updates translations.
  • lxd/apparmor: fix AppArmor forkproxy profile
  • lxd/db: Remove needless semi-colons in queries
  • lxd/instance/drivers/driver/lxc: s/container/instance/
  • backend_lxd: Handle zvols in EnsureImage
  • zfs: Support block mode
  • test: Add zfs storage tests
  • lxc/migration: Update protobuf with zfs zvol support
  • lxd/migration: Add HeaderZvols feature
  • migration,storage: Check zvol support
  • lxd/scriptlet/starlark: Updates StarlarkMarshal to marshal structs to Starlark objects
  • lxd/scriptlet/starlark/test: Updates StarlarkMarshal tests to account for struct->object conversion
  • test: Updates test_clustering_instance_placement_scriptlet to account for struct->object conversion
  • doc: Updates instance placement scriptlet documentation to account for struct->object conversion
  • lxd/api/1.0: Improve errors
  • lxd/db/images: Removes unused GetExpiredImagesInProject function
  • lxd/images: Reworks pruneExpiredImages to not remove image files/volumes until image is expired in all projects
  • device: managed network support physical nic
  • doc: managed network support physical nic
  • test: managed network support physical nic
  • lxd/instance/drivers/driver/lxc: Remove erroneous empty log error
  • device/disk: Don't use RBD for FS custom volumes
  • cgroup: properly set soft mem limit for cgroup-v2
  • test: Updates image expiry tests to check for proper project handling
  • instance: differentiate msg for creation/deletion of snapshots
  • lxd/storage/backend/lxd: Fixed incorrect logic in EnsureImage that was breaking BTRFS tests
  • lxd/storage/backend/lxd: Improve log message in EnsureImage
  • lxd/storage/backend/lxd: Don't update image volume's description to pool's description in EnsureImage
  • btrfs: Restructure optimized refresh
  • btrfs: Set parent correctly for optimized refresh
  • lxd/db/db/cluster: Fixes incorrect UNIQUE index on name field of networks_zones_records
  • lxd/network/zones/records: Fix zone record management for non-default project zones
  • test: Updates dns zones tests to check for non-default project zone records
  • test: basic: skip seccomp tests if we are under seccomp filter
  • tests: syscall_interception: disable if seccomp filtering is active
  • doc/images: Clean up "Manage images"
  • doc/images: Clean up "Create images"
  • doc/images: Clean up "Copy and import images"
  • doc/images: Clean up "Associate profiles" section
  • doc/images: Clean up "Image format"
  • ceph: Check ceph config file for key
  • lxd/apparmor: Add microceph to ceph paths
  • lxd/db/network/forwards: Updates GetProjectNetworkForwardListenAddressesByUplink to handle forwards defined on uplink network itself
  • lxd/db/network/load/balancers: Updates GetProjectNetworkLoadBalancerListenAddressesByUplink to handle load balancers defined on the uplink network itself
  • lxd/network/driver/common: Adds shared getExternalSubnetInUse function
  • lxd/network/driver/bridge: Updates getExternalSubnetInUse to use common getExternalSubnetInUse function
  • lxd/network/driver/ovn: Updates getExternalSubnetInUse to use n.common.getExternalSubnetInUse
  • lxd/network/driver/ovn: Clarify address conflict errors
  • lxd/main_init_interactive: Remove trust passwords
  • gomod: Update dependencies
  • i18n: Update translations from weblate

試用環境

この新しい LXD リリースは私たちの デモサービス で利用できます。

ダウンロード

このリリースの tarball は ダウンロードページ から取得できます。

ビルド済みバイナリーは次のようにして使えます:

  • Linux: snap install lxd
  • MacOS: brew install lxc
  • Windows: choco install lxc

LXD 5.10 リリースのお知らせ

13th of January 2023

はじめに

LXD チームは LXD 5.10 のリリースをお知らせできることにとてもワクワクしています!

2023 年の最初のリリースは、チームが 2 週間の休暇を楽しんだため、少し軽めのリリースになっています。来月のリリースは、2023 年に実装されるより大きな機能のいくつかを紹介する予定です。

これは LXD 5.10 がつまらないということではありません。データベースのパフォーマンスを最大限引き出すための継続的な取り組みと、今後の機能のための準備作業に加え、品質向上と十分な数のバグフィックスが行われています。

Enjoy!

新機能とハイライト

インスタンスのドキュメントの作り直し

インスタンスのドキュメントを、新しいスタイルのドキュメントにマッチするように再構成しました。一般的な処理を実行するための手順や、様々なデバイスタイプに関する個別のページに分割しました。

これにより、ドキュメントの閲覧が簡単になるとともに、各ページへのリンクも大幅に簡単になります。

ドキュメント : https://linuxcontainers.org/lxd/docs/latest/instances/

サーバーのドキュメントの作り直し

サーバーのドキュメントについても、いくつか再構成をはじめました。サーバーのドキュメントに関しては、ドキュメントの LXD の管理セクションを整理する作業が残っています。しかし、このリリースで整理されたサブセクションとナビゲーションを持つ、よりよい構造のメインページをご覧いただけます。

ドキュメント : https://linuxcontainers.org/lxd/docs/latest/server/

Grafana ダッシュボード上のネットワークの円グラフ

LXD の Grafana ダッシュボードは、トップのインスタンスを特定するすばらしい方法です。
これまでは、CPU、メモリー、ディスクのトップ 5 インスタンスをカバーするグラフがありました。

今回、ユーザーからの要望で、ネットワークの利用状況についてもカバーするようになりました。送信トラフィック、受信トラフィック、送信パケット、受信パケットの上位を示す 4 つの新しいグラフを追加しました。

image|690x304

ダッシュボードは、LXD のソースリポジトリーの https://github.com/lxc/lxd/blob/master/grafana/LXD.json から直接ダウンロードできます。

もしくは、Grafana から直接取得できます(ID 15726): https://grafana.com/grafana/dashboards/15726-lxd/

NIC デバイスの送信キューの長さが設定可能に

新たに veth ベースの nic デバイスで queue.tx.length という設定が利用できるようになりました。
これは、この機能の使用が NIC タイプが bridgedp2prouted のいずれかを使うコンテナに限定されるということです。

この新たな設定項目は、ネットワークインターフェースの txqueuelen を設定できます。これは、パケットのキューイングに関係したレイテンシーの問題に遭遇した場合に役に立つ可能性があり、キューの長さを減らして低遅延な動作を強制するか、逆にキューの長さを増やしてスループットを向上させるために使えます。

すべての変更点(翻訳なし)

このリリースでの完全な変更点のリストは次の通りです:

すべてのChangeLogを見る
  • lxd/storage/ceph: Remove osd map timeout
  • doc/instances: small clarifications to the snapshot documentation
  • doc/devices: Sort macvlan NIC device options in table
  • doc/cloud-init: add info about merging user-data and vendor-data
  • doc/instances: clarify misleading description for linux.sysctl.*
  • doc/initialization: add page for lxd init
  • doc/installing: quick cleanup of headings
  • doc/preseed: move the content from preseed.md to the init page
  • doc/init: clean up documentation of the preseed file initialization
  • doc/storage: add links to MicroCeph
  • doc/clustering: add links and instructions for MicroCloud
  • doc: add MicroCeph and MicroCloud to wordlist
  • lxd/instance/drivers/qmp: Don't mask unexpected monitor response errors with sentinel
  • doc/security: move to a separate section
  • doc/security: clean up section
  • doc/configuration: remove Configuration section
  • lxd/db/images: Updates GetImagesFingerprints to use transactions
  • lxd/db/images: Updates GetImageAliases to use transactions
  • lxd/db/images: Updates GetImageAlias to use transaction
  • lxd/db/images: Updates DeleteImageAlias to use transactions
  • lxd/db/images: Updates CreateImageAlias to use transactions
  • lxd/db/images: Updates UpdateImageAlias to use transaction
  • lxd/db/images: Updates CreateImage to use transaction context
  • lxd/db/db/internal/test: Update image tests
  • lxd/util/http: Update EtagCheck to return api.StatusError with http.StatusPreconditionFailed
  • lxd/images: Updates imagesPost to use single transaction
  • lxd/images: Updates doImagesGet to use transactions
  • lxd/images: Updates imagesGet to use doImagesGet
  • lxd/images: Updates doImageGet to use transactions
  • lxd/images: Updates imageGet to use doImageGet
  • lxd/images: Updates imageAliasesPost to use single transaction
  • lxd/images: Updates imageAliasesGet to use single transaction
  • lxd/images: Updates imageAliasGet to use single transaction
  • lxd/images: Updates imageAliasDelete to use single transaction
  • lxd/images: Updates imageAliasPut to use single transaction
  • lxd/images: Updates imageAliasPatch to use a single transaction
  • lxd/images: Updates imageAliasPost to use a single transaction
  • lxd/storage/volumes: Updates storagePoolVolumesGet to use tx.GetImagesFingerprints
  • lxd/instance/instance/utils: Updates ResolveImage to use transaction
  • lxd/instance/drivers/driver/qemu: Show actual qemu path in checkFeatures
  • lxd/instance/drivers/driver/qemu: Remove -bios flag from qemu feature check invocation
  • lxd/instance/drivers/driver/qemu: Extract stderr output from qemu during checkFeatures
  • lxd/instance/drivers/driver/qemu: Add -no-user-config to qemu invocation in checkFeatures
  • lxd/instances/post: Remove profile loading from createFromImage
  • lxd/instances/post: Remove profile loading from createFromNone
  • lxd/instances/post: Remove profile loading from createFromMigration
  • lxd/instances/post: Use correct error quoting in createFromMigration
  • lxd/instances/post: Remove profile loading from createFromCopy and clusterCopyContainerInternal
  • lxd/instances/post: Centralise profile validation and loading in instancesPost
  • lxd/instance/instance/utils: Removes fetchInstanceDatabaseObject function
  • lxd/instance/instance/utils: Updates SuitableArchitectures to accept optional source instance
  • lxd/instances/post: instance.SuitableArchitectures usage
  • lxd/instances/post: Moves local clustered check earlier
  • lxd/instances/post: Move target group check into initial transaction
  • lxd/instances/post: Pass request context into DB transaction
  • lxd/instances/post: Don't shadow err in instancesPost
  • lxd/instances/post: Keep related error checking together in instancesPost
  • lxd/instances/post: Move InstanceType and Source instance logic earlier in instancesPost
  • lxd/instances/post: Use instance.ValidName in instancesPost
  • lxd/instances/post: Remove duplicated instance name check in createFromImage
  • lxd/instances/post: Update createFromImage to use req.Type for image type
  • lxd/instances/post: Don't load target project again in createFromImage
  • lxd/instance: Fix error quoting in instanceCreateFromImage
  • lxd/instance/instance/utils: Updates ResolveImage to use a transaction
  • lxd/instance/instance/utils: Updates SuitableArchitectures to accept a source image reference
  • lxd/instance: Updates instanceCreateFromImage to accept a source image directly
  • lxd/db/db/internal/test: tx.GetCachedImageSourceFingerprint usage
  • lxd/db/images: Updates GetCachedImageSourceFingerprint to use transaction
  • lxd/daemon/images: tx.GetCachedImageSourceFingerprint usage
  • lxd/instances/post: Update createFromImage to accept image info and alias directly
  • lxd/instances/post: Updates instancesPost to resolve image profiles early
  • lxd: Move to current bakery version
  • lxd-migrate: Move to current bakery version
  • client: Move to current bakery version
  • lxc: Move to current bakery version
  • test/macaroon-identity: Move to current bakery version
  • tests: Update godeps.list
  • gomod: Update dependencies
  • lxd/instance/drivers/driver/qemu: Update architectureSupportsUEFI to add arch argumnent
  • lxd/instance/drivers/driver/qemu: Update checkFeatures to add -bios flag for UEFI architectures
  • lxd/instance: Improve logging in autoCreateInstanceSnapshots
  • lxd-migrate: Fix usage string
  • doc: fix version conflicts for doc tools
  • lxd/storage/drivers/driver/zfs: Improve error when existing zpool isn't empty
  • lxd/storage/s3/miniod: Wait 10s for minio process to start
  • doc/lxd-migrate: add information about updating the configuration
  • lxd/instance/drivers: Don't fail Start if renaming old log file doesn't exist
  • lxd/storage/backend/lxd: Improve bucket errors
  • forksyscall: ensure that parent mount is dependent mount
  • lxd/storage/drivers/driver/btrfs/utils: Fix getQGroup to suport BTRFS >= 6.0.1
  • lxd/storage/s3/miniod: Wait for config to be available before considering ready
  • forksyscall: avoid double MS_MOVE
  • lxd/db/query/dump: Correctly generate CREATE TABLE statement
  • lxd/db/query/dump: Correctly escape single quote and \n and \r
  • lxd/db/query/dump/test: Fix dump tests
  • lxd/db/warnings: Store warning times in UTC
  • gomod: Update github.com/shirou/gopsutil/v3
  • lxc/init: Fix --no-profiles flag
  • test: Adds test for lxc init --no-profiles
  • lxd/instance/drivers/driver/qemu: Add qemuMachineType function
  • lxd/instance/drivers/driver/qemu/config/test: Fix architecture tests
  • lxd/instance/drivers/driver/qemu/config/test: Fix whitespace
  • lxd/instance/drivers/driver/qemu: Adds -machine type argument to checkFeatures
  • lxd/network add function to get txqlen
  • lxd/instances/post: Move cluster member targetting checks higher up
  • lxd/instances/post: Use architecture from source image in request
  • lxd/instances/post: Remove logger.Debugf usage
  • lxd/instances/post: Rework cluster member targetting logic
  • lxd/instances/post: Only check project instance creation permissions on initial cluster member
  • lxd/instances/post: Send notification header when redirection create request to different cluster member
  • lxd/db/node: Adds GetCandidateMembers function
  • lxd/db/node: Reworks GetNodeWithLeastInstances to accept list of candidate members
  • lxd/db/node/test: Update tx.GetNodeWithLeastInstances tests
  • lxd/instances/post: Split generation of candidate cluster members from selection of member with fewest instances
  • lxd/api/cluster: tx.GetNodeWithLeastInstances usage
  • lxd/ip add function to set txqlen
  • grafana: add top network usage graphs
  • fix dead lock bug
  • lxd/instance/drivers: Fixes delete of ephemeral VM on stop
  • gomod: Update dependencies
  • lxd/instance/instance/utils: Updates SuitableArchitectures to return api.StatusError for bad requests
  • lxd/instance/instance/utils: Accept db.ClusterTx in SuitableArchitectures
  • lxd/instances/post: Move instance.SuitableArchitectures and tx.GetCandidateMembers into existing transaction
  • lxd/db/node: Skip pending nodes in GetCandidateMembers
  • lxd/db/node: Modified GetCandidateMembers to accept list of all cluster members
  • lxd: tx.GetCandidateMembers usage
  • lxd/project/permissions: Removes unused tx argument from CheckClusterTargetRestriction
  • lxd: project.CheckClusterTargetRestriction usage
  • lxd/instances/post: Reject use of target parameter when not clustered in instancesPost
  • lxd/instances/post: Allow targeting all cluster groups if project restricted.cluster.groups is empty
  • lxd/instances/post: Check manually targeted cluster member belongs to one of restricted.cluster.groups
  • lxd/db/node: Updates GetNodeWithLeastInstances to return NodeInfo
  • lxd/db/node/test: tx.GetNodeWithLeastInstances usage
  • lxd/api/cluster: Updates evacuateClusterMember tx.GetNodeWithLeastInstances usage
  • lxd/instances/post: Updates instancesPost tx.GetNodeWithLeastInstances usage
  • test: Update cluster targeting tests
  • test: Restructure test_clustering_membership to be less flaky
  • test: Lower boot.host_shutdown_timeout during clustering evacuation tests
  • lxd/api/cluster: Improve logging in evacuateClusterMember
  • lxd/db: Changed snapshot sort from date to datetime
  • lxd/api: Add support for serving the UI
  • doc: Fix broken cloud-init doc links
  • lxd/db/instances: Sort snapshots by creation time and then ID in GetInstanceSnapshotsNames and GetNextInstanceSnapshotIndex
  • lxd/info: Use snapshot order from server in instanceInfo
  • lxd/db/storage/volumes: Order by volume snapshot creation date first in GetStoragePoolVolume
  • doc/networks: add instructions for attaching a network to an instance
  • doc/server: struture the server options page
  • doc/server: split up configuration table
  • doc/server: update links to point to more specific sections
  • doc/server: clean up configuration options
  • lxd/device Add support for setting txqueuelen on veth based NICs
  • test: Add test for setting txqueuelen of nic bridged device
  • api: Adds txqueuelen api description
  • lxd/instances/post: Reduce scope of target member and group variables
  • lxd/instances/post: Updates comments
  • lxd/db/node: Make NodeInfo.ToAPI more efficient when called multiple times
  • lxd/db/node: Improve GetNodeMaxVersion comment
  • lxd/api/cluster: Updates member functions to use modified ToAPI function
  • lxd/api/cluster: Consistent error quoting
  • lxd/db/node: Don't run unnecessary query for getting offline threshold in GetCandidateMembers
  • lxd: tx.GetCandidateMembers usage
  • lxd/db/node/test: Updated tx.GetCandidateMembers usage
  • lxd/api/cluster: Fixes clusterNodesPost API description
  • doc/rest-api: Refresh swagger YAML
  • gomod: Update dependencies
  • i18n: Update translations from weblate

試用環境

この新しい LXD リリースは私たちの デモサービス で利用できます。

ダウンロード

このリリースの tarball は ダウンロードページ から取得できます。

ビルド済みバイナリーは次のようにして使えます:

  • Linux: snap install lxd
  • MacOS: brew install lxc
  • Windows: choco install lxc

Older news