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

How do drivers decide the ethX name? #141

Closed
shettyg opened this issue May 10, 2015 · 6 comments
Closed

How do drivers decide the ethX name? #141

shettyg opened this issue May 10, 2015 · 6 comments

Comments

@shettyg
Copy link

shettyg commented May 10, 2015

Currently it is expected that driver.CreateEndpoint() returns back the sandbox.info structure that needs to include ip, gateway, veth_inside and veth_outside information. (Where veth_inside is "The name that will be assigned to the interface once moved inside a network namespace.")

As I see it, the driver cannot return back that information because it does not know how many other endpoints will be added to the container in question. What is the thought process of the designers here?

@mrjana
Copy link
Contributor

mrjana commented May 10, 2015

@shettyg Was busy integrating libnetwork with docker hence the delay in answering some of your earlier questions. Getting back to this question, the interface SrcName, DstName being present as part of the return value of the CreateEndpoint is an artifact of an earlier design where endpoint was a local resource and a container joined it during CreateEndpoint. With the goal of Endpoint being a service abstraction and hence a universal resource, it makes no more sense to keep interface names as part of information returned during CreateEndpoint. The IP addresses still will remain as part of CreateEndpont info. But expect a few adjustments in what needs to be returned during endpoint create and join which will hopefully clarify all these questions. I will probably push a PR tomorrow to fix this. Please take a look and comment.

@tomdee
Copy link
Contributor

tomdee commented May 13, 2015

@mrjana Any update on this? This sounds like quite a significant change to the API. If you're not ready to push code for it, could you at least update the design doc (on a branch)?

@mrjana
Copy link
Contributor

mrjana commented May 13, 2015

@tomdee I am getting back to working on this. Our first priority was to settle down the libnetwork northbound apis so that we can get it integrated with docker core for which we have a PR in progress. It should probably not be that much of a change in driver API other than only IP addresses required to be returned during CreateEndpoint and everything else during Join. I will try to push a PR today and update the doc. If not I will try to see if we can send a doc update PR.

@tomdee
Copy link
Contributor

tomdee commented May 13, 2015

@mrjana Thanks for the quick response. That all sounds good.

@squaremo
Copy link
Contributor

Is this (or rather, the analogous problem with Join) addressed by #193, which changed the meaning of DstName to be a prefix to which libnetwork appends an index?

@mrjana
Copy link
Contributor

mrjana commented May 22, 2015

@squaremo Yes, and I think we should close this issue

@mrjana mrjana closed this as completed May 22, 2015
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