Juju-deployed LXD container gets only IPv4 on dual-stack interface
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
Low
|
Unassigned |
Bug Description
Juju appears to be having trouble deploying a LXD container with an interface that should have an IPv4 address and an IPv6 address
In the example below, mgmt is an IPv4-only space; stgfe is an IPv6-only space; and delvrya is has both IPv4 and IPv6. When the container is built, only the IPv4 stanza is added to /etc/network/
$ juju version
2.2.4-xenial-amd64
$ juju add-machine lxd:7 --constraints spaces=
created container 7/lxd/5
$ juju spaces
Space Subnets
delvrya 10.10.0.0/24
delvryb 10.11.0.0/24
mgmt 10.1.0.0/24
stgbe fd4f:0:a:6::/64
stgfe fd4f:0:a:5::/64
$ juju subnets
subnets:
10.1.0.0/24:
type: ipv4
provider-id: "1"
status: in-use
space: mgmt
zones:
- ""
10.10.0.0/24:
type: ipv4
provider-id: "8"
status: in-use
space: delvrya
zones:
- ""
10.11.0.0/24:
type: ipv4
provider-id: "7"
status: in-use
space: delvryb
zones:
- ""
192.168.122.0/24:
type: ipv4
provider-id: "11"
status: in-use
space: mgmt
zones:
- ""
fd4f:0:a:5::/64:
type: ipv6
provider-id: "3"
status: in-use
space: stgfe
zones:
- ""
fd4f:0:a:6::/64:
type: ipv6
provider-id: "4"
status: in-use
space: stgbe
zones:
- ""
fd4f:0:a:a::/64:
type: ipv6
provider-id: "5"
status: in-use
space: delvrya
zones:
- ""
fd4f:0:a:b::/64:
type: ipv6
provider-id: "6"
status: in-use
space: delvryb
zones:
- ""
$ juju ssh 7
Welcome to Ubuntu 16.04.3 LTS (GNU/Linux 4.4.0-96-generic x86_64)
$ cat /etc/network/
auto lo
iface lo inet loopback
dns-search virt.ceeness.com maas
dns-nameservers 10.1.0.4
auto ens3
iface ens3 inet manual
mtu 1500
auto ens4
iface ens4 inet6 manual
mtu 1500
auto ens8
iface ens8 inet manual
mtu 1500
iface ens8 inet6 manual
auto ens9
iface ens9 inet manual
mtu 1500
iface ens9 inet6 manual
auto br-ens3
iface br-ens3 inet static
address 10.1.0.30/24
gateway 10.1.0.1
bridge_ports ens3
auto br-ens4
iface br-ens4 inet6 static
address fd4f:0:
gateway fd4f:0:a:5::1
bridge_ports ens4
auto br-ens8
iface br-ens8 inet static
address 10.10.0.2/24
bridge_ports ens8
iface br-ens8 inet6 static
address fd4f:0:a:a:0:1::/64
bridge_ports ens8
auto br-ens9
iface br-ens9 inet static
address 10.11.0.2/24
bridge_ports ens9
iface br-ens9 inet6 static
address fd4f:0:a:b:0:1::/64
bridge_ports ens9
$ ip a
1: lo: <LOOPBACK,
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens3: <BROADCAST,
link/ether 52:54:00:01:00:a0 brd ff:ff:ff:ff:ff:ff
inet6 fe80::5054:
valid_lft forever preferred_lft forever
3: ens4: <BROADCAST,
link/ether 52:54:00:05:00:a0 brd ff:ff:ff:ff:ff:ff
inet6 fe80::5054:
valid_lft forever preferred_lft forever
4: ens8: <BROADCAST,
link/ether 52:54:00:0a:00:a0 brd ff:ff:ff:ff:ff:ff
inet6 fe80::5054:
valid_lft forever preferred_lft forever
5: ens9: <BROADCAST,
link/ether 52:54:00:0b:00:a0 brd ff:ff:ff:ff:ff:ff
inet6 fe80::5054:
valid_lft forever preferred_lft forever
6: br-ens3: <BROADCAST,
link/ether 52:54:00:01:00:a0 brd ff:ff:ff:ff:ff:ff
inet 10.1.0.30/24 brd 10.1.0.255 scope global br-ens3
valid_lft forever preferred_lft forever
inet6 fe80::5054:
valid_lft forever preferred_lft forever
7: br-ens8: <BROADCAST,
link/ether 52:54:00:0a:00:a0 brd ff:ff:ff:ff:ff:ff
inet 10.10.0.2/24 brd 10.10.0.255 scope global br-ens8
valid_lft forever preferred_lft forever
inet6 fd4f:0:a:a:0:1::/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::5054:
valid_lft forever preferred_lft forever
8: br-ens4: <BROADCAST,
link/ether 52:54:00:05:00:a0 brd ff:ff:ff:ff:ff:ff
inet6 fd4f:0:
valid_lft forever preferred_lft forever
inet6 fe80::5054:
valid_lft forever preferred_lft forever
9: br-ens9: <BROADCAST,
link/ether 52:54:00:0b:00:a0 brd ff:ff:ff:ff:ff:ff
inet 10.11.0.2/24 brd 10.11.0.255 scope global br-ens9
valid_lft forever preferred_lft forever
inet6 fd4f:0:a:b:0:1::/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::5054:
valid_lft forever preferred_lft forever
10: lxdbr0: <BROADCAST,
link/ether ba:14:11:c7:20:77 brd ff:ff:ff:ff:ff:ff
inet 10.0.129.1/24 scope global lxdbr0
valid_lft forever preferred_lft forever
inet6 fe80::b814:
valid_lft forever preferred_lft forever
12: vethGU5IKI@if11: <BROADCAST,
link/ether fe:8c:58:1b:fd:df brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet6 fe80::fc8c:
valid_lft forever preferred_lft forever
14: vethRJ1FQK@if13: <BROADCAST,
link/ether fe:a1:eb:54:33:1a brd ff:ff:ff:ff:ff:ff link-netnsid 1
inet6 fe80::fca1:
valid_lft forever preferred_lft forever
16: vethVYHLYW@if15: <BROADCAST,
link/ether fe:58:92:c9:99:0c brd ff:ff:ff:ff:ff:ff link-netnsid 1
inet6 fe80::fc58:
valid_lft forever preferred_lft forever
18: vethX6OURX@if17: <BROADCAST,
link/ether fe:5a:8d:4b:1a:05 brd ff:ff:ff:ff:ff:ff link-netnsid 1
inet6 fe80::fc5a:
valid_lft forever preferred_lft forever
$ logout
Connection to 10.1.0.30 closed.
$ juju ssh 7/lxd/5
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
ubuntu@
auto lo eth1 eth2 eth0
iface lo inet loopback
dns-nameservers 10.1.0.4
dns-search maas virt.ceeness.com
iface eth0 inet static
address 10.1.0.245/24
gateway 10.1.0.1
iface eth1 inet6 static
address fd4f:0:
gateway fd4f:0:a:5::1
iface eth2 inet static
address 10.10.0.5/24
ubuntu@
Connection to 10.1.0.245 closed.
ubuntu@
1: lo: <LOOPBACK,
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: lxdbr0: <BROADCAST,
link/ether ea:7c:59:0e:f8:6b brd ff:ff:ff:ff:ff:ff
inet6 fe80::e87c:
valid_lft forever preferred_lft forever
inet6 fe80::1/64 scope link
valid_lft forever preferred_lft forever
13: eth0@if14: <BROADCAST,
link/ether 00:16:3e:f0:c9:be brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet 10.1.0.245/24 brd 10.1.0.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::216:
valid_lft forever preferred_lft forever
15: eth1@if16: <BROADCAST,
link/ether 00:16:3e:55:f9:da brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet6 fd4f:0:
valid_lft forever preferred_lft forever
inet6 fd4f:0:
valid_lft 3275sec preferred_lft 3275sec
inet6 fe80::216:
valid_lft forever preferred_lft forever
17: eth2@if18: <BROADCAST,
link/ether 00:16:3e:8d:34:ea brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet 10.10.0.5/24 brd 10.10.0.255 scope global eth2
valid_lft forever preferred_lft forever
inet6 fd4f:0:
valid_lft 3311sec preferred_lft 3311sec
inet6 fe80::216:
valid_lft forever preferred_lft forever
ubuntu@
1: lo: <LOOPBACK,
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: lxdbr0: <BROADCAST,
link/ether ea:7c:59:0e:f8:6b brd ff:ff:ff:ff:ff:ff
inet6 fe80::e87c:
valid_lft forever preferred_lft forever
inet6 fe80::1/64 scope link
valid_lft forever preferred_lft forever
13: eth0@if14: <BROADCAST,
link/ether 00:16:3e:f0:c9:be brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet 10.1.0.245/24 brd 10.1.0.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::216:
valid_lft forever preferred_lft forever
15: eth1@if16: <BROADCAST,
link/ether 00:16:3e:55:f9:da brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet6 fd4f:0:
valid_lft forever preferred_lft forever
inet6 fd4f:0:
valid_lft 3265sec preferred_lft 3265sec
inet6 fe80::216:
valid_lft forever preferred_lft forever
17: eth2@if18: <BROADCAST,
link/ether 00:16:3e:8d:34:ea brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet 10.10.0.5/24 brd 10.10.0.255 scope global eth2
valid_lft forever preferred_lft forever
inet6 fd4f:0:
valid_lft 3302sec preferred_lft 3302sec
inet6 fe80::216:
valid_lft forever preferred_lft forever
Changed in juju: | |
assignee: | nobody → Witold Krecicki (wpk) |
milestone: | none → 2.3.0 |
importance: | Undecided → High |
status: | New → Triaged |
Changed in juju: | |
milestone: | 2.3.0 → 2.3-rc1 |
tags: | added: dual-stack ipv6 space |
Changed in juju: | |
assignee: | Witold Krecicki (wpk) → nobody |
milestone: | 2.3-rc1 → none |
importance: | High → Medium |
tags: | added: sts |
I think this has to do with how we are modeling spaces and dual-stack support. My guess is that when defining the LXD container we ask MAAS for an IP address in the requested space, but the space only defines an IPv4 subnet, so that is all we assign the container.
Even if we were assigning multiple addresses, this needs more discussion because of interactions with charms. When a given application has access to 2 addresses, what address do we advertise for other applications to interact with it. Do we give all addresses, a different address, etc. Right now our address field is a single string, so we don't have a way to expose it as a list of addresses.