[openstack-dev] [kuryr] [neutron] libnetwork endpoint to Neutron abstractions

Taku Fukushima tfukushima at midokura.com
Sun Aug 23 23:10:29 UTC 2015


Hi,

According to the libnetwork remote driver spec, multiple Address and
AddressIPv6 are passed as a part of Interfaces property passed to the
handler of /NetworkDriver.CreateEndpoint [1]. We have no clue other than
this to get enough information to create Neutron subnets. So we need to
create the subnets dynamically here rather than when we create a Docker
network.

In my patch I create one or two subnets depending on Address and/or
AddressIPv6 are provided. But Docker endpoints can be created more than
once specifying the single subnet and it's better to reuse the same one if
it's already created. By default Kuryr doesn't specify allocation_pools for
creating a Neutron subnet and thus it tries to allocate all IP addresses in
the subnet [2].

Therefore I'd make the following assumption.

1. On the endpoint creation it examine if there's a subnet which CIDR
corresponds to Address or AddressIPv6 requested
2. If there's the subnet, Kuryr tires to reuse it without creating a new
subnet, otherwise it create a new one with the given CIDR
3. Kuryr creates a port assigning the IP address to it and associating the
port with the subnet based on it's already allocated in 2.

I think this would work but let me know if I'm missing anything and I'd
like to hear from experts.

[1]:
https://github.com/docker/libnetwork/blob/master/docs/remote.md#create-endpoint
[2]: http://developer.openstack.org/api-ref-networking-v2.html#createSubnet

Best regards,
Taku Fukushima

On Fri, Aug 21, 2015 at 5:51 PM, Antoni Segura Puimedon <
toni+openstackml at midokura.com> wrote:

> Hi list,
>
> I was reviewing the CreateEndpoint patch[1] from Taku that had received
> positive reviews. I put some comment about an alternative way to map
> endpoints to nets and subnets and I would appreciate some discussion here
> on the mailing list about the original proposal and the alternative I
> mentioned.
>
> Regards,
>
> Toni
>
>
> =====================
> [1] https://review.openstack.org/#/c/210052/9//COMMIT_MSG
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150824/fe779fd9/attachment.html>


More information about the OpenStack-dev mailing list