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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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
Copy link
Contributor

openshift-ci bot commented Dec 12, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: eslutsky

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

@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 f8fb6c6 to 7e731d3 Compare January 14, 2025 21:00
@eslutsky
Copy link
Contributor Author

@pacevedom , looks like it works now, but default route MTU disccovery is not working with IPv6.
i guess we need to adapt it to ipv6.
from log

 Jan 14 16:40:02 el94-src-ipv6-host1 microshift[1372]: infrastructure-services-manager I0114 16:40:02.931900    1372 ovn.go:59] getClusterMTU: finding default route interface
Jan 14 16:40:02 el94-src-ipv6-host1 microshift[1372]: infrastructure-services-manager I0114 16:40:02.932051    1372 ovn.go:66] getClusterMTU: Couldnt extract MTU from the default route interface , Using Default MTU.```

@eslutsky eslutsky force-pushed the OCPBUGS-38468-2 branch 3 times, most recently from f43f9eb to 2de9382 Compare January 16, 2025 13:38
@@ -266,3 +288,174 @@ func GetHostIPv6(ipHint string) (string, error) {

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to replace these functions with netlink package?

@eslutsky eslutsky force-pushed the OCPBUGS-38468-2 branch 5 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 5 times, most recently from 3a3fe99 to 6722393 Compare January 20, 2025 16:25
Copy link
Contributor

openshift-ci bot commented Jan 20, 2025

@eslutsky: 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
ci/prow/verify 864423c link true /test verify

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.

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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants