Skip to content

Remove a network during task SHUTDOWN instead of REMOVE#39174

Merged
thaJeztah merged 1 commit intomoby:masterfrom
arkodg:remove-stale-lb-ep
May 9, 2019
Merged

Remove a network during task SHUTDOWN instead of REMOVE#39174
thaJeztah merged 1 commit intomoby:masterfrom
arkodg:remove-stale-lb-ep

Conversation

@arkodg
Copy link
Copy Markdown
Contributor

@arkodg arkodg commented May 6, 2019

Make sure the LB sandbox is removed when a service is updated
with a --network-rm option

Signed-off-by: Arko Dasgupta arko.dasgupta@docker.com

- What I did

Ensured that the LoadBalancer Sandbox is deleted when a service is updated with --network-rm option

- How I did it

Removed the removeNetworks logic from task REMOVE to task SHUTDOWN

- How to verify it

docker network create -d overlay netTest1
docker network create -d overlay netTest2
docker service create  --name test --network netTest1 --network netTest2 --replicas 2 nginx
docker service update --network-rm netTest2 test
docker network inspect netTest2  # Make sure there are no endpoints including LB

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

@mavenugo
Copy link
Copy Markdown
Contributor

mavenugo commented May 6, 2019

Thanks @arkodg . LGTM.

Can you pls add a simple integration test to cover this scenario ?

make sure the LB sandbox is removed when a service is updated
with a --network-rm option

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
@arkodg arkodg force-pushed the remove-stale-lb-ep branch from df9f649 to 680d0ba Compare May 7, 2019 03:27
@codecov
Copy link
Copy Markdown

codecov bot commented May 7, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@b20a14b). Click here to learn what that means.
The diff coverage is 0%.

@@            Coverage Diff            @@
##             master   #39174   +/-   ##
=========================================
  Coverage          ?      37%           
=========================================
  Files             ?      612           
  Lines             ?    45428           
  Branches          ?        0           
=========================================
  Hits              ?    16809           
  Misses            ?    26332           
  Partials          ?     2287

@mavenugo
Copy link
Copy Markdown
Contributor

mavenugo commented May 7, 2019

@arkodg thanks for adding the test.

LGTM.

@andrewhsu
Copy link
Copy Markdown
Contributor

SGTM

Copy link
Copy Markdown
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM

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