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

Add checking all IPs in Service reachibility verification #2188

Merged
merged 1 commit into from
Nov 21, 2022

Conversation

panslava
Copy link
Contributor

@panslava panslava commented Nov 9, 2022

This is adding support for Dual Stack Kubernetes services

What type of PR is this?

/kind feature

What this PR does / why we need it:

When checking if service is reachable we were checking only first Service IP
This PR adds checking all IPs, this adds support for DualStack services, which can have 2 IPs

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 9, 2022
This is adding support for Dual Stack Kubernetes services
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 9, 2022
@panslava
Copy link
Contributor Author

panslava commented Nov 9, 2022

/assign @mborsz @marseel

@panslava
Copy link
Contributor Author

panslava commented Nov 9, 2022

/test pull-perf-tests-clusterloader2-kubemark

@panslava
Copy link
Contributor Author

panslava commented Nov 9, 2022

/retest

@panslava
Copy link
Contributor Author

panslava commented Nov 9, 2022

/test pull-perf-tests-clusterloader2-kubemark

address := net.JoinHostPort(ip, fmt.Sprint(port))
command := fmt.Sprintf("curl %s", address)
_, err = execservice.RunCommand(pod, command)
if err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

Consider using ErrorList for collecting errors from attempted connections to all the IP addresses rather than immediately breaking from the loop on receiving the first non-nil error here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree that would be useful, if we wanted to return errors, or log them

But here we just want to check if both IPs are reachable, what is the benefit of checking second one, if we know, that first one already failed?

Copy link
Member

Choose a reason for hiding this comment

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

Ah, I didn't read the rest of this measurement's logic. I thought we're plugging this error through somewhere higher up the call stack and wanted to know if, for instance, IPv6 network programming failed but IPv4 did not 🤷.

In that case I'm okay with leaving it as it is.

@panslava
Copy link
Contributor Author

/retest

@tosi3k
Copy link
Member

tosi3k commented Nov 16, 2022

/retest
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 16, 2022
@marseel
Copy link
Member

marseel commented Nov 16, 2022

/approve

@panslava
Copy link
Contributor Author

/assign @marseel

@mborsz
Copy link
Member

mborsz commented Nov 21, 2022

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: marseel, mborsz, panslava, tosi3k

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 Nov 21, 2022
@k8s-ci-robot k8s-ci-robot merged commit ab08e04 into kubernetes:master Nov 21, 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. kind/feature Categorizes issue or PR as related to a new feature. 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.

5 participants