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

Fix LoadBalancerMember creation #737

Merged

Conversation

hidekazuna
Copy link
Contributor

@hidekazuna hidekazuna commented Feb 9, 2021

What this PR does / why we need it:

Currently subnet argument is given when creating load balancer member. it causes error.
This PR removes subnet argument so that LBaaS uses the vip_subnet_id parameter value for the subnet UUID

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #738

Special notes for your reviewer:

We follow Deploy a basic HTTP load balancer using a floating IP model. The subnet for lb members equals to vip_subnet_id in this case.

  1. Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

Release note:


When creating loadbalancer member, subnet not found error occurred.
This commit fixes it.
If subnet is not given, LBaaS uses the vip_subnet_id parameter value for
the subnet UUID.
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 9, 2021
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Feb 9, 2021
@hidekazuna
Copy link
Contributor Author

hidekazuna commented Feb 9, 2021

@sbueringer @jichenjc PTAL

@jichenjc
Copy link
Contributor

jichenjc commented Feb 9, 2021

@hidekazuna can you create an issue about this ?
I think you want to avoid the param of subnet in create LB case?
does this means if a network has multiple subnet, we need to choose one of them?

@hidekazuna
Copy link
Contributor Author

@hidekazuna can you create an issue about this ?

I Raised #738, also updated the PR comment.

I think you want to avoid the param of subnet in create LB case?

Yes. more precisely, create LBMember case.

does this means if a network has multiple subnet, we need to choose one of them?

You can not add multiple subnets for CreateMember parameter.
https://github.com/gophercloud/gophercloud/blob/master/openstack/loadbalancer/v2/pools/requests.go#L292

@theopenlab-ci
Copy link

theopenlab-ci bot commented Feb 9, 2021

Build failed.

@hidekazuna
Copy link
Contributor Author

recheck

@theopenlab-ci
Copy link

theopenlab-ci bot commented Feb 10, 2021

Build failed.

@jichenjc
Copy link
Contributor

recheck

@theopenlab-ci
Copy link

theopenlab-ci bot commented Feb 10, 2021

Build failed.

@hidekazuna
Copy link
Contributor Author

recheck

@theopenlab-ci
Copy link

theopenlab-ci bot commented Feb 10, 2021

Build succeeded.

@@ -268,7 +267,6 @@ func (s *Service) ReconcileLoadBalancerMember(clusterName string, machine *clust
Name: name,
ProtocolPort: port,
Address: ip,
Copy link
Member

Choose a reason for hiding this comment

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

So just that I get it right. Instead of setting the correct subnet (which is invisible to Octavia) we don't set it but Octavia then chooses to subnet automatically? (and I guess it chooses the one we would set)

(fyi, OpenStack cloud controller manager also sets the subnet id, but only if it's configured in the cloud.conf)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. If you omit the subnet_id parameter, the vip_subnet_id for the parent load balancer will be used for the member subnet UUID.
https://docs.openstack.org/api-ref/load-balancer/v2/?expanded=create-member-detail#create-member

Copy link
Member

Choose a reason for hiding this comment

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

Sounds good, thx for the info

@sbueringer
Copy link
Member

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hidekazuna, sbueringer

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 15, 2021
@sbueringer
Copy link
Member

@hidekazuna For me it would be okay to merge, so I can also give you a lgtm. Wdyt?

@hidekazuna
Copy link
Contributor Author

@hidekazuna For me it would be okay to merge, so I can also give you a lgtm. Wdyt?

It is good to me.

@jichenjc
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 18, 2021
@k8s-ci-robot k8s-ci-robot merged commit 76f23ba into kubernetes-sigs:master Feb 18, 2021
@hidekazuna hidekazuna deleted the fix_lbmember_creation branch February 24, 2021 12:55
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. 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. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LoadBalancerMember cannot be reconciled
4 participants