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
Hyunsun Moon hit similiar problem, and here is the docker version:
Docker version 17.06.0-ce, build 02c1d87