Handle port with both ipv4 and ipv6

Bug #1668803 reported by hongbin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kuryr-libnetwork
Fix Released
Undecided
hongbin

Bug Description

The steps to reproduce:

$ neutron net-create test
$ neutron subnet-create test 10.2.0.0/24
$ neutron subnet-create --ip-version 6 test fe81::/64
$ IP=$(neutron port-create test | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b")
$ docker network create -d kuryr --ipam-driver=kuryr --subnet 10.2.0.0/24 --gateway 10.2.0.1 -o neutron.net.name=test foo
$ docker run --net=foo -itd --name=container1 --ip $IP busybox
81977d6a45de1a58f53f36485f89c1084bf84d41bdc5812518e297ffc4273b42
docker: Error response from daemon: failed to create endpoint container1 on network foo: NetworkDriver.CreateEndpoint: u'8914fe13-226b-4f55-9cda-f0a7279479b5'.

From the server log, there is an exception: http://paste.openstack.org/show/601014/

UPDATE 1:

This bug was tracked down to kuryr-libnetwork for handling ports with dual networks (ipv4 & ipv6). The steps to reproduce:

$ neutron net-create test
$ neutron subnet-create test 10.2.0.0/24
$ neutron subnet-create --ip-version 6 test fe80::/64
$ docker network create --driver=kuryr --ipam-driver=kuryr --subnet 10.2.0.0/24 --gateway 10.2.0.1 --ipv6 --subnet fe80::/64 --gateway fe80::1 --opt neutron.net.name=test dualnet
$ neutron port-create test
$ docker run --net=dualnet -itd --name=container --ip 10.2.0.4 --ip6 fe80::8 busybox
e4953813d80b3d2a1cdba13df6ed39765545e1d23b053407c1de332adb51a22a
docker: Error response from daemon: IpamDriver.RequestAddress: Requested ip address {'subnet_id': u'b42a709f-3d78-48ce-9362-e238ec82edc6', 'ip_address': u'fe80::8'} already belongs to a bound Neutron port: 61032935-a787-4f6f-bfa4-21cc78e78ac9.

hongbin (hongbin034)
Changed in kuryr:
assignee: nobody → hongbin (hongbin034)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kuryr (master)

Fix proposed to branch: master
Review: https://review.openstack.org/439251

Changed in kuryr:
status: New → In Progress
Revision history for this message
Irena Berezovsky (irenab) wrote : Re: Error on configuring container interface

I wonder if this case is valid and if not being able to find the subnet is actually hides another bug

Changed in kuryr:
importance: Undecided → High
hongbin (hongbin034)
description: updated
no longer affects: kuryr
Changed in kuryr-libnetwork:
assignee: nobody → hongbin (hongbin034)
hongbin (hongbin034)
summary: - Error on configuring container interface
+ Handle port with both ipv4 and ipv6
Changed in kuryr-libnetwork:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kuryr-libnetwork (master)

Reviewed: https://review.openstack.org/439932
Committed: https://git.openstack.org/cgit/openstack/kuryr-libnetwork/commit/?id=a3739822a9cc3c13623c3b93c9f43a643a07e78c
Submitter: Jenkins
Branch: master

commit a3739822a9cc3c13623c3b93c9f43a643a07e78c
Author: Hongbin Lu <email address hidden>
Date: Thu Mar 2 00:20:18 2017 +0000

    Handle containers with both ipv4 & ipv6

    To create a container with an existing port that has both ipv4
    and ipv6 addresses, IpamDriver.RequestAddress will be called twice
    to request the ipv4 and ipv6 address for the same port. In before,
    this was not allowed, which blocked the dual addresses scenario.
    This commit fixed it.

    Closes-Bug: #1668803
    Change-Id: I51722b818d047968e8900182f35efdf21a94afde

Changed in kuryr-libnetwork:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.