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

Add networking support in agent #258

Merged
merged 2 commits into from
Apr 8, 2016
Merged

Add networking support in agent #258

merged 2 commits into from
Apr 8, 2016

Conversation

mrjana
Copy link
Contributor

@mrjana mrjana commented Apr 6, 2016

See commit messages for more information

Signed-off-by: Jana Radhakrishnan [email protected]

@docker-codecov-bot
Copy link

Current coverage is 57.49%

Merging #258 into master will decrease coverage by -0.30% as of bf2cb9b

@@            master    #258   diff @@
======================================
  Files           45      45       
  Stmts         6032    6098    +66
  Branches       888     901    +13
  Methods          0       0       
======================================
+ Hit           3486    3506    +20
- Partial        487     492     +5
- Missed        2059    2100    +41

Review entire Coverage Diff as of bf2cb9b


Uncovered Suggestions

  1. +0.69% via ...ager/state/memory.go#293...334
  2. +0.38% via agent/session.go#187...209
  3. +0.29% via agent/agent.go#542...559
  4. See 7 more...

Powered by Codecov. Updated on successful CI builds.

return
}

for _, na := range task.Networks {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be done in the executor, not the agent.

Updated engine-api godeps to `mrjana/engine-api agent`

Signed-off-by: Jana Radhakrishnan <[email protected]>
@mrjana
Copy link
Contributor Author

mrjana commented Apr 7, 2016

Updated the PR. @stevvooe PTAL

@@ -413,6 +413,7 @@ type EndpointResource struct {
// NetworkCreate is the expected body of the "create network" http request message
type NetworkCreate struct {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what to do for vendor updates - this will likely break next time one of us updates godep :/

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated to this PR but we should have a chat regarding the network API endpoints we'll need from engine

/cc @icecrime

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, we don't need to merge this if we are close to making a decision on swarm/engine integration. But are we?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's why I mentioned "unrelated to this PR". It's not a blocker, it just reminded me we should discuss this

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We cannot fork vendored dependencies. I will not go through that madness... 🐹

@aluzzardi
Copy link
Member

Minor comments, LGTM

return &network.NetworkingConfig{EndpointsConfig: epConfig}
}

func (c *containerConfig) networkOptions() []types.NetworkCreate {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

networkCreate.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. Will update.

@stevvooe
Copy link
Contributor

stevvooe commented Apr 7, 2016

Missing an error check on remove but otherwise, LGTM.

This commit adds networking support in agent by processing
task downloads and detecting network references in the task.
When a network reference is detected, a network is created
on the first reference and removed when the last task with a
reference to that network is DEAD.

Also, injected task side networking configuration so that
containers are properly plumbed into the appropriate network.

Signed-off-by: Jana Radhakrishnan <[email protected]>
@mrjana mrjana merged commit ddba678 into moby:master Apr 8, 2016
@mrjana mrjana deleted the anet branch April 8, 2016 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants