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: refresh the load balancer object after updating backend pools to… #4839

Merged
merged 1 commit into from Oct 26, 2023

Conversation

nilo19
Copy link
Contributor

@nilo19 nilo19 commented Oct 25, 2023

… prevent etag mismatch error

What type of PR is this?

/kind bug

What this PR does / why we need it:

We used to refresh the LB object after updating the backend pools inside the function ReconcileBackendPools, but the new LB object is not read by the code outside of the function. In this case, the etag of the LB will be outdated and cause HTTP 412 error. This PR ensures the LB is updated after any changes.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

fix: refresh the load balancer object after updating backend pools to prevent etag mismatch error

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Oct 25, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nilo19

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 approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 25, 2023
@nilo19 nilo19 removed the request for review from jwtty October 25, 2023 06:23
@nilo19
Copy link
Contributor Author

nilo19 commented Oct 25, 2023

/test pull-cloud-provider-azure-e2e-ccm-vmss-multi-slb-capz

Copy link
Member

@feiskyer feiskyer left a comment

Choose a reason for hiding this comment

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

Looks good

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 25, 2023
@nilo19
Copy link
Contributor Author

nilo19 commented Oct 26, 2023

/retest

@k8s-ci-robot k8s-ci-robot merged commit efb9e03 into kubernetes-sigs:master Oct 26, 2023
17 checks passed
@nilo19 nilo19 deleted the fix/etag branch October 26, 2023 13:34
@nilo19
Copy link
Contributor Author

nilo19 commented Oct 26, 2023

/cherrypick release-1.28

@k8s-infra-cherrypick-robot

@nilo19: new pull request created: #4853

In response to this:

/cherrypick release-1.28

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.

@nilo19
Copy link
Contributor Author

nilo19 commented Oct 26, 2023

/cherrypick release-1.27

@k8s-infra-cherrypick-robot

@nilo19: #4839 failed to apply on top of branch "release-1.27":

Applying: fix: refresh the load balancer object after updating backend pools to prevent etag mismatch error
Using index info to reconstruct a base tree...
M	pkg/provider/azure_loadbalancer.go
M	pkg/provider/azure_loadbalancer_backendpool.go
M	pkg/provider/azure_loadbalancer_backendpool_test.go
M	pkg/provider/azure_loadbalancer_test.go
M	pkg/provider/azure_test.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/provider/azure_test.go
Auto-merging pkg/provider/azure_loadbalancer_test.go
Auto-merging pkg/provider/azure_loadbalancer_backendpool_test.go
Auto-merging pkg/provider/azure_loadbalancer_backendpool.go
Auto-merging pkg/provider/azure_loadbalancer.go
CONFLICT (content): Merge conflict in pkg/provider/azure_loadbalancer.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 fix: refresh the load balancer object after updating backend pools to prevent etag mismatch error
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherrypick release-1.27

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.

@feiskyer
Copy link
Member

@nilo19 cherry-picks need to be done manually

k8s-ci-robot added a commit that referenced this pull request Oct 30, 2023
k8s-ci-robot added a commit that referenced this pull request Oct 30, 2023
nilo19 added a commit that referenced this pull request Oct 30, 2023
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. kind/bug Categorizes issue or PR as related to a bug. 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/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants