Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Add GET /ip handler to return all IPAM mappings. #1350

Merged
merged 1 commit into from
Apr 6, 2017
Merged

Conversation

tomwilkie
Copy link
Contributor

Scope needs to know the IP addresses of containers.

@rade
Copy link
Member

rade commented Aug 21, 2015

Scope needs to know the IP addresses of containers.

...but what you have implemented only returns the automatically allocated addresses.

What's wrong with weave ps?

@tomwilkie
Copy link
Contributor Author

I don't want to repeatedly invoke a shell script; the idea would be for IPAM to also record the IP addresses of non-allocated containers. Its already told about them by the weave script and the proxy, so 'all' thats needed is for IPAM to not ignore the requests, as it does in https://github.com/weaveworks/weave/blob/master/ipam/claim.go#L34

What do you think?

@rade
Copy link
Member

rade commented Aug 21, 2015

the idea would be for IPAM to also record the IP addresses of non-allocated containers.

IPAM should not get involved in anything outside its range. Introduces an artificial coupling.

I don't want to repeatedly invoke a shell script

That doesn't strike me as all that bad.

@squaremo
Copy link
Contributor

I don't want to repeatedly invoke a shell script

That doesn't strike me as all that bad.

NB in the case of e.g., the docker plugin, the interfaces are not named (exactly) "ethwe"; i.e., weave ps assumes interfaces are assigned by the weave script. It might be a reasonable assumption for the minute, but probably won't remain so.

@tomwilkie
Copy link
Contributor Author

Using the output of weave ps was a pain. Had to include the weave script and the docker cli in the scope image. And have to parse the output of the script. Yuk.

weaveworks/scope#396

@rade
Copy link
Member

rade commented Sep 8, 2015

Using the output of weave ps was a pain

doesn't look all that painful.

Had to include the weave script and the docker cli in the scope image

That is somewhat annoying, but otoh it means you can now also invoke any other weave commands.

Can we close this?

@tomwilkie tomwilkie closed this Sep 8, 2015
@rade rade modified the milestone: n/a Sep 18, 2015
@bboreham
Copy link
Contributor

I need a function like this for debugging, reasonably often.

@bboreham bboreham reopened this Mar 10, 2017
@bboreham bboreham removed this from the n/a milestone Mar 10, 2017
@bboreham bboreham added this to the 2.0 milestone Mar 20, 2017
@bboreham bboreham merged commit d0e0df9 into master Apr 6, 2017
@brb brb deleted the ipam-json branch January 6, 2018 17:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants