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

BUG 1854775: Improve the MTU set/reset logic #286

Merged
merged 1 commit into from Jul 10, 2020

Conversation

pliurh
Copy link
Contributor

@pliurh pliurh commented Jul 8, 2020

  1. When reseting PF MTU, the daemon reset it to actual initial value.
  2. When setting MTU, the daemon always set the MTU of VF to the desired value.
  3. Set the VF MTU to PF's if MTU is not provided by users.

@pliurh pliurh requested a review from zshi-redhat July 8, 2020 08:29
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 8, 2020
@pliurh pliurh changed the title Improve the MTU set/reset logic BUG 1854775: Improve the MTU set/reset logic Jul 8, 2020
@openshift-ci-robot openshift-ci-robot added the bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. label Jul 8, 2020
@openshift-ci-robot
Copy link
Contributor

@pliurh: This pull request references Bugzilla bug 1854775, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

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

In response to this:

BUG 1854775: Improve the MTU set/reset logic

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 bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Jul 8, 2020
}
}
for _, vf := range ifaceStatus.VFs {
if vf.Mtu != mtu && vf.Driver != "vfio-pci" {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe use sriovnetworkv1.StringInArray(vf.Driver, DpdkDrivers) to check whether it's a dpdk driver?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

glog.V(0).Infof("Run(): start writer")
msg := Message{}
if runonce {
glog.V(0).Info("Run(): once")
if err := writer.pollNicStatus(); err != nil {
glog.Errorf("Run(): first poll failed: %v", err)
}
writer.setNodeStateStatus(msg)
ns, _ := writer.setNodeStateStatus(msg)
writer.writeCheckpointFile(ns, destDir)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we consider removing this file when daemon exits?
This might not be useful when config daemon exits for normal rebooting, but it cleans up the file when operator is undeployed.

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 am not sure whether we should do it. Imaging the upgrade scenario, some PFs have modified. The old pod is terminated then the new pod will be spawned. If we remove the file when the old pod is terminated, the new pod cannot get the correct initial state of those PFs.

Copy link
Contributor

Choose a reason for hiding this comment

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

If PF is modified after SR-IOV Operator is deployed, should we restore the modified PF value or the original initial value?

1. When reseting PF MTU, the daemon reset it to actual initial value.
2. When setting MTU, the daemon always set the MTU of VF to the desired value.
3. Set the VF MTU to PF's if MTU is not provided by users.
@zshi-redhat
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 10, 2020
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pliurh, zshi-redhat

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

/retest

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 1ab3251 into openshift:master Jul 10, 2020
@openshift-ci-robot
Copy link
Contributor

@pliurh: All pull requests linked via external trackers have merged: openshift/sriov-network-operator#286. Bugzilla bug 1854775 has been moved to the MODIFIED state.

In response to this:

BUG 1854775: Improve the MTU set/reset logic

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.

@pliurh
Copy link
Contributor Author

pliurh commented Jul 10, 2020

/cherry-pick release-4.5

@openshift-cherrypick-robot

@pliurh: #286 failed to apply on top of branch "release-4.5":

error: Failed to merge in the changes.
Using index info to reconstruct a base tree...
M	cmd/sriov-network-config-daemon/start.go
M	pkg/daemon/writer.go
M	pkg/utils/utils.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/utils/utils.go
CONFLICT (content): Merge conflict in pkg/utils/utils.go
Auto-merging pkg/daemon/writer.go
CONFLICT (content): Merge conflict in pkg/daemon/writer.go
Auto-merging cmd/sriov-network-config-daemon/start.go
Patch failed at 0001 Improve the MTU set/reset logic

In response to this:

/cherry-pick release-4.5

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.

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. bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants