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

Use provided VipPortID for OpenStack LB #44387

Merged

Conversation

jamiehannaford
Copy link
Contributor

What this PR does / why we need it:

When creating an OpenStack LoadBalancer, Kubernetes will search through the tenant trying to match the LB's VIP with a port. This is problematic because multiple ports may have the same fixed IP, therefore leading to routing inconsistencies. We should use the port ID provided by the LB's response body instead.

Which issue this PR fixes:

#43909

Special notes for your reviewer:

Since this involves non-deterministic testing, it'd be best if we can run this in a staging environment for a few days before merging (say until early next week).

Release note:

Fixes issue during LB creation where ports where incorrectly assigned to a floating IP

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 12, 2017
@k8s-github-robot k8s-github-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Apr 12, 2017
@k8s-ci-robot
Copy link
Contributor

Hi @jamiehannaford. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with @k8s-bot ok to test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-reviewable
Copy link

This change is Reviewable

@jdef
Copy link
Contributor

jdef commented Apr 12, 2017

ok to test

@mikedanese
Copy link
Member

/approve

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 12, 2017
@jamiehannaford
Copy link
Contributor Author

@jdef @mikedanese Thanks for reviewing. Does this need anything else before LGTM?

@jamiehannaford
Copy link
Contributor Author

Would somebody mind tagging this with /lgtm?

@idvoretskyi idvoretskyi added the area/provider/openstack Issues or PRs related to openstack provider label Apr 19, 2017
@idvoretskyi
Copy link
Member

cc @anguslees @kubernetes/sig-openstack-pr-reviews

return nil, fmt.Errorf("Error getting port for LB vip %s: %v", loadbalancer.VipAddress, err)
}
floatIP, err := getFloatingIPByPortID(lbaas.network, port.ID)
portID := loadbalancer.VipPortID
Copy link
Member

@anguslees anguslees Apr 20, 2017

Choose a reason for hiding this comment

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

I remember why I hate working on this code :(

gophercloud/gophercloud#20 suggests that VipPortID will be undefined when loadbalancer is the result of the "create" branch way above. Can we confirm that this actually works in the "LB doesn't already exist" case on a few recent openstack releases - or perhaps change the create case way above to do a regular "get" after the "create"?

Copy link
Contributor Author

@jamiehannaford jamiehannaford Apr 20, 2017

Choose a reason for hiding this comment

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

It's included in an integration test so I'm pretty sure vip_port_id is returned in the create response. We've also been running this in a dev env for over a week, and things are fixed.

@coreypobrien are we doing create ops?

Copy link
Member

@anguslees anguslees Apr 21, 2017

Choose a reason for hiding this comment

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

The change looks good otherwise, so I'm happy to let this go ahead and let it get more widespread testing. This section of code has been unusually full of dragons, and most of it not caused by us.

/lgtm

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. Would you mind commenting on the main PR thread, I don't think the merge bot tracks /lgtm in inline comments :)

@anguslees
Copy link
Member

Yo bots! I said:
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 24, 2017
@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: anguslees, jamiehannaford, mikedanese

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@anguslees
Copy link
Member

@k8s-bot cvm gce e2e test this

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit ce2f0b1 into kubernetes:master Apr 24, 2017
@k8s-ci-robot
Copy link
Contributor

@jamiehannaford: The following test(s) failed:

Test name Commit Details Rerun command
Jenkins non-CRI GCE e2e 622c69c link @k8s-bot non-cri e2e test this

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

dims pushed a commit to dims/kubernetes that referenced this pull request Feb 8, 2018
…cation

Automatic merge from submit-queue

Use provided VipPortID for OpenStack LB

**What this PR does / why we need it**:

When creating an OpenStack LoadBalancer, Kubernetes will search through the tenant trying to match the LB's VIP with a port. This is problematic because multiple ports may have the same fixed IP, therefore leading to routing inconsistencies. We should use the port ID provided by the LB's response body instead.

**Which issue this PR fixes**:

kubernetes#43909

**Special notes for your reviewer**:

Since this involves non-deterministic testing, it'd be best if we can run this in a staging environment for a few days before merging (say until early next week).

**Release note**:
```release-note
Fixes issue during LB creation where ports where incorrectly assigned to a floating IP
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/provider/openstack Issues or PRs related to openstack provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants