Option is None when request gateway ip in swarm mode

Bug #1677316 reported by Liping Mao
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kuryr-libnetwork
Confirmed
Undecided
Liping Mao

Bug Description

In swarm mode, when request gateway ip, the Options are None. It should has the following option {"RequestAddressType": "com.docker.network.gateway"}

I also open an issue in libnetwork to trace this problem:
https://github.com/docker/libnetwork/issues/1702

Here is detail log, you can see the Options are None:

2017-03-29 12:25:09.526 12 DEBUG kuryr_libnetwork.controllers [-] Received JSON data {u'Address': u'10.225.17.1', u'Options': None, u'PoolID': u'b461d49a-f9e2-406a-a874-e45730bfdecd'} for /IpamDriver.RequestAddress ipam_request_address /usr/lib/python2.7/site-packages/kuryr_libnetwork/controllers.py:1464
2017-03-29 12:25:09.694 12 DEBUG neutronclient.v2_0.client [-] GET call to neutron for https://ci92hf-neutron.qa.webex.com:443/v2.0/subnets.json?subnetpool_id=b461d49a-f9e2-406a-a874-e45730bfdecd used request id req-c811de68-c1ad-49c2-a314-c758edb3dace _append_request_id /usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py:128
2017-03-29 12:25:09.730 12 DEBUG neutronclient.v2_0.client [-] GET call to neutron for https://ci92hf-neutron.qa.webex.com:443/v2.0/subnetpools.json?id=b461d49a-f9e2-406a-a874-e45730bfdecd used request id req-0104961d-780b-4655-b7e4-5f16c148fa30 _append_request_id /usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py:128
2017-03-29 12:25:09.780 12 DEBUG neutronclient.v2_0.client [-] GET call to neutron for https://ci92hf-neutron.qa.webex.com:443/v2.0/subnets.json?cidr=10.225.17.0%2F24 used request id req-f554afe5-6c8a-4dc3-99b9-2d2fea982397 _append_request_id /usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py:128
2017-03-29 12:25:09.809 12 DEBUG neutronclient.v2_0.client [-] GET call to neutron for https://ci92hf-neutron.qa.webex.com:443/v2.0/ports.json?fixed_ips=subnet_id%3Dcd58f1aa-271f-43db-adf9-313ab3102e83&fixed_ips=ip_address%3D10.225.17.1 used request id req-ee9e83e2-dfe4-4cf4-adce-7237b12b559c _append_request_id /usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py:128
2017-03-29 12:25:09.809 12 ERROR kuryr_libnetwork.utils [-] Unexpected error happened: Requested ip address {'subnet_id': u'cd58f1aa-271f-43db-adf9-313ab3102e83', 'ip_address': u'10.225.17.1'} already belongs to a bound Neutron port: bb831888-865a-45cb-a214-d8c90987098e

Revision history for this message
Liping Mao (limao) wrote :

Hyunsun Moon hit similiar problem, and here is the docker version:
Docker version 17.06.0-ce, build 02c1d87

Changed in kuryr-libnetwork:
status: New → Confirmed
assignee: nobody → Liping Mao (limao)
Revision history for this message
Hyunsun Moon (hyunsun-moon) wrote :

Looks like RequestAddressType options is set correctly now with the latest Docker version.
See the log below.

2017-07-21 08:59:53.107 13 INFO kuryr_libnetwork.controllers [-] Received JSON data {u'V6': False, u'Options': None, u'Pool': u'10.10.10.0/24', u'AddressSpace': u'no_address_space', u'SubPool': u''} for /IpamDriver.RequestPool
2017-07-21 08:59:53.322 13 INFO kuryr_libnetwork.controllers [-] Creating subnetpool with the given pool CIDR
2017-07-21 08:59:53.422 13 INFO kuryr_libnetwork.controllers [-] Received JSON data {u'Address': u'10.10.10.1', u'Options': {u'RequestAddressType': u'com.docker.network.gateway'}, u'PoolID': u'840a2580-eb12-4f6c-a270-cde64f77bc41'} for /IpamDriver.RequestAddress
2017-07-21 08:59:53.592 13 CRITICAL kuryr [-] Unhandled error: IOError: write error
2017-07-21 08:59:53.592 13 ERROR kuryr IOError: write error
2017-07-21 08:59:53.592 13 ERROR kuryr
2017-07-21 08:59:53.594 12 INFO kuryr_libnetwork.controllers [-] Received JSON data {u'NetworkID': u'r7aagh38lcptc9m2693q6dr3o', u'IPv4Data': [{u'Pool': u'10.10.10.0/24', u'Gateway': u'10.10.10.1/24', u'AddressSpace': u''}], u'IPv6Data': None, u'Options': {}} for /NetworkDriver.AllocateNetwork

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.