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-21831: [release-4.14] Set MAC address after renaming the interface #92

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

zeeke
Copy link
Contributor

@zeeke zeeke commented Oct 17, 2023

Setting the MAC address at the end of SetupVF reduces
the chances of race conditions with tools that set MAC
address asynchronously (i.e. iavf).

This commit solve an issue with i40e driver where calling
`SetVFEffectiveMAC` after `SetVFHardwareMAC` may produce
a VF with no connectivity even if the last configuration step
didn't produce any error:

```
+ ip link set dev ens1f0 vf 0 mac 20:04:0f:f1:88:A1   # No error
+ ip link set dev temp_71 address 20:04:0f:f1:88:A1   # Transient error
RTNETLINK answers: Resource temporarily unavailable
+ ip link set dev temp_71 address 20:04:0f:f1:88:A1   # No error
```

Note: this seems to be a kernel driver regression introduced near
torvalds/linux@c34743d

Signed-off-by: Andrea Panattoni <[email protected]>
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 17, 2023
@zeeke
Copy link
Contributor Author

zeeke commented Oct 17, 2023

/jira cherrypick OCPBUGS-19536

@openshift-ci-robot
Copy link
Contributor

@zeeke: Jira Issue OCPBUGS-19536 has been cloned as Jira Issue OCPBUGS-21831. Will retitle bug to link to clone.
/retitle OCPBUGS-21831: [release-4.14] Set MAC address after renaming the interface

In response to this:

/jira cherrypick OCPBUGS-19536

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.

@openshift-ci openshift-ci bot changed the title [release-4.14] Set MAC address after renaming the interface OCPBUGS-21831: [release-4.14] Set MAC address after renaming the interface Oct 17, 2023
@openshift-ci-robot openshift-ci-robot added jira/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. labels Oct 17, 2023
@openshift-ci-robot
Copy link
Contributor

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

6 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.14.0) matches configured target version for branch (4.14.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
  • dependent bug Jira Issue OCPBUGS-19536 is in the state ON_QA, which is one of the valid states (MODIFIED, ON_QA, VERIFIED)
  • dependent Jira Issue OCPBUGS-19536 targets the "4.15.0" version, which is one of the valid target versions: 4.15.0
  • bug has dependents

Requesting review from QA contact:
/cc @zhaozhanqi

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

In response to this:

backport of:

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.

@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 Oct 17, 2023
@openshift-ci openshift-ci bot requested a review from zhaozhanqi October 17, 2023 16:23
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 17, 2023

@zeeke: 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/test-infra repository. I understand the commands that are listed here.

// Error is ignored here because enabling this feature is only a performance enhancement.
_ = s.utils.EnableArpAndNdiscNotify(podifName)

// 6. Set MAC address
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh I did not catch this in U/S sriov-cni. But setting the MAC address after we send out GARPs may be an issue. Since ARPs require that the MAC address is setup properly.

You are moving SetVFEffectiveMAC down to solve a race condition, is that correct? So moving it before EnableArpAndNdiscNotify shouldn't be any different (although solving race conditions this way really is a toss of the coin).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh I did not catch this in U/S sriov-cni. But setting the MAC address after we send out GARPs may be an issue. Since ARPs require that the MAC address is setup properly.

Does the GARP go out before setting up the interface? That happens on step 7

You are moving SetVFEffectiveMAC down to solve a race condition, is that correct? So moving it before EnableArpAndNdiscNotify shouldn't be any different (although solving race conditions this way really is a toss of the coin).

I agree, that's the best we could do from the CNI side while the investigation on the kernel side is still ongoing.
As the root cause is not yet clear, moving that statement can make a difference. At least, we should run an extensive test suite as we did with these changes.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, I forgot that it is also done after IPAM. Then this is lgtm.

Copy link
Contributor

Choose a reason for hiding this comment

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

It actually doesn't happen at step 7 but after IPAM is setup.

@wizhaoredhat
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 18, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 18, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: wizhaoredhat, zeeke

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

@zeeke
Copy link
Contributor Author

zeeke commented Oct 19, 2023

@bn222 @wizhaoredhat Can you also help with backport-risk-assessed ?
@zhaozhanqi need cherry-pick-approved also

@wizhaoredhat
Copy link
Contributor

/label backport-risk-assessed

@openshift-ci openshift-ci bot added the backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. label Oct 19, 2023
@knobunc
Copy link

knobunc commented Oct 20, 2023

/label staff-eng-approved

@openshift-ci openshift-ci bot added the staff-eng-approved Indicates a release branch PR has been approved by a staff engineer (formerly group/pillar lead). label Oct 20, 2023
@knobunc
Copy link

knobunc commented Oct 20, 2023

/label cherry-pick-approved

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 20, 2023

@knobunc: Can not set label cherry-pick-approved: Must be member in one of these teams: []

In response to this:

/label cherry-pick-approved

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.

@evgenLevin
Copy link

/label cherry-pick-approved

@openshift-ci openshift-ci bot added the cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. label Oct 20, 2023
@openshift-ci openshift-ci bot merged commit f73cb4b into openshift:release-4.14 Oct 20, 2023
@openshift-ci-robot
Copy link
Contributor

@zeeke: Jira Issue OCPBUGS-21831: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-21831 has been moved to the MODIFIED state.

In response to this:

backport of:

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.

@zeeke
Copy link
Contributor Author

zeeke commented Oct 24, 2023

/cherrypick release-4.13

@openshift-cherrypick-robot

@zeeke: #92 failed to apply on top of branch "release-4.13":

Applying: Set MAC address after renaming the interface
Using index info to reconstruct a base tree...
M	pkg/sriov/sriov.go
M	pkg/sriov/sriov_test.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/sriov/sriov_test.go
Auto-merging pkg/sriov/sriov.go
CONFLICT (content): Merge conflict in pkg/sriov/sriov.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 Set MAC address after renaming the interface
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-4.13

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.

@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

This PR has been included in build sriov-cni-container-v4.14.0-202311210908.p0.gf73cb4b.assembly.stream for distgit sriov-cni.
All builds following this will include this PR.

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. backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. jira/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. 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. staff-eng-approved Indicates a release branch PR has been approved by a staff engineer (formerly group/pillar lead).
Projects
None yet
Development

Successfully merging this pull request may close these issues.