support network configuration for lxd 2.3
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
Medium
|
Stéphane Graber | ||
cloud-init (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Xenial |
Fix Released
|
Medium
|
Unassigned |
Bug Description
=== Begin SRU Template ===
[Impact]
Support for lxd configuration of networking does not work with lxd 2.3+ as
the current path for configuration in cloud-init uses debconf but newer
lxd does not support configuration that way.
Prior to LXD 2.3, the bridge configuration was done through distro
packaging. With 2.3 and higher, this is now done inside LXD itself, so we
need to use "lxc network" with 2.3 and higher.
All the old code has been thrown out so LXD 2.3 doesn't have any debconf
templates and doesn't manage the lxd bridge itself. LXD 2.3 packaging does
ship a script which will convert existing users in place, so folks
upgrading shouldn't actually notice anything except that
/etc/default/
"lxc network edit lxdbr0"
to configure any extra thing.
[Test Case]
* Prepare an image with updated cloud-init from proposed.
* start instance with user-data like:
#cloud-config
lxd:
bridge:
mode: new
name: lxdbr1
ipv4_nat: true
* wait for system to boot, check that lxdbr1 is configured as expected.
# ip addr show dev lxdbr1
2: lxdbr1: <BROADCAST,
UNKNOWN group default qlen 1000
link/ether 2e:f8:cc:5f:57:81 brd ff:ff:ff:ff:ff:ff
inet 10.5.0.1/24 scope global lxdbr1
valid_lft forever preferred_lft forever
inet6 fe80::2cf8:
valid_lft forever preferred_lft forever
[Regression Potential]
New codepath is taken based on prsence of /etc/default/
If that file was present and a newer version of lxd installed, then
we would take the wrong path.
[Other Info]
The upstream MP that this was added under can be seen at
https:/
=== End SRU Template ===
Added to trunk at https:/
cloud-init in xenial should be able to configure an lxd 2.3 network also.
Changed in cloud-init (Ubuntu): | |
importance: | Undecided → Medium |
status: | New → Fix Released |
Changed in cloud-init (Ubuntu Xenial): | |
status: | New → Confirmed |
importance: | Undecided → Medium |
fixed in upstream commit 02f6c4bb8cef17b 3fe04ef4dc1ef19 9e20aeb4d9