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 deletion of address in l4 #1814

Merged
merged 1 commit into from
Sep 15, 2022

Conversation

panslava
Copy link
Contributor

We were trying to delete address with backend service name, but we only reserve address with forwarding rule name

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 14, 2022
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 14, 2022
@panslava
Copy link
Contributor Author

/assign @kl52752

@@ -118,7 +118,7 @@ func (l4 *L4) EnsureInternalLoadBalancerDeleted(svc *corev1.Service) *L4ILBSyncR
result.Error = err
result.GCEResourceInError = annotations.ForwardingRuleResource
}
if err = ensureAddressDeleted(l4.cloud, name, l4.cloud.Region()); err != nil {
if err = ensureAddressDeleted(l4.cloud, frName, l4.cloud.Region()); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

can you fix also ensureFirewallRule function. Argument name indicates that forwarding rule name == loadbalancer name but this is not true. I think this might be the reason of original bug.
YOu can put frName inside this function and later use Name form returned forwaridng rule.
WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thank you, good suggestion, done

We were trying to delete address with backend service name, but we only
reserve address with forwarding rule name

Remove frName argument from ensureForwardingRule, and instead construct
the name on the fly
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 15, 2022
@panslava panslava requested review from kl52752 and removed request for cezarygerard and thockin September 15, 2022 11:22
@kl52752
Copy link
Contributor

kl52752 commented Sep 15, 2022

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 15, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kl52752, panslava

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 merged commit e3e6f46 into kubernetes:master Sep 15, 2022
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/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants