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

[proxy] Add IPAM support #657

Closed
paulbellamy opened this issue May 14, 2015 · 8 comments · Fixed by #721
Closed

[proxy] Add IPAM support #657

paulbellamy opened this issue May 14, 2015 · 8 comments · Fixed by #721

Comments

@paulbellamy
Copy link
Contributor

No description provided.

@rade rade added the feature label May 14, 2015
@rade
Copy link
Member

rade commented May 19, 2015

strawman:

  1. make -e WEAVE_CIDR= (i.e. an empty WEAVE_CIDR) perform IPAM
  2. add a --ipam flag to the proxy startup, which enables a mode in which all container starts without a WEAVE_CIDR will do IPAM

@paulbellamy
Copy link
Contributor Author

@rade:
For 1, could make -e WEAVE_CIDR=auto perform IPAM, as blank var vs unset var could be confusing to users. (And giving special semantics to a blank CIDR feels kludgey)

For 2, any reason not to make this the default? It is the default for the router, correct?

@paulbellamy
Copy link
Contributor Author

Also for 2, is there a way for the proxy to ask the router if IPAM is enabled? Adds a bit of complexity around what to do if the router is unavailable, but we need to handle that anyway.

@rade
Copy link
Member

rade commented May 19, 2015

The reason to go for blank vars is consistency with how IPAM gets triggered in weave commands. i.e. IPAM is used iff the user did not supply any IPs. I don't mind supporting =auto too.

I don't think automatic IPAM should be the default; just like --with-dns shouldn't be. Our proxy should be a null-op proxy unless the user does something special, i.e. adorn their containers with WEAVE_CIDRs or supply some flags on proxy launch.

I'd leave out the 'figure out whether IPAM is enabled'. Can do that later if we feel like it.

@paulbellamy
Copy link
Contributor Author

Personally, I'd expect docker run -e 'WEAVE_CIDR=' ubuntu to have the same behaviour as docker run ubuntu. Which makes me favour option 2, with an eye to deprecating --ipam for auto-detection in the future.

@bboreham
Copy link
Contributor

is there a way for the proxy to ask the router if IPAM is enabled?

The /status http request will have a line beginning 'Allocator'. I don't think there is any more direct route, but one could easily be added.

@rade
Copy link
Member

rade commented May 19, 2015

I'd expect docker run -e 'WEAVE_CIDR=' ubuntu to have the same behaviour as docker run ubuntu.

I would not!

with an eye to deprecating --ipam for auto-detection in the future.

Then you are left with no way of using the proxy for ordinary (non-weave) containers.

@paulbellamy
Copy link
Contributor Author

Since being able to use the proxy for both weave and non-weave containers is quite important, then option 1 is probably a better choice.

So, let's make WEAVE_CIDR= enable IPAM for that container. With no support for "...=auto", as it adds one more thing for users to learn with no benefit.

@rade rade closed this as completed in #721 May 23, 2015
rade added a commit that referenced this issue May 23, 2015
@rade rade modified the milestone: 0.11.0 May 24, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants