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

Static IP doesn't work with with extra weavemesh network with IPAM driver #2046

Closed
sheerun opened this issue Mar 14, 2016 · 9 comments
Closed
Assignees
Labels
Milestone

Comments

@sheerun
Copy link

sheerun commented Mar 14, 2016

Steps to reproduce:

docker network create --driver weavemesh --ipam-driver weavemesh --subnet 10.41.0.0/16 net
docker run --name ubuntu --net net --rm -ti --ip 10.41.0.5 ubuntu ifconfig

Result:

docker: Error response from daemon: IpamDriver.RequestAddress: 404 Not Found: 404 page not found.

Expected result:

Container is created with 10.41.0.5 IP address attached.

Additional notes:

Assigning static IP works perfectly well when leaving default IPAM driver, but it doesn't maintain consistency across hosts (I can assing the same IP twice). weavemesh IPAM driver works only for default weave network that launch-plugin creates.

@bboreham
Copy link
Contributor

Could you say which version of Weave you are using? If < 1.5.0 (which we haven't released yet) then this is fixed by #1916.

@sheerun
Copy link
Author

sheerun commented Mar 14, 2016

I use weave:latest container and weave script from master branch.

@rade
Copy link
Member

rade commented Mar 14, 2016

please post the output of weave version

@sheerun
Copy link
Author

sheerun commented Mar 14, 2016

weave script (unreleased version)
weave router git-05a7024b885d
weave proxy git-05a7024b885d
weave plugin git-05a7024b885d

@rade
Copy link
Member

rade commented Mar 14, 2016

docker version?

@sheerun
Copy link
Author

sheerun commented Mar 14, 2016

Client:
Version: 1.10.2
API version: 1.22
Go version: go1.6
Git commit: c3959b1
Built: Tue Feb 23 21:11:36 UTC 2016
OS/Arch: darwin/amd64

Server:
Version: 1.10.3
API version: 1.22
Go version: go1.5.3
Git commit: 20f81dd
Built: Thu Mar 10 21:49:11 2016
OS/Arch: linux/amd64

@sheerun
Copy link
Author

sheerun commented Mar 14, 2016

But it's the same on coreos server with 1.10.2 as both server and client.

@rade
Copy link
Member

rade commented Mar 14, 2016

reproduced (btw, there was a typo in the OP's instructions):

$ weave launch --log-level=debug
$ docker network create --driver weavemesh --ipam-driver weavemesh --subnet 10.40.0.0/16 net
99e36747b988a6a349789b7cb507b2fde0bddd33d7c57897b2da66ca785551d4
$ docker run --name ubuntu --net net --rm -ti --ip 10.41.0.5 ubuntu ifconfig
docker: Error response from daemon: Invalid preferred address 10.41.0.5: It does not belong to any of this network's subnets.
$ docker run --name ubuntu --net net --rm -ti --ip 10.40.0.5 ubuntu ifconfig
docker: Error response from daemon: IpamDriver.RequestAddress: 404 Not Found: 404 page not found.
$ docker logs weaveplugin
...
DEBU: 2016/03/14 15:36:48.902157 RequestAddress weave-10.40.0.0/16-10.40.0.0/16 10.40.0.5 map[]
DEBU: 2016/03/14 15:36:48.902211 weave PUT to http://127.0.0.1:6784/ip/_/10.40.0.5 with map[]
DEBU: 2016/03/14 15:36:48.902531 allocateIP returned <nil> 404 Not Found: 404 page not found

@rade rade added the bug label Mar 14, 2016
@rade rade added this to the 1.5.0 milestone Mar 14, 2016
@bboreham
Copy link
Contributor

Ah, sorry, this got broken by #2012.

The URL should be http://127.0.0.1:6784/ip/_/10.40.0.5/16

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

No branches or pull requests

3 participants