1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

16 commits

Author SHA1 Message Date
Jana Radhakrishnan
82457d17b0 Make sure to not remove backends on stale notices
Sometimes you may get stale backend removal notices from gossip due to
some lingering state. If a stale backend notice is received and it is
already processed in this node ignore it rather than processing it.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-08-02 14:19:22 -07:00
Jana Radhakrishnan
8a225de00d Merge pull request #1205 from allencloud/fix-typos
use grep to find a/an misuse
2016-08-01 09:49:31 -07:00
Jana Radhakrishnan
2988086ab1 Do not remove service record while scaling down
While scaling down, currently we are removing the service record even if
the LB entry for the vip is not fully removed. This causes resolution
issues when scaling down. Fixed it by removing the service record only
if the LB for the vip is going away.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-06-29 11:51:32 -07:00
Jana Radhakrishnan
bc89397105 Index service on both id and portconfigs
While trying to update loadbalancer state index the service both on id
and portconfig. From libnetwork point of view a service is not just
defined by its id but also the ports it exposes. When a service updates
its port its id remains the same but its portconfigs change which should
be treated as a new service in libnetwork in order to ensure proper
cleanup of old LB state and creation of new LB state.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-06-27 15:37:22 -07:00
Jana Radhakrishnan
ad35d257ff Match only locally destined requests for ingress
Currently even outgoing connection requests are matched to inject into
DOCKER-INGRESS chain. This is not correct because it disrupts access to
services outside the host on the same service port. Instead inject only
the locally destined packets towards DOCKER-INGRESS chain.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-06-17 09:57:58 -07:00
Jana Radhakrishnan
d5ce149555 Do not add loadbalancer to unpopulated sandboxes
When adding a loadbalancer to a sandbox, the sandbox may have a valid
namespace but it might not have populated all the dependent network
resources yet. In that case do not populate that endpoint's loadbalancer
into that sandbox yet. The loadbalancer will be populated into the
sandbox when it is done populating all the dependent network resources.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-06-15 19:58:33 -07:00
Jana Radhakrishnan
acac7ee812 Add service alias support
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-06-14 16:40:54 -07:00
Jana Radhakrishnan
297a7e9039 Change port names in agent proto
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-06-13 14:11:18 -07:00
Jana Radhakrishnan
04f3247c3d Add support for ingress LB in localhost
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-06-12 17:28:28 -07:00
Jana Radhakrishnan
10fcb9dd2a Add all backend ip into service records if no vip
Right now if no vip is provided only when a new loadbalancer is created
we add the service records of the backend ip. But it should happen all
the time. This is to make DNS RR on service name work.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-06-09 15:47:09 -07:00
Jana Radhakrishnan
4d1a5ce968 Fix a lb rule race in loadbalancer
When a goroutine which is adding the service and another which is adding
just a destination interleave the destination which is dependent on the
service may not get added and will result in service working at reduced
scale. The fix is to synchronize this with the service mutex.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-06-07 17:07:24 -07:00
Jana Radhakrishnan
dea36fd997 Move ingress port forwarding rules to a chain
- Moved ingress port forwarding rules to its own chain
     - Flushed the chain during init
     - Bound to the swarm ports so no hijacks it.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-06-07 11:50:17 -07:00
Jana Radhakrishnan
3b3d49cc4c Do not attempt LB plumbing until sandbox is ready
Also do not log error messages when adding a destination and it already
exists. This can happen because of duplicate gossip notifications.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-06-05 13:45:52 -07:00
Jana Radhakrishnan
0f89c9b7bc Add ingress load balancer
Ingress load balancer is achieved via a service sandbox which acts as
the proxy to translate incoming node port requests and mapping that to a
service entry. Once the right service is identified, the same internal
loadbalancer implementation is used to load balance to the right backend
instance.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-06-04 20:38:32 -07:00
allencloud
9f415d0cdb use grep to find a/an misuse
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-06-03 16:35:33 +08:00
Jana Radhakrishnan
d05adebf30 Add loadbalancer support
This PR adds support for loadbalancing across a group of endpoints that
share the same service configuration as passed in by
`OptionService`. The loadbalancer is implemented using ipvs with just
round robin scheduling supported for now.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-05-26 13:05:58 -07:00