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

improve checking modprob netfilter #6427

Merged
merged 2 commits into from
Jan 29, 2020

Conversation

medyagh
Copy link
Member

@medyagh medyagh commented Jan 29, 2020

fixes this #5900 (none)
and helps with #6404 (docker on cloud shell)

based on suggestion by @tstromberg here #5900 (comment)

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 29, 2020
@medyagh medyagh changed the title dont fail on modprob netfilter reduce failure on modprob netfilter Jan 29, 2020
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jan 29, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: medyagh

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 29, 2020
@medyagh medyagh changed the title reduce failure on modprob netfilter improve unnecessary failure on modprob netfilter Jan 29, 2020
@medyagh medyagh changed the title improve unnecessary failure on modprob netfilter improve unnecessary failure on modprob netfilter check Jan 29, 2020
@medyagh
Copy link
Member Author

medyagh commented Jan 29, 2020

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Jan 29, 2020
glog.Infof("couldn't verify netfilter by %q which might be okay. output=%q error=%v", rr.Command(), rr.Output(), err)
c = exec.Command("sudo", "modprobe", "br_netfilter")
if rr, err := cr.RunCmd(c); err != nil {
return errors.Wrapf(err, "br_netfilter. output: %s", rr.Output())
Copy link
Contributor

Choose a reason for hiding this comment

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

Here too.

return errors.Wrap(err, "br_netfilter")
c := exec.Command("sudo", "sysctl", "net.netfilter.nf_conntrack_count")
if rr, err := cr.RunCmd(c); err != nil {
glog.Infof("couldn't verify netfilter by %q which might be okay. output=%q error=%v", rr.Command(), rr.Output(), err)
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe rr.Output() here is redundant: RunCmd errors already include stdout/stderr, or at least non-kic drivers do. Can we fix kic's RunCmd to be consistent instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

sure thing ! I

Copy link
Member Author

Choose a reason for hiding this comment

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

I just noticed we have same thing in kic as well.

fmt.Errorf("%s: %v\nstdout:\n%s\nstderr:\n%s", rr.Command(), err, rr.Stdout.String(), rr.Stderr.String())```

@codecov-io
Copy link

Codecov Report

Merging #6427 into master will decrease coverage by 0.01%.
The diff coverage is 16.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6427      +/-   ##
==========================================
- Coverage   37.46%   37.44%   -0.02%     
==========================================
  Files         128      128              
  Lines        8646     8649       +3     
==========================================
  Hits         3239     3239              
- Misses       4988     4991       +3     
  Partials      419      419
Impacted Files Coverage Δ
pkg/minikube/cruntime/cruntime.go 57.5% <16.66%> (-4.67%) ⬇️

@minikube-pr-bot
Copy link

Error: running mkcmp: exit status 1

@medyagh medyagh changed the title improve unnecessary failure on modprob netfilter check improve checking modprob netfilter Jan 29, 2020
@tstromberg
Copy link
Contributor

/ok-to-test

@medyagh medyagh merged commit e725104 into kubernetes:master Jan 29, 2020
@medyagh medyagh deleted the modprob_netfilter branch January 29, 2020 22:47
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants