LXD 3.23 リリースのお知らせ¶
20th of March 2020
はじめに ¶
LXD チームは、LXD 3.23 のリリースをお知らせすることにとてもワクワクしています!
このリリースは最後の 3.x
シリーズのリリースです。来週リリース予定の LXD 4.0 に少しの変更(いくつかの後方互換性のない CLI の調整)を加えています。
このリリースは、カスタムストレージボリューム、プロジェクト、仮想マシンを使うユーザーに特に機能が詰まったリリースです。
Enjoy!
ハイライト ¶
プロジェクトのカスタムストレージボリューム ¶
features.storage-volumes
という新しいプロジェクトの機能が、すべての新しいプロジェクトで使えるようになりました。プロジェクトにカスタムボリュームを関連付けることができます。
この機能により、コンフリクトのリスクなしで専用のカスタムストレージボリュームのセットが作成できます。Canonical RBAC と組み合わせて、異なるプロジェクト間でストレージを適切に分離できるようになりました。
stgraber@castiana:~$ lxc storage volume list default | grep custom +--------+----------+-------------+---------+ | TYPE | NAME | DESCRIPTION | USED BY | +--------+----------+-------------+---------+ | custom | backups | | 1 | +--------+----------+-------------+---------+ | custom | blah | | 0 | +--------+----------+-------------+---------+ | custom | images | | 1 | +--------+----------+-------------+---------+ stgraber@castiana:~$ lxc project create blah Project blah created stgraber@castiana:~$ lxc project switch blah stgraber@castiana:~$ lxc storage volume create default foo Storage volume foo created stgraber@castiana:~$ lxc storage volume list default | grep custom +--------+------+-------------+---------+ | TYPE | NAME | DESCRIPTION | USED BY | +--------+------+-------------+---------+ | custom | foo | | 0 | +--------+------+-------------+---------+ stgraber@castiana:~$
カスタムストレージボリュームのスナップショットのスケジューリング ¶
インスタンスと同じように、snapshots.schedule
と snapshots.pattern
設定がカスタムボリュームでも使えるようになりました。
これらは lxc storage volume set POOL VOL KEY VALUE
を使って直接設定できます。
カスタムストレージボリュームの有効期限 ¶
カスタムストレージボリュームで自動スナップショットが使えるようになったので、同時に有効期限の設定を行うのが良いでしょう。インスタンスで使えるものと合わせて、snapshots.expiry
を使って設定できます。
既存のスナップショットの有効期限の編集は lxc storage volume edit POOL VOL/SNAP
コマンドを使って行えます。
プロジェクトに対する制限値 ¶
プロジェクトごとに制限値をいくつか加えることができるようになりました。
現時点で使える制限値は次のものです:
limits.containers
作成できるコンテナの総数limits.virtual-machines
作成できる仮想マシンの総数limits.cpu
使用できる仮想 CPU の数limits.memory
与えられるメモリーの総量limits.processes
起動できるプロセスの総数
最後の 3 つの設定は、プロジェクト内の全インスタンスで一致する設定を持つ必要があります。制限は実際の使用量ではなく、インスタンスに設定する制限値のトータルに対して適用されます。
プロジェクトに対する制約 ¶
(制限値に)加えて、いくつかの機能に対する制約もプロジェクトに適用できるようになりました。
オプションの全リストは https://linuxcontainers.org/lxd/docs/master/projects でご覧いただけます。
この機能は、restricted=true
を使って制約をプロジェクトに適用すると、信頼できないユーザーに対して安全となるようにデフォルト設定されるようにデザインされています。その後制約を、潜在的により危険だったり、より制限の少ない設定やデバイスを許可するように緩めることができます。
Canonical RBAC とこの機能を組み合わせて、あまり信用できないユーザーに対してホスト上の完全な特権を与える必要なしに、共有 LXD サーバーやクラスターを実行できます。
バックアップ・エクスポートロジックの改良 ¶
lxc export
が使うバックアップ・エクスポートロジックが更新されました。エクスポート中のディスクスペース量が減少しました。コンテナファイルは、ディスク上に作成される中間コピーファイルなしに直接圧縮した tarball に書き込まれます。
これによりエクスポートで使うディスクの使用量を大幅に減らすだけでなく、処理のスピードも向上しました。
VM: マイグレーションのサポート ¶
仮想マシンをローカルストレージプール間やリモートの LXD サーバー間でコピーできるようになりました。
この機能は "cold" マイグレーションのみであることに注意してください。仮想マシンは移動の間は停止していなければなりません。ライブマイグレーションは今後実装が予定されています。
VM: publish のサポート ¶
仮想マシンが lxc publish
できるようになりました。より多くの仮想マシンを起動したり、他のサーバーに転送するのに使えるイメージが作成できます。
この機能はコンテナと完全に同じように動作しますが、仮想マシンのディスクはコンテナよりかなり大きいという事実を強調しておく必要があります。publish プロセス中にイメージを qcow2 に再度パックする必要がありますので、大きな仮想マシンを扱うためには、システム上にかなりの量のディスクの空き容量が必要になります。
完全な ChangeLog(翻訳なし)¶
Here is a complete list of all changes in this release:
すべてのChangeLog を見る
- lxd/storage/zfs: Fix usage calculation
- Add go 1.14.x check
- lxd: Cleanup error messages
- lxd: Rename container files to instance
- tests: Update for rename
- production-setup: add net.core.bpf_jit_limit and kernel.keys.maxbytes
- doc/instances: Adds missing host_name key on routed nic device
- doc/instances: Documents ipv4.gateway and ipv6.gateway routed NIC keys
- lxd/device/device/utils/network: Adds NetworkValidGateway helper
- lxd/device/nic: Adds ipv4.gateway and ipv6.gateway validation
- lxd/device/nic/routed: Adds support for not adding automatic default gateway
- api: Adds extension container_nic_routed_gateway
- lxd/util/fs: Fixes go vet conversion from int64 to string yields a string of one rune error
- lxd/device/disk: Only unmounts non-root volumes attached
- lxd/daemon: Adds comment to AllowAuthenticated
- lxc/storage/volumes: Adds API permission check for permission "manage-storage-volumes"
- lxd/project/project: Comment tweak to Instance()
- lxd/project/project: Adds StorageVolume()
- lxd/project/project/test: Adds StorageVolume() test
- lxd/project/project: Adds StorageVolumeParts function
- lxd/project/project: Adds StorageVolumeProject function
- lxc/project: Adds STORAGE VOLUMES col to projects list
- doc/projects: Documents features.storage.volumes flag
- lxd/api/project: Adds features.storage.volumes to API
- lxd/db/migration: Adds features.storage.volumes true to default project on importPreClusteringData
- lxd/db/cluster/open: Adds features.storage.volumes true to default project in EnsureSchema
- scripts/bash/lxd-client: Adds features.storage.volumes to bash autocomplete
- lxd/daemon/storage: Error message quoting
- lxd/daemon/storage: Updates storage custom volume functions to pass project.Default
- lxd/daemon/storage: Adds support for custom volume projects
- lxd/device/disk: Updates custom volume disks to support projects
- lxd/patches: Updates patchStorageApiPermissions to use project.Default for custom volumes
- lxd/storage/backend/mock: Updates custom volume signatures to support projectName
- lxd/storage/pool/interface: Updates custom volume functions to support projectName
- lxd/storage/volumes: Error message quoting and comment tweaks
- lxd/storage/volumes: Improve volume type checks
- lxd/storage/volumes: Add custom volume project support
- lxd/storage/volumes: Migration project aware
- lxd/storage/volumes/snapshots: Improve volume type validation
- lxd/storage/volumes/snapshot: Error message quoting
- lxd/storage/volumes/snapshot: Adds project support for custom volumes
- lxd/storage/backend/lxd: Updates custom volume functions to support projects
- lxd/db/storage/pools: Removes incorrect assumption about custom vol projects in storagePoolVolumeGetType
- lxd/db/storage/pools: Comment and error msg tweaks
- lxd/db/storage/pools: Removes incorrect filter for project default when vol type is StoragePoolVolumeTypeCustom
- lxd/db/storage/pools: Updates StoragePoolVolumeSnapshotsGetType to filter by project
- lxd/db/storage: Removes StoragePoolNodeVolumeGetType
- lxd/db/storage: Fixes StoragePoolVolumeSnapshotsGetType to be project aware
- lxd/patches: Switches to using storageDrivers.GetVolumeMountPath
- lxd/storage/storage: Removes unused GetStoragePoolVolumeMountPoint
- lxd/api: Updates projectParam to use project.Default
- lxd: project.Default usage
- lxd/images: Comment weaks
- lxd/images: golint fixes
- lxd/project/limits: Default const usage
- lxd/storage/load: Adds support for custom vol projects to volIDFuncMake
- lxd/storage/load: Error msg quoting tweaks
- lxd/storage/volumes/utils: Error msg tweaks
- lxd/storage/volumes/utils: Removes unused supportedVolumeTypesExceptImages
- lxd/storage/volumes/utils: Updates storagePoolVolumeUpdateUsers to be project aware
- lxd/storage/volumes/utils: Removes storagePoolVolumeUsedByRunningInstancesWithProfilesGet and old link var
- lxd/container: Removes unused function instanceLoadAll
- lxd/storage/backend/lxd: Updates use of database functions to use projectName
- lxd/storage/utils: Adds VolumeUsedByRunningInstancesWithProfilesGet and removes old link var
- lxd/storage/utils: Makes VolumeSnapshotsGet project aware
- lxd/storage/utils: Makes VolumeUsedByInstancesGet project aware
- lxd/migrate/storage/volumes: Makes custom volume project aware
- lxd/storage/backend/lxd: b.state.Cluster.StoragePoolNodeVolumeGetTypeByProject usage
- lxd/storage/backend/lxd: Updates migration functions to be project aware
- lxd/storage/backend/mock: Updates migration functions to be storage aware
- lxd/storage/pool/interface: Updates migration functions to be project aware
- test: Updates tests for custom storage volume projects
- lxd/db/storage/pools: Makes StoragePoolNodeVolumesGetType project aware
- lxd/db/storage/pools: Removes StoragePoolNodeVolumeGetTypeID function
- lxd/patches: StoragePoolNodeVolumeGetTypeIDByProject usage
- lxd/patches: Improves error messages context
- lxd/storage/backend/lxd/patches: Adds custom volume rename patch to add project prefix
- lxd/storage/drivers/utils: Captures error context from e2fsck
- lxd/storage/drivers/utils: Dont use TryCommand when resizing
- i18n: Update translation templates
- lxd: Replaces == "true" with shared.IsTrue() for projects and profiles
- lxc: Replaces == "true" with shared.IsTrue() for project features
- lxd/firewall: Don't create zombies
- lxd/patches: Adds concept of stage to patch system
- lxd/daemon: Applies pre daemon storage patches
- lxd/storage/backend/lxd/patches: Skip already renamed volumes
- lxd/db/images: Removes unnecessary whitespace
- lxd/db/images: Updates ImagesGetExpired to return ExpireImage struct with projectName
- lxd/images: Updates pruneExpiredImages to support removing expired images from non-default projects
- driver_qemu: delete vm id from vmConsole
- ExecReaderToChannel: Prevent endless loops
- lxd/daemon/storage: Removes daemonStorageUsed function
- lxd/storage/utils: Adds VolumeUsedByDaemon function
- lxd: storagePools.VolumeUsedByDaemon usage
- lxd/storage/backend/lxd/patches: Adds daemon storage symlink update to lxdPatchStorageRenameCustomVolumeAddProject
- lxd/firewall/nft: Flush chain on delete
- lxd/firewall/nft: Handle json errors
- lxd/firewall/nft: Refuse to run on old kernels
- lxd/project: Rename limits.go to permissions.go
- shared/util/linux: Updates ExecReaderToChannel to accept a finisher chan as struct{}
- lxd-agent/exec: Updates usage of ExecReaderToChannel channel definitions
- shared/network: Removes logging internal state of websocket in WebsocketRecvStream
- shared/netutils/network/linux: Updates WebsocketExecMirror to use struct{} exited indicator channel
- lxd/instance/exec: Fixes VM read loop when agent not started
- lxd/project: Rename CheckLimitsUponInstanceCreation to AllowInstanceCreation
- lxd/project: Rename CheckLimitsUponInstanceUpdate to AllowInstanceUpdate
- lxd/project: Rename CheckLimitsUponProfileUpdate to AllowProfileUpdate
- lxd/project: Rename ValidateLimitsUponProjectUpdate to AllowProjectUpdate
- lxd/project: Rename checkAggregateInstanceLimits to checkRestrictionsAndAggregateLimits
- lxd/project: Extract checkAggregateLimits from checkRestrictionsAndAggregateLimits
- lxd/project: Honor the "restricted.containers.nesting" config
- lxd/project: Prevent using low-level container options
- lxd/project: Check if restrictions are consistent when updating a project config
- lxd/project: Honor the "restricted.containers.lowlevel" config
- lxd/project: Honor the "restricted.containers.privilege" config
- lxd/project: Also expand instance devices
- lxd/project: Add machinery to perform checks on instance devices
- lxc/project: Honor the "restricted.devices.unix-char" config
- lxd/project: Perform restrictions checks also on profiles config and devices
- lxc/project: Honor the "restricted.devices.unix-block" config
- lxc/project: Honor the "restricted.devices.unix-hotplug" config
- lxc/project: Honor the "restricted.devices.infiniband" config
- lxc/project: Honor the "restricted.devices.nic" config
- lxd/project: Honor the "restricted.devices.disk" config
- lxc/project: Honor the "restricted.devices.gpu" config
- lxc/project: Honor the "restricted.devices.usb" config
- lxc/project: Honor the "restricted.virtual-machines.lowlevel" config
- lxd/project: Pass current configuration to AllowInstanceUpdate
- lxd/project: Check restrictions for volatile config keys
- lxd/project: Adjust import order
- lxd/project: Drive-by lint fixes
- api: Add new restrict.* config keys to projects
- shared/version: Add "projects_restrictions" API extension
- doc/projects.md: Document project restrictions
- test: Add projects restrictions tests
- scripts: Update bash completion profile with new project config keys
- lxd/images: Allow virtual-machine and instance as source
- lxd/images: Set right image type on publish
- lxd/vm: Implement Export
- lxd/instance: Fix expiry check
- lxd/storage: Unpack unified VM images
- lxd/migration: Rebuilds migrate.pb.go
- lxd/migration: Adds BLOCK_AND_RSYNC migration transport type
- lxd/instances/post: Adds VM support to createFromMigration
- lxd/migrate/instance: Adds VM support to migrationSourceWs.Do
- lxd/rsync: Adds support for passing arguments to rsync send command
- lxd/storage/drivers/utils: Error quoting
- lxd/storage/drivers/driver/common: Updates MigrationTypes to support block volumes for VMs
- lxd/storage/drivers/driver/dir/volumes: Updates migration to support VMs
- lxd/storage/drivers/driver/dir/utils: Skips initial quota for VM block migration
- lxd/storage/drivers: Switches to ErrNotSupported for non-block volume paths
- lxd/storage/drivers/generic/vfs: Adds VM migration support to genericVFSMigrateVolume
- lxd/storage/drivers/generic: Adds VM migration support to genericCreateVolumeFromMigration
- lxd/storage/drivers: Removes dupe checks using genericVFSMigrateVolume
- lxd/storage/drivers/generic: Adds volume type specific migration transport type checks
- lxd/storage/drivers/driver/lvm/volumes: Removes dupe check done in genericCreateVolumeFromMigration
- lxd/migrate/storage/volumes: whitespace
- lxd/storage/drivers/driver/btrfs: Adds block migration negotiation
- lxd/storage/drivers/driver/btrfs/volumes: Adds VM migration support
- lxd/storage/backend/lxd: Improve delete error messages
- lxd/storage/utils: Adds FallbackMigrationType function
- lxd: Replaces hardcoded instances of migration.MigrationFSType_RSYNC
- lxd/storage/drivers/driver/zfs: Adds block migration negotiation
- lxd/storage/drivers/driver/zfs/volumes: Adds VM migration support
- lxd/storage/drivers/driver/ceph: Adds block migration negotiation support
- lxd/storage/drivers/driver/ceph/volumes: Adds VM migration support
- lxd/migrate/instance: Prevent live migrations for VMs
- lxd: Add "instance" string where necessary
- lxd/instances/snapshot: Fix expiration in profiles
- lxd/images: Fix source type handling
- lxc/export: Make API call more correct
- lxd/storage/drivers/driver/btrfs/volumes: Dont activate quotas if not used
- lxd/storage/drivers/driver/ceph/volumes: Adds VM block resize support
- doc/security: Adds network security section
- lxd: Unexport NewMigrationSource
- lxd/storage: Fix crash on VM unpack
- lxd: Unexport NewDaemon
- lxd: Unexport RestServer
- lxd: Unexport DefaultDaemonConfig and DefaultDaemon
- lxd: Unexports AllowAuthenticated and AllowProjectPermission
- lxd: Unexports DevLxdServer
- lxd: Unexports daemon feature functions
- lxd: Unexports migration setup functions
- lxd: Unexports forwarded response helpers
- client: Removes nullReadWriteCloser
- client: Removes unused proxyInstanceMigration function
- lxc-to-lxd: Removes unused vars
- lxc-to-lxd: Removes unused connectTarget
- lxc-to-lxd: Removes unused setupSource
- lxd/cluster: Removes unused flagForce
- lxc: Removes unused profile
- lxc/console: Removes unused getStdout
- lxd-agent: Removes unused rootUID and rootGID
- lxc: Removes unused func showByDefault
- lxd/cgroup: Removes unused cgCgroup2SuperMagic
- lxd-agent: Unexports NewDaemon
- memory_utils: align lxc + lxd
- tree-wide: consistently initialize raw fds to -EBADF instead of -1 in cgo
- lxd/storage/ceph: Fix ext4 shrinking
- lxc/remote: Use helpers
- lxc/remote: Validate remote name
- i18n: Update translation templates
- doc: Update requirements
- lxd/init: Don't offer dir as a remote backend
- lxc/config: Fix behaviour of instance snapshot expiry
- db/cluster: Bump the value of sqlite_sequence for storage_volumes
- po: Update translations
- shared/version/api: Add custom_volume_snapshot_expiry extension
- doc: Add custom_volume_snapshot_expiry
- lxd/db: Add expiry_date to storage_volumes_snapshots
- shared/api: Add expiry fields to StorageVolumeSnapshot*
- lxd/storage: Add expiry to volume snapshot pool functions
- lxd: Add snapshots.expiry config key for storage volumes
- lxd/db: Add custom volume snapshot functions
- lxd: Handle volume snapshot expiry
- lxd/storage: Add expiry date to VolumeDBCreate
- lxd/storage: Update expiry date when updating volume snapshots
- lxd/db: Add ProjectName to StorageVolumeArgs
- lxd/db: Add new OperationCustomVolumeSnapshotsExpire
- lxd/db: Add StorageVolumeSnapshotsGetExpired
- lxd: Remove expired custom volume snapshots
- *: Remove snapshot code from StoragePoolVolumeCreate
- lxc: Add --no-expiry for volume snapshots
- test: Add volume snapshot expiry test
- doc: Add keys to volume config
- po: Update translations
- lxd/storage/drivers/driver/lvm/volumes: Fixes LVM VM snapshot list
- lxd/cluster: Ignore CEPH custom volumes on removal
- shared/version: Add volume_snapshot_scheduling API extension
- lxd/storage: Add snapshots.* config keys
- lxd/db: Extend StorageVolumeArgs
- lxd: Support patterns in StorageVolumeNextSnapshot
- lxd/db: Add StoragePoolVolumesGetAllByType
- lxd: Add volume snapshot scheduling
- doc: Add volume snapshot scheduling
- lxd: Clean up logging for expired volume snapshots
- doc/networks: describe how to notify systemd-resolved of lxd nameserver
- lxd/storage/utils: Add missing comments
- lxd/storage/utils: Add forceRemoveAll
- lxd/storage/dir: Use forceRemoveAll
- lxd/api/cluster/test: Removes unused DISABLED_TestCluster_Failover
- lxd/api/cluster/test: Removes unused FLAKY_TestCluster_LeaveAndPromote
- lxd/cluster/gateway: Removes unused cachedRaftNodes
- lxd/cluster/heartbeat/test: Removes unused DISABLE_TestHeartbeat_MarkAsDown
- lxd/cluster/membership/test: Removes unused FLAKY_TestPromote
- lxd/db/containers: Removes unused snapshotIDsAndNames
- lxd/db/db/internal/test: Removes unused dir var
- lxd/db/testing: Removes unused var
- lxd/device/device/utils/unix: Removes unused unixDeviceInstanceAttributes
- lxd/device/nic/bridged: Removes unused dhcpAllocation
- lxd/firewall: Removes unused constants
- lxd/instance/drivers/driver/lxc: Removes unused cgroup2 var
- lxd/main/forkproxy: Removes unused udpConn var
- lxd/storage/drivers/driver/common: Removes unused load
- shared/generate/file/buffer: Removes unused varDeclSliceToString
- shared/generate/db/parse: Removes unused simpleTypeNames
- shared/generated/file/path: Removes unused absPath
- lxd/db/node: Tweaks LEFT JOIN to just JOIN in NodeIsEmpty()
- lxd/sys: Don't fail chmod on unresolvable symlinks
- shared/containerwriter: Renames to instancewriter
- lxd/instance/drivers: instancetarwriter usage
- shared/instancewriter/instance/tar/writer: Modifies WriteFile to accept a file name arg
- shared/instancewriter/instance/tar/writer: Adds ResetHardLinkMap function
- lxd/instance/drivers: instancetarwriter.WriteFile name arg usage
- lxd/db/containers: Renames ContainerBackupCreate and ContainerBackupRemove
- i18n: Update translations from weblate
- lxd/backup: Removes backupCreateTarball function
- lxd/backup: Updates instance backup to use tar writer rather than tar cmd
- lxd/backup: InstanceBackupRemove usage
- lxd/storage/drivers/utils: Minor tweak to copyDevice error message
- lxd/storage/drivers/generic: Tweak error message of genericCreateVolumeFromMigration
- lxd/storage/drivers/generic/vfs: Switches genericVFSBackupVolume to tar writer
- lxd/images: Fixes unhandled error
- lxd/storage/backend/lxd: Adds tarWriter to BackupInstance function
- lxd/storage/backend/mock: Adds tarWriter to BackupInstance function
- lxd/storage/drivers/driver/ceph/volumes: Adds tarWriter arg to BackupVolume
- lxd/storage/drivers/driver/cephfs/volumes: Adds tarWriter arg to BackupVolume
- lxd/storage/drivers/driver/dir/volumes: Adds tarWriter arg to BackupVolume
- lxd/storage/drivers/driver/lvm/volumes: Adds tarWriter arg to BackupVolume
- lxd/storage/drivers/drivers/mock: Adds tarWriter arg to BackupVolume
- lxd/storage/drivers/interface: Adds tarWriter arg to BackupVolume
- lxd/storage/pool/interface: Adds tarWriter arg to BackupInstance
- lxd/storage/drivers/driver/btrfs/volumes: Adds tarWriter arg to BackupVolume
- lxd/storage/drivers/driver/zfs/volumes: Adds tarWriter arg to BackupVolume
- lxd/internal: Log some memory stats
- shared: Drop Pipe function
- lxd/containers: Add configfs and tracefs
- btrfs quota to simulate total disk size
試用環境 ¶
この新しい LXD リリースは私たちの デモサービス で利用できます。
ダウンロード ¶
このリリースの tarball は ダウンロードページ から取得できます。
ビルド済みバイナリーは次のように使えます:
- Linux: snap install lxd
- MacOS: brew install lxc
- Windows: choco install lxc