juju/utils/GetAddressesForInterface only returns IPv4 addresses

Bug #1575229 reported by John A Meinel
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
juju
Triaged
High
Unassigned

Bug Description

LXD cannot be configured to support IPv6 addresses at the moment.

'juju bootstrap ... lxd' uses functionality to pass an address to the containers for what IP address they should contact. It uses github.com/juju/utils GetAddressForInterface("lxdbr0")
However that function calls GetIPv4Addresses() thus will only return an IPv4 address.

Tags: ipv6 lxd
Revision history for this message
John A Meinel (jameinel) wrote :

This may not affect LXD containers but it definitely impacts the LXD provider.

affects: juju-core → juju
Changed in juju:
milestone: none → 2.1.0
tags: added: unit-tests
Revision history for this message
Anastasia (anastasia-macmood) wrote :

Removing 2.1 milestone as we will not be addressing this issue in 2.1.

Changed in juju:
milestone: 2.1.0 → none
Revision history for this message
Anastasia (anastasia-macmood) wrote :

@John A Meinel (jameinel) ,

So what is the correct solution here?

1. To get lxd provider (provider/lxd/server.go) to call juju/utils/network.go.GetV4orV6AddressForInterface()

or

2. To change GetAddressForInterface() to try to get IPv4 but if not there to return IPv6? i.e. making the call to support IPv6 as well?

Changed in juju:
status: Triaged → Incomplete
Revision history for this message
Joseph Phillips (manadart) wrote :

I think part of the eventual solution would be to use `GetV4orV6AddressForInterface`.

But container networking (see container/lxd/network.go) is set up to ensure that the LXD bridge only uses IPv4, so a controller inside a container could not access the service via IPv6 anyway.

Revision history for this message
John A Meinel (jameinel) wrote :

So the goal with this bug is to denote that we shouldn't *need* to disallow IPv6. Probably we need to watch out for Dual Stack (both V4 and V6 at the same time would probably confuse us, but there isn't any reason to think that we couldn't handle v6 everywhere.)
Having GetAddressForInterface handle 4 or 6 would be the best, and getting rid of the "must not have v6" in the container networking code.

Changed in juju:
status: Incomplete → Triaged
tags: removed: unit-tests
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers