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

OCPBUGS-38468: use default route mtu #4315

Merged
merged 1 commit into from
Jan 22, 2025

Conversation

eslutsky
Copy link
Contributor

@eslutsky eslutsky commented Dec 12, 2024

determine if the host has a default gateway based on IPv4 or IPv6 routes, then use its MTU,
the original solution was based on net.GetHostIP which didn't cover cases when we dont have any network connection (hardcoded nodeIP with loopback) .

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 12, 2024
Copy link
Contributor

openshift-ci bot commented Dec 12, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Dec 12, 2024
@openshift-ci-robot
Copy link

@eslutsky: This pull request references Jira Issue OCPBUGS-38468, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.19.0) matches configured target version for branch (4.19.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @jogeo

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Dec 12, 2024
@openshift-ci openshift-ci bot requested a review from jogeo December 12, 2024 11:52
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 12, 2024
@eslutsky
Copy link
Contributor Author

/test metal-periodic-test

Copy link
Contributor

openshift-ci bot commented Dec 12, 2024

@eslutsky: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

/test e2e-aws-footprint-and-performance
/test e2e-aws-tests
/test e2e-aws-tests-arm
/test e2e-aws-tests-bootc
/test e2e-aws-tests-bootc-arm
/test e2e-aws-tests-bootc-periodic
/test e2e-aws-tests-bootc-periodic-arm
/test e2e-aws-tests-cache
/test e2e-aws-tests-cache-arm
/test e2e-aws-tests-periodic
/test e2e-aws-tests-periodic-arm
/test images
/test ocp-full-conformance-optional-components-rhel-eus
/test ocp-full-conformance-optional-components-rhel-eus-arm
/test ocp-full-conformance-rhel-eus
/test ocp-full-conformance-rhel-eus-arm
/test ocp-full-conformance-serial-optional-components-rhel-eus
/test ocp-full-conformance-serial-optional-components-rhel-eus-arm
/test ocp-full-conformance-serial-rhel-eus
/test ocp-full-conformance-serial-rhel-eus-arm
/test test-rpm
/test test-unit
/test verify

The following commands are available to trigger optional jobs:

/test security
/test test-rebase

Use /test all to run the following jobs that were automatically triggered:

pull-ci-openshift-microshift-main-e2e-aws-tests
pull-ci-openshift-microshift-main-e2e-aws-tests-arm
pull-ci-openshift-microshift-main-e2e-aws-tests-bootc
pull-ci-openshift-microshift-main-e2e-aws-tests-bootc-arm
pull-ci-openshift-microshift-main-images
pull-ci-openshift-microshift-main-ocp-full-conformance-rhel-eus
pull-ci-openshift-microshift-main-ocp-full-conformance-rhel-eus-arm
pull-ci-openshift-microshift-main-ocp-full-conformance-serial-rhel-eus
pull-ci-openshift-microshift-main-ocp-full-conformance-serial-rhel-eus-arm
pull-ci-openshift-microshift-main-security
pull-ci-openshift-microshift-main-test-unit
pull-ci-openshift-microshift-main-verify

In response to this:

/test metal-periodic-test

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.

@eslutsky
Copy link
Contributor Author

/test e2e-aws-tests-periodic

@eslutsky eslutsky force-pushed the OCPBUGS-38468-2 branch 2 times, most recently from c934c8f to c044607 Compare December 13, 2024 15:59
@eslutsky
Copy link
Contributor Author

/test e2e-aws-tests-periodic

@eslutsky eslutsky force-pushed the OCPBUGS-38468-2 branch 3 times, most recently from 84c39e3 to 97da4ad Compare December 16, 2024 11:58
@openshift-ci-robot
Copy link

@eslutsky: This pull request references Jira Issue OCPBUGS-38468, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.19.0) matches configured target version for branch (4.19.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @jogeo

In response to this:

introduce parser for "/proc/net/route" to determine if the host has a default gateway set, then use its MTU,
the original solution was based on net.GetHostIP which didn't cover cases when we dont have any network connection (hardcoded nodeIP with loopback) .

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 openshift-eng/jira-lifecycle-plugin repository.

@eslutsky
Copy link
Contributor Author

/test e2e-aws-tests-periodic

@eslutsky
Copy link
Contributor Author

/test verify

@eslutsky eslutsky marked this pull request as ready for review December 17, 2024 16:41
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 17, 2024
@openshift-ci openshift-ci bot requested review from copejon and ggiguash December 17, 2024 16:41
@ggiguash
Copy link
Contributor

ggiguash commented Jan 7, 2025

/retest

@eslutsky
Copy link
Contributor Author

/retest

@eslutsky
Copy link
Contributor Author

logs related to those failures ,
from the journal:

Jan 13 17:33:43 i-0f899d7309062d8a9 microshift[57347]: infrastructure-services-manager W0113 17:33:43.952196   57347 components.go:37] Failed to start CNI plugin: failed to validate ovn-kubernetes configuration: failed to validate OVN-K configuration: interface MTU (1500) is too small for specified overlay (9001)
Jan 13 17:33:43 i-0f899d7309062d8a9 microshift[57347]: infrastructure-services-manager I0113 17:33:43.952225   57347 startuprecorder.go:58] "SERVICE READY" service="infrastructure-services-manager" since-start="21.508052857s"
Jan 13 17:33:43 i-0f899d7309062d8a9 microshift[57347]: infrastructure-services-manager E0113 17:33:43.952219   57347 manager.go:138] "SERVICE FAILED - stopping MicroShift" err="failed to validate ovn-kubernetes configuration: failed to validate OVN-K configuration: interface MTU (1500) is too small for specified overlay (9001)" service="infrastructure-services-manager" since-start="21.508041643s"

@eslutsky
Copy link
Contributor Author

/test e2e-aws-tests-arm

@eslutsky eslutsky force-pushed the OCPBUGS-38468-2 branch 4 times, most recently from eef83e2 to 89b0f65 Compare January 17, 2025 10:46
pkg/util/net.go Outdated
@@ -266,3 +274,55 @@ func GetHostIPv6(ipHint string) (string, error) {

return "", fmt.Errorf("unable to find host IPv6 address")
}

// Find the Default route Interface based on ipv4 or ipv6 routes.
func FindDefaultRouteIface() (iface *tcpnet.Interface, err error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we need to pass the configuration here to determine if MicroShift is running on ipv4, ipv6, or both.
Imagine you have different NICs in the host for each IP family. Default routes would be configured on different devices, therefore they could have different MTUs.
If MicroShift is running on ipv6 check only ipv6 routes.
If MicroShift is running on ipv4 check only ipv4 routes.
If MicroShift is running on both, check both and pick the smallest.
Or is there something I am missing?

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'm not sure its a common scenario for edge devices when you have different Default routes set across different IP families .

Copy link
Contributor Author

@eslutsky eslutsky Jan 17, 2025

Choose a reason for hiding this comment

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

we are calling FindDefaultRouteIface from the ovn package which have its own configuration. the IPv4/6 detection logic is in the config struct .

@eslutsky eslutsky force-pushed the OCPBUGS-38468-2 branch 7 times, most recently from 6722393 to 864423c Compare January 20, 2025 16:28
@eslutsky
Copy link
Contributor Author

/retest

pkg/components/networking.go Outdated Show resolved Hide resolved
pkg/config/ovn/ovn.go Outdated Show resolved Hide resolved
pkg/config/ovn/ovn.go Outdated Show resolved Hide resolved
pkg/util/net.go Outdated Show resolved Hide resolved
pkg/util/net.go Outdated Show resolved Hide resolved
@eslutsky eslutsky force-pushed the OCPBUGS-38468-2 branch 2 times, most recently from 5f436e7 to f7fd5ec Compare January 21, 2025 10:43
@eslutsky
Copy link
Contributor Author

/test e2e-aws-tests-bootc

@eslutsky
Copy link
Contributor Author

/test e2e-aws-tests-bootc-arm

@eslutsky
Copy link
Contributor Author

/test e2e-aws-tests-bootc

Copy link
Contributor

@pacevedom pacevedom left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 22, 2025
Copy link
Contributor

openshift-ci bot commented Jan 22, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: eslutsky, pacevedom

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

Copy link
Contributor

openshift-ci bot commented Jan 22, 2025

@eslutsky: all tests passed!

Full PR test history. Your PR dashboard.

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.

@openshift-merge-bot openshift-merge-bot bot merged commit 1ef3eb4 into openshift:main Jan 22, 2025
11 checks passed
@openshift-ci-robot
Copy link

@eslutsky: Jira Issue OCPBUGS-38468 is in an unrecognized state (ON_QA) and will not be moved to the MODIFIED state.

In response to this:

determine if the host has a default gateway based on IPv4 or IPv6 routes, then use its MTU,
the original solution was based on net.GetHostIP which didn't cover cases when we dont have any network connection (hardcoded nodeIP with loopback) .

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 openshift-eng/jira-lifecycle-plugin repository.

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. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants