LXD 3.21 リリースのお知らせ¶
13th of February 2020
はじめに ¶
LXD チームは、LXD 3.21 のリリースをお知らせすることにとてもワクワクしています!
このリリースは、これまでと同様の 2 週間の短い開発サイクルのリリースで、多数のストレージ、VM、ネットワークのバグフィックスとリファクタリングを含んでいます。
機能的には、ネットワークインターフェースを接続する新たな簡単な方法、新たなクラスタリングデータベースの設定、多数の仮想マシンの改良があります。
Enjoy!
ハイライト¶
LXD が管理するネットワークに対する新たな接続方法 ¶
LXD が直接管理しているブリッジインターフェースを使う場合(lxc network list
参照)、次のように直接そのブリッジにインスタンスを接続できるようになりました:
eth0: type: nic network: lxdbr0 name: eth0
もしくは lxc config device add c1 eth0 nic network=lxdbr0 name=eth0
のように実行します。
nictype: bridged
や parent: lxdbr0
というプロパティは設定する必要がありません。代わりに network
に LXD ネットワークを設定すれば、すべて完了です。
このモードでは、ブリッジの MTU は自動的にネットワークインターフェースから継承します。IPv4/IPv6 アドレスは、ネットワークに設定されたサブネットに対して検証されます。そして、MAAS IPv4, IPv6 サブネットは、個別のインターフェースでなくネットワークを通して設定されるようになりました。
Ceph ドライバーの新しいストレージドライバーインフラストラクチャーへの移植 ¶
Ceph ストレージドライバーが、新しいストレージインフラストラクチャーに移植される最新で最後のドライバーです。ユーザーに見えない変更がありますが、LXD で Ceph をお使いのユーザーは、まずは重要ではないシステムで 3.21 へのアップグレードを試し、ストレージに関連する問題をすみやかに報告することをおすすめします。
この最後のドライバーの移植で、LXD のコードベースからすべての古いストレージインフラストラクチャーを削除する作業を始められるようになりました。これにより、今後の保守が大幅に容易になります。
クラスタリング: アクティブとスタンバイのメンバーの数を設定できるようになりました ¶
クラスターに対する設定オプションをふたつ追加しました。
cluster.max_voters
は、期待するアクティブデータベースクラスターのメンバー数を設定します(投票 (voting))cluster.max_standby
は、期待するスタンバイデータベースクラスターのメンバー数を設定します(非投票 (non-voting))
デフォルトの設定は 3 台の投票 (voting) メンバーと、2 台のスタンバイメンバーです。投票 (voting) メンバーがダウンした場合、スタンバイは速やかに投票 (voting) に昇格し、予備の待機メンバーがスタンバイに昇格するかもしれません。
投票 (voting) メンバーの数を増やすとデータベースのパフォーマンスが低下するでしょう。これは、変更に同意するメンバーの数が増えるからです。スタンバイメンバーの数を増やしてもデータベースのパフォーマンスに影響は与えませんが、データベースバイナリストリームを取得する必要のあるメンバーが増えるので、ネットワーク負荷が増加するでしょう。
ほとんど間髪を入れずに 2, 3 のメンバーを失う可能性があるクラスターでのみ、これらのデフォルト値を増やすことを検討すべきです。
VM: CPU ピンニングとトポロジー ¶
limits.cpu
で、コンテナでサポートされているように、特定の CPU ID を設定できるようになりました。例: limits.cpu: 0,2
、limits.cpu: 0-3
。
リストで指定された物理 CPU(やスレッド)への VM の仮想 CPU のピンニングに加えて、LXD は VM の CPU トポロジーを一致させようとします。
先の例の limits.cpu: 0,2
は、デュアルコアのハイパースレッドサポートの Intel システムでは、最初のコアとそのハイパースレッドを指します。その結果、仮想マシンではシングルソケット、シングルコア、ハイパースレッド CPU で構成され、物理ハードウェアと一致するように両方のスレッドが固定されます。
同じロジックが、ハイパースレッディングサポートの有無に関わらず、マルチソケット、マルチコアのシステムをサポートします。limits.cpu
で指定された CPU が実際のハードウェア構成(各ソケットの同じ数のコア、すべてのコア上の同じ数のスレッド、…)と一致する限り、LXD は VM 設定を一致させ、ピンニングも一致するように設定することを保証します。
要求された設定が正しくない場合(ハードウェアと一致しない場合)、LXD はフォールバックし、シングルソケットのハイパースレッディングなしのマルチコア VM を提供し、設定した CPU ID それぞれをコアとして扱います。これは明らかに理想的な状況ではありませんので、このような状況になれば、警告が LXD ログに記録されます。
VM: ネットワークとストレージの最適化 ¶
ネットワークパフォーマンスを改良するため、LXD はネットワークデバイスに vhost_net
を使います。
ストレージフロントでは、virtio-scsi ドライブで discard
が有効になり、ブロックを破棄したり、ベースのファイルストレージを縮小したり、バックのドライブがブロックをより適切に管理できるようになったりしました。
VM: IPv6 アドレスのエージェントレスのレポーティング ¶
これまでは、仮想マシンの IP アドレスは LXD の DHCP サーバからのみ取得していました。
これは IPv4 では確実に動作しますが、ほとんどの IPv6 デプロイで使う SLAAC では、DHCPv6 リースが付属していないので、LXD では取得されません。
これを回避する方法のひとつは、VM 内で実行する LXD エージェントに頼ることでした。このエージェントは仮想マシン向けにネットワーク情報を取得するのに使います。
しかし、それが不可能な場合でも、LXD は一致する IPv6 アドレスの近傍レコードも参照するようになりました。
stgraber@castiana:~$ lxc list win10 +-------+---------+----------------------+----------------------------------------------+-----------------+-----------+ | NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS | +-------+---------+----------------------+----------------------------------------------+-----------------+-----------+ | win10 | RUNNING | 10.166.11.118 (eth0) | 2001:470:b368:4242:9dff:908:98a9:c0c3 (eth0) | VIRTUAL-MACHINE | 0 | +-------+---------+----------------------+----------------------------------------------+-----------------+-----------+
完全な ChangeLog(翻訳なし) ¶
Here is a complete list of all changes in this release:
すべてのChangeLog を見る
- lxd/migrate/container: Fixes migrate refresh final sync snapshot bug
- lxd/migration/migration/volumes: Comment on Data property of VolumeSourceArgs
- lxd/storage/drivers/driver/zfs/volumes: Explain use of volSrcArgs.Data for migration
- lxd/instance/drivers/load: Pass copy of device config to device.Validate
- lxd/device/nic/bridged: Updates use of network pkg functions
- lxd/device/nic/bridged: Uses network.LoadByName to access n.HasDHCPvX() helpers
- lxd/device: networkRandomDevName usage
- lxd/network/network/load: Adds LoadByName function
- lxd/network: Adds network type in network pkg
- lxd/network/network/utils: Moves network utils from main pkg
- lxd/instance/instance/utils: Removes NetworkUpdateStatic function link
- lxd/instance/instance/utils: Adds more instance load functions
- lxd/container: Removes instance load functions moved to instance pkg
- container/lxc: network.UpdateDNSMasqStatic usage
- lxd: instance.LoadNodeAll usage
- lxd: instance.LoadByProject usage
- lxd: instance.LoadByProjectAndName usage
- lxd/device/device/utils/network: Updates network package usage
- lxd/device/device/utils/network: Unexports some non-shared functions
- lxd/network/utils: Removes network utils functions used by network type
- lxd/networks/config: Removes networkFillAuto function
- lxd/networks: Removes network type and networkLoadByName function
- lxd/device: networkCreateVlanDeviceIfNeeded and networkRandomDevName usage
- lxd: network package usage
- test: static analysis of network pkg
- lxd/instance/drivers/driver/qemu: network.GetLeaseAddresses usage
- lxd/instance/instance/utils: Removes linked function NetworkGetLeaseAddresses var
- lxd/network/network/utils: Adds GetMACSlice and GetLeaseAddresses functions
- lxd/networks: Removes networkGetLeaseAddresses functions
- lxd/networks/utils: Removes networkGetMacSlice function
- lxd/instances: Fix URLs to use /1.0/instances
- seccomp: make device number checking more robust
- Define MS_LAZYTIME for compatibility with old glibc
- lxd/vm: Use vhost_net
- lxd/vm: Enable block discard
- shared/archive: Fix out of space logic
- lxd/vm: Set Documentation in systemd units
- lxd/vm: Silence writeback warning for config drive
- lxd/device/nic/bridged: Load br_netfilter kernel module when using IPv6 filtering
- lxd/networks/configs: Adds maas.subnet.ipv{4,6} to allowed network keys
- lxd: Device name quoting in device errors
- lxd/device/nic: Adds network as valid nic property
- lxd/networks: Uses HasDHCPv6 function and updates comment
- lxd/network: Adds DHCP range parsing functions
- lxd/device/nic/bridged: Updates to use network type DHCP ranges functions and types
- lxd/device/nic/bridged: Adds support for network property
- doc: Adds API extension for instance_nic_network
- shared/version/api: Adds API extension for instance_nic_network
- test/suites/container/devices/nic/bridged: Adds network property tests
- doc: Adds network property to instance NIC bridged device
- lxd/storage/zfs: Fix argument ordering
- unix hotplug: skip devices without associated devpath or major/minor
- lxd: Switches to simpler conn.WriteMessage function
- lxd/storage/drivers: Add MountedRoot to Info
- lxd/storage: Honor MountedRoot in pool actions
- lxd/networks: Consider IPv6 neighborhood entries
- lxd: Uses gorilla WriteJSON where possible
- lxd/storage/drivers: Set MountedRoot option
- lxd/main_checkfeature: add explicit _exit() even if it's not needed
- lxd/main_checkfeature: s/exit()/_exit()/g
- cgo: export wait_for_pid() helper
- lxd/main_checkfeature: close listener
- lxd/main_checkfeature: don't depend on kcmp header
- lxd/device: Async CEPH unmap
- lxd/storage/drivers/driver/lvm: Uses d.thinpoolName() rather than d.config["lvm.thinpool_name"]
- lxd/patches: setupStorageDriver usage
- lxd/storage: Renames SetupStorageDriver to setupStorageDriver for consistency
- lxd/storage/drivers/driver/zfs: Adds zfs kernel module load fail detection
- lxd/daemon: setupStorageDriver usage
- lxd/daemon: Comment consistency
- lxd/storage/drivers/driver/lvm: Makes lvm.vg_name required for mounting
- lxd/db/cluster/update: Adds updateFromV23 for ensuring lvm.vg_name key is set
- lxd/db/cluster/update: Superfluous trailing whitespace
- lxd/db/cluster/schema: v24 update
- lxd/device/config/devices: Adds NICType function on Device type
- lxd: Device.NICType usage
- lxd/device/nic/bridged: Bans use of nictype when using network property
- test: Updates nic bridged tests for NICType logic
- lxd/network/network/utils: Fix network in use detection
- lxd-agent/exec: Logs signal forwarding as info rather than error
- lxd/container/exec: Only log finished mirror websocket when go routine exits
- lxd/instance/drivers/driver/qemu: Fix go routine leak and hanging lxc clients
- shared: Upper case first character of some debug messages
- lxd/device/nic/bridged: Switches to dnsmasq.DHCPAllocatedIPs()
- lxd/device/nic/bridged: Switches to dnsmasq.DHCPStaticIPs()
- test/suites/container/devices/nic/bridged: Adds test to detect leaked filters
- lxd/device/nic/bridged: Fixes bug that leaks ebtables filters
- lxd/project: Adds InstanceParts() function for separating project prefixed Instance name
- lxd/storage/load: Updates volIDFuncMake to use project.InstanceParts()
- lxd/util: Fix IP/host tests on other distros
- lxd/storage/drivers: Add Ceph driver
- lxd: Use new storage code for Ceph clustering
- Unlock when isLeader failure
- lxd/storage/ceph: Function ordering and comments
- lxd/storage/ceph: Properly handle os.Remove
- lxd/storage/ceph: Comment consistency
- lxd/storage/ceph: Set DirectIO
- lxd/storage/ceph: Unwrap if statement
- lxd/storage/ceph: Unwrap function signatures
- lxd/storage/ceph: Rework MountVolume
- lxd/patches: Re-run VM path creation
- tests: Add ceph to list of new drivers
- lxd/firewall: Moves iptables/xtables implementation into firewall/drivers package
- Consider the default port when checking address overlap
- lxd/firewall: Updates interface and loader for new pkg
- lxd: firewall/drivers pkg usage
- lxd/device/config/device/proxyaddress: Moves ProxyAddress type
- lxd/main/forkproxy: Updates use of ProxyAddress type
- lxd/device/proxy: Switches to use firewall.InstanceSetupProxyNAT()
- lxd/firewall/firewall/interface: Reworks firewall interface
- Re-disable clustering upgrade test
- lxd: Fix error message when deleting storage pools
- lxd/firewall/drivers/drivers/xtables: Implements xtables driver
- lxd/network/network/utils: Adds UsesIPv4Firewall and UsesIPv6Firewall functions
- lxd/device/nic/bridged: Switches to firewall.InstanceSetupBridgeFilter and InstanceClearBridgeFilter
- lxd/network/network: firewall.NetworkSetupForwardingPolicy usage
- lxd/network: firewall.NetworkSetupOutboundNAT usage
- lxd/network: Updates firewall DHCP/DNS function usage
- lxd/firewall/drivers/consts: Removes unused constants
- lxd/network: Updates to use firewall helper functions
- lxd/dnsmasq: Makes DHCPStaticIPs project aware
- lxd/device/nic/bridged: dnsmasq.DHCPStaticIPs project usage
- lxd/network/network/utils: dnsmasq.DHCPStaticIPs project usage
- test: Removes old iptables package from static analysis
- test: Fixes iptables rule leak in clustering test
- shared: Add HostPathFollow
- lxc/file: Follow symlinks on individual file transfers
- lxd/container: Protect file push/pull from shift
- Add cluster.n_voters and cluster.n_standby configuration keys
- Load configuration keys when checking for n of voters/stand-by
- doc/clustering.md: describe usage of clustering size config keys
- Drive-by: fix check for degraded cluster
- doc/server.md: add cluster.max_voters/max_standby
- api: Add clustering_sizing extension
- Revert "lxd/instance/drivers/driver/qemu: Fix go routine leak and hanging lxc clients"
- lxd/instance: Move ParseCpuset
- lxd/vm/qmp: Allow retrieving vCPU pids
- lxd/vm: Implement CPU pinning
- shared: get_poll_revents(): handle EAGAIN in addition to EINTR
- lxc: send SIGTERM when there's no controlling terminal
- shared: Add Uint64InSlice
- lxd/vm: Template sockets/cores/threads config
- lxd/vm: Attempt to line up CPU topology
- lxd init: Don't allow empty strings for the cluster host name
- node/config.go: Don't allow wild card addresses for cluster.https_address
- idmap:acl: don't add but update the acls
- shared/util: Tweak HostPathFollow to use readlink
- lxc/file: Expand complex symlink chains
- i18n: Update translations from weblate
試用環境 ¶
この新しい LXD リリースは私たちの デモサービス で利用できます。
ダウンロード ¶
このリリースの tarball は ダウンロードページ から取得できます。
ビルド済みバイナリーは次のように使えます:
- Linux: snap install lxd
- MacOS: brew install lxc
- Windows: choco install lxc