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

[1.10] fix l4lb delete lvs services unexpectedly #100

Merged
merged 2 commits into from Jul 13, 2018
Merged

[1.10] fix l4lb delete lvs services unexpectedly #100

merged 2 commits into from Jul 13, 2018

Conversation

mainred
Copy link

@mainred mainred commented Jul 12, 2018

JIRA: https://jira.mesosphere.com/browse/DCOS_OSS-3602
Original PR: dcos/dcos-net#59

l4lb manager has a mistake when caculating services to deleted and
and to added.

for example, we have 1,2,4,5 vips originally, and new vip 3 is added,
so we have the following execution according to function generate_diff

seq oldvips newvips toAdd toDelete Mutation
1 [1,2,4,5] [1,2,3,4,5]
2 [2,4,5] [2,3,4,5] [] [] []
3 [4,5] [3,4,5] [] [] []
4 [5] [3,4,5] [] [4] []
5 [] [3,4,5] [] [4,5] []
return [3,4,5] [4,5] []

l4lb manager has a mistake when caculating services to deleted and
and to added.

for example, we have 1,2,4,5 vips originally, and new vip 3 is added,
so we have the following execution according to function generate_diff

    oldvips         newvips          toAdd    toDelete    Mutation
1. [1,2,4,5]      [1,2,3,4,5]
2. [2,4,5]         [2,3,4,5]            []          []         []
3. [4,5]            [3,4,5]             []          []         []
4. [5]               [3,4,5]            []          [4]        []
5. []                 [3,4,5]           []         [4,5]       []

return                               [3,4,5]        [4,5]        []
@GoelDeepak
Copy link

GoelDeepak commented Jul 12, 2018

@mainred Thanks for the PR. Could you please also add some more test cases to generate_diff?

@urbanserj urbanserj changed the title fix l4lb delete lvs services unexpectedly [1.10] fix l4lb delete lvs services unexpectedly Jul 13, 2018
@urbanserj
Copy link
Contributor

Hey @mainred, could you please just cherry-pick my commit to your branch?

@mainred
Copy link
Author

mainred commented Jul 13, 2018

@urbanserj , done, PTL

@urbanserj urbanserj merged commit 898413c into mesosphere-backup:master Jul 13, 2018
@urbanserj urbanserj mentioned this pull request Jul 13, 2018
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants