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

Remove code that sets lo to down prior ns deletion #104

Merged

Conversation

MikeZappa87
Copy link
Contributor

@MikeZappa87 MikeZappa87 commented Apr 28, 2022

I am not sure this code is needed since deleting the network namespace takes care of lo. If this was done for a specific reason I am curious to hear about it :-) It looks like it was an attempt to duplicate the behavior of the loopback plugin.

I can apply a deprecation flag to tearDownLoopback func if that is preferred

Signed-off-by: Michael Zappa [email protected]

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Apr 28, 2022

@MikeZappa87: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

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 requested review from mrunalp and sameo April 28, 2022 02:31
@openshift-ci openshift-ci bot added dco-signoff: yes Indicates the PR's author has DCO signed all their commits. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Apr 28, 2022
Comment on lines -661 to -664
if err := tearDownLoopback(podNetwork.NetNS); err != nil {
// ignore error
logrus.Warningf("Ignoring error tearing down loopback interface: %v", err)
}
Copy link
Member

Choose a reason for hiding this comment

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

@dcbw do you have more context on that and if it's safe to remove?

Copy link
Contributor Author

@MikeZappa87 MikeZappa87 Apr 30, 2022

Choose a reason for hiding this comment

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

This is doing effectively (including the ns setup)
Pod Setup:
ip netns add ns0
ip netns exec ns0 ip link set lo up

Pod Tear down:
ip netns exec ns0 ip link set lo down
ip netns del ns0

We are just skipping the 'ip link set lo down' piece

In the end, the network namespace is deleted and no frames are sent between the host/ns with the state of lo changing

Copy link
Collaborator

Choose a reason for hiding this comment

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

@saschagrunert I can't think of a reason to bother setting it down, since we're gonna tear the netns down immediately after anyway.

Copy link
Member

Choose a reason for hiding this comment

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

Good, thank you for the explanation :)

@dcbw dcbw removed the do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. label May 4, 2022
@dcbw
Copy link
Collaborator

dcbw commented May 4, 2022

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 4, 2022
@dcbw
Copy link
Collaborator

dcbw commented May 4, 2022

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 4, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dcbw, MikeZappa87

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 May 4, 2022
@openshift-merge-robot openshift-merge-robot merged commit 2eb3d07 into cri-o:master May 4, 2022
@coveralls
Copy link

Pull Request Test Coverage Report for Build 2236793634

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.3%) to 65.867%

Totals Coverage Status
Change from base Build 2236161637: 0.3%
Covered Lines: 467
Relevant Lines: 709

💛 - Coveralls

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. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants