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

[cni-0.x] Add option to disable the use of inotify #93

Merged
merged 1 commit into from
Jun 21, 2021

Conversation

Luap99
Copy link
Contributor

@Luap99 Luap99 commented Jun 18, 2021

Cherry-pick #92 to the cni-0.x branch.

Add a new InitCNINoInotify function to allow the use of OCICNI without
the use of inotify.

For some workloads it is not required to watch the cni config directory.
With podman v3.2 we started using OCICNI for rootless users as well.
However the use of inotify is restricted by sysctl values
(fs.inotify.max_user_instances and fs.inotify.max_user_watches).
By default only 128 processes can use inotify.

Since this limit is easy to reach and inotify is not required for our
use case it would be great to have this option to disable it.

see containers/podman#10686

Add new InitCNINoInotify function to disable the use of inotify.

Add a new InitCNINoInotify function to allow the use of OCICNI without
the use of inotify.

For some workloads it is not required to watch the cni config directory.
With podman v3.2 we started using OCICNI for rootless users as well.
However the use of inotify is restricted by sysctl values
(fs.inotify.max_user_instances and fs.inotify.max_user_watches).
By default only 128 processes can use inotify.

Since this limit is easy to reach and inotify is not required for our
use case it would be great to have this option to disable it.

see containers/podman#10686

Signed-off-by: Paul Holzinger <[email protected]>
@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 Jun 18, 2021
@openshift-ci openshift-ci bot requested review from dcbw and haircommander June 18, 2021 11:08
@coveralls
Copy link

Pull Request Test Coverage Report for Build 949636870

  • 11 of 18 (61.11%) changed or added relevant lines in 1 file are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.2%) to 65.47%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/ocicni/ocicni.go 11 18 61.11%
Files with Coverage Reduction New Missed Lines %
pkg/ocicni/ocicni.go 1 69.93%
Totals Coverage Status
Change from base Build 947775638: -0.2%
Covered Lines: 474
Relevant Lines: 724

💛 - Coveralls

Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

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

LGTM

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 21, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Luap99, saschagrunert

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 Jun 21, 2021
@haircommander
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed 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 Jun 21, 2021
@openshift-merge-robot openshift-merge-robot merged commit d0acc78 into cri-o:cni-0.x Jun 21, 2021
@Luap99 Luap99 deleted the no-inotify-backport branch June 21, 2021 16:40
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. release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants