Separate service LB & SD from network plumbing#1550
Merged
mavenugo merged 1 commit intomoby:masterfrom Nov 18, 2016
Merged
Conversation
aboch
reviewed
Nov 17, 2016
agent.go
Outdated
| } | ||
|
|
||
| for _, te := range ep.joinInfo.driverTableEntries { | ||
| if err := n.ctrlr.agent.networkDB.CreateEntry(te.tableName, n.ID(), te.key, te.value); err != nil { |
Contributor
There was a problem hiding this comment.
agent can come and go.
Please acquire the agent pointer under lock before getting into the loop.
aboch
reviewed
Nov 17, 2016
|
|
||
| for _, te := range ep.joinInfo.driverTableEntries { | ||
| if err := n.ctrlr.agent.networkDB.CreateEntry(te.tableName, n.ID(), te.key, te.value); err != nil { | ||
| return err |
Contributor
There was a problem hiding this comment.
Do you think it could help to add more context to the returned error so that we know entry creation failed during driver info addition phase, so that we distinguish from service info addition phase.
Author
There was a problem hiding this comment.
networkdb errors include the table_name which is be sufficient to infer what failed. Corrected one error message in which table name wasn't included.
aboch
reviewed
Nov 17, 2016
agent.go
Outdated
| } | ||
|
|
||
| for _, te := range ep.joinInfo.driverTableEntries { | ||
| if err := n.ctrlr.agent.networkDB.DeleteEntry(te.tableName, n.ID(), te.key); err != nil { |
Contributor
There was a problem hiding this comment.
same here and in the service function, pls acquire agent pointer under lock before getting into the loop
Signed-off-by: Santhosh Manohar <[email protected]>
Author
|
@aboch Addressed the comment. PTAL |
Contributor
|
LGTM |
1 similar comment
Contributor
|
LGTM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
EnableServiceandDisableServiceAPIs allow a service to be accessible through Service Discovery and Load Balancer only if the image's healthcheck passes. Currently these APIs control the network plumbing as well. So if the healthcheck of an image tries to connect to other services on the same network it will not work. This PR separates the networking plumbing from the<Enable|Disable>ServiceAPIs.This will also help in the upgrade case where we want to take the service out of availability (ie: no new client connections to the service), but the existing connections should work till a grace period.
Signed-off-by: Santhosh Manohar [email protected]