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

If the IP is on the lo device already don't fail #205

Merged
merged 4 commits into from
Jan 30, 2025

Conversation

dprotaso
Copy link
Contributor

@dprotaso dprotaso commented Jan 30, 2025

This might be the fix for #189 or #192

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 30, 2025
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jan 30, 2025
@dprotaso dprotaso force-pushed the dont-fail-on-ip-add branch from 9d9eecd to f99e218 Compare January 30, 2025 00:05
@dprotaso dprotaso force-pushed the dont-fail-on-ip-add branch from f99e218 to ef71908 Compare January 30, 2025 00:06
@aojea
Copy link
Contributor

aojea commented Jan 30, 2025

great catch, I think we may keep that the same and instead, on the caller, just ignore the error and log, but not stop the loadbalancer creation, since the tunnels may have different errors on different OS I think this approach is more resilient

if s.tunnelManager != nil {
klog.V(2).Infof("updating loadbalancer tunnels on userspace")
err = s.tunnelManager.setupTunnels(loadBalancerName(clusterName, service))
if err != nil {
return nil, err
}
}

replacing return nil, err by a log klog.Infof("Failed to create tunn: %v", err)

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 30, 2025
if err != nil {
return err
klog.V(4).Infof("error adding IP to local interface: %v - %s", err, output)
Copy link
Contributor

@aojea aojea Jan 30, 2025

Choose a reason for hiding this comment

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

wrap the error here, I think this tunnel is ok to return the error ... I find better if we swallow it here by logging it at normal level, as the tunnel is an addon for certain environments it should not block the loadbalancer creation but it should be easy for the user to find the error in the logs

if s.tunnelManager != nil {
klog.V(2).Infof("updating loadbalancer tunnels on userspace")
err = s.tunnelManager.setupTunnels(loadBalancerName(clusterName, service))
if err != nil {
return nil, err
}
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

pushed - take a look at the edits

pkg/loadbalancer/server.go Outdated Show resolved Hide resolved
@aojea
Copy link
Contributor

aojea commented Jan 30, 2025

/approve

one change only for final lgtm #205 (comment)

Thanks

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 30, 2025
@k8s-ci-robot
Copy link
Contributor

@dprotaso: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cloud-provider-kind-conformance-parallel-ga-only 768e95c link false /test pull-cloud-provider-kind-conformance-parallel-ga-only

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-sigs/prow repository. I understand the commands that are listed here.

@aojea
Copy link
Contributor

aojea commented Jan 30, 2025

/lgtm
/approve

Thanks

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aojea, dprotaso

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 a6ab571 into kubernetes-sigs:main Jan 30, 2025
5 of 7 checks passed
@dprotaso dprotaso deleted the dont-fail-on-ip-add branch January 31, 2025 02:13
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/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.

3 participants