Skip to content

Enabling ILB/ELB on windows using per-node, per-network LB endpoint.#1925

Merged
fcrisciani merged 4 commits intomoby:masterfrom
pradipd:windows_routingmesh
Sep 12, 2017
Merged

Enabling ILB/ELB on windows using per-node, per-network LB endpoint.#1925
fcrisciani merged 4 commits intomoby:masterfrom
pradipd:windows_routingmesh

Conversation

@pradipd
Copy link
Copy Markdown
Contributor

@pradipd pradipd commented Aug 29, 2017

This is 1 of 3 PRs (the other 2 are in swarmkit and moby repos).

This change enables ILB/ELB functionality on windows using a per-node, per-network LB endpoint. The per-node, per-network LB endpoint was discussed with docker
as a solution to moby/moby#30820. Note that only windows is using the LB endpoint. We have not changed the linux networking code to take advantage of the LB endpoint.

Signed-off-by: Pradip Dhara pradipd@microsoft.com

Signed-off-by: Pradip Dhara <pradipd@microsoft.com>
@pradipd
Copy link
Copy Markdown
Contributor Author

pradipd commented Aug 29, 2017

@fcrisciani
Copy link
Copy Markdown

@pradipd looks like there is a compilation error:

./service_windows.go:72: too many arguments in call to hcsshim.AddLoadBalancer
	have ([]hcsshim.HNSEndpoint, bool, string, string, number, number, number)
	want ([]hcsshim.HNSEndpoint, bool, string, uint16, uint16, uint16)
./service_windows.go:106: too many arguments in call to hcsshim.AddLoadBalancer
	have ([]hcsshim.HNSEndpoint, bool, string, string, uint16, uint16, uint16)
	want ([]hcsshim.HNSEndpoint, bool, string, uint16, uint16, uint16)

Signed-off-by: Pradip Dhara <pradipd@microsoft.com>
@pradipd
Copy link
Copy Markdown
Contributor Author

pradipd commented Aug 30, 2017

I needed to vendor the latest hcsshim.
How do I build libnetwork?

@fcrisciani
Copy link
Copy Markdown

@pradipd you can just do make but that after the build will also run the tests, you can then just ctrl+c

…work then quickly leaving swarm.

This issue was uncovered in TestOverlayAttachableReleaseResourcesOnFailure.

Signed-off-by: Pradip Dhara <pradipd@microsoft.com>
Copy link
Copy Markdown

@fcrisciani fcrisciani left a comment

Choose a reason for hiding this comment

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

few nits but overall is fine to me

Comment thread endpoint.go Outdated
}
}

//CreateOptionLoadBalancer function returns an option setter for denoting the endpoint is a load balancer for a network
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

space missing after the //

Comment thread sandbox.go Outdated
}

if index == -1 {
logrus.Errorf("Endpoint %s has already been deleted", ep.Name())
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Considering that no action is taken, should we move this to warning?

Comment thread service_windows.go

ilbPolicy, err := hcsshim.AddLoadBalancer(endpoints, true, sourceVIP, vip.String(), 0, 0, 0)
if err != nil {
logrus.Errorf("Failed to add ILB policy for service %s (%s) with endpoints %v using load balancer IP %s on network %s: %v",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

same here, is this an error or a warning? Also do you want to continue with the following logic or return?

Signed-off-by: Pradip Dhara <pradipd@microsoft.com>
@fcrisciani
Copy link
Copy Markdown

LGTM
@vieux @mavenugo @abhinandanpb can you guys take a look too?

@vieux
Copy link
Copy Markdown
Contributor

vieux commented Sep 12, 2017

LGTM

@fcrisciani fcrisciani merged commit 60e002d into moby:master Sep 12, 2017
@pradipd pradipd deleted the windows_routingmesh branch September 19, 2017 05:02
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.

3 participants