Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gateway ip options are None in swarm mode #1702

Open
LipingMao opened this issue Mar 29, 2017 · 7 comments
Open

gateway ip options are None in swarm mode #1702

LipingMao opened this issue Mar 29, 2017 · 7 comments

Comments

@LipingMao
Copy link

Hi Team,

When I use lagency libnetwork remote plugin, for example, I created a network with gateway ip as follow:
docker network create --driver kuryr --ipam-driver kuryr --subnet 10.225.17.0/24 --gateway 10.225.17.1 --ip-range 10.225.17.0/24 limao_swarm_kuryr

When libnetwork call kuryr ipam driver "/IpamDriver.RequestAddress" request address for gateway ip, it will have Options {"RequestAddressType": "com.docker.network.gateway"}.

But when I use docker swarm mode in 1.13.1, it do not has this Options.

Is this by design or a bug?

Thanks for your help.

@mavenugo
Copy link
Contributor

cc @aboch

@aboch
Copy link
Contributor

aboch commented Mar 29, 2017

@LipingMao That should have been fixed by moby/swarmkit/pull/1805.
I think docker 17.03 has the fix.

@LipingMao
Copy link
Author

@aboch

Thanks for your quick response, I see the pull-request you posted is to fix the problem in RequestPool, my problem is related with RequestAddress.

When I not use Swarm mode, when it RequestAddress for gateway ip, it will has options: {"RequestAddressType": "com.docker.network.gateway"}. But in Swarm mode, the Options are empty.

I'm not familar with swarmkid, but when I try to search "RequestAddress" in swarmkid, I see it did not pass options to RequestAddress, Did I miss anything? Thanks.

manager/allocator/networkallocator/networkallocator.go
784 gwIP, _, err := ipam.RequestAddress(poolID, net.ParseIP(ic.Gateway), nil)

@aboch
Copy link
Contributor

aboch commented Mar 30, 2017

Oh I see. I will take a look.

@LipingMao
Copy link
Author

@aboch thanks for the quick fix.
One quick question: is this fix possible to be backport to stable branch? or it will be only in later release?

@aboch
Copy link
Contributor

aboch commented Apr 13, 2017

At the moment we have not planned to backport it.

@blop
Copy link

blop commented May 29, 2017

Is this related to docker/docs#1636 ?
It seems we can't define gateway (and other options) when using swam mode ?
How do we set the macvlan settings then?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants