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

conmon: detect cgroup2 and skip OOM handling #2356

Merged
merged 1 commit into from May 11, 2019

Conversation

@giuseppe
Copy link
Member

commented May 10, 2019

add detection for a cgroup v2 unified mode. Skip setting up OOM for
now. It is not proper support for will temporarily unlock Podman.

Signed-off-by: Giuseppe Scrivano gscrivan@redhat.com

@openshift-ci-robot

This comment has been minimized.

Copy link

commented May 10, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: giuseppe

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

1 similar comment
@openshift-ci-robot

This comment has been minimized.

Copy link

commented May 10, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: giuseppe

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

int ofd = -1; /* Not closed */

if (statfs ("/sys/fs/cgroup", &sfs) == 0 && sfs.f_type == CGROUP2_SUPER_MAGIC) {

This comment has been minimized.

Copy link
@haircommander

haircommander May 10, 2019

Member

will the statfs call complain if conmon is called as non-root?

This comment has been minimized.

Copy link
@giuseppe

giuseppe May 10, 2019

Author Member

no, it works well. I've tested it locally only as non root :-)

@haircommander

This comment has been minimized.

Copy link
Member

commented May 10, 2019

LGTM

@giuseppe giuseppe force-pushed the giuseppe:conmon-detect-cgroup2 branch from 2da34ba to 6fe4b7b May 10, 2019

@@ -35,6 +37,10 @@
#include "cmsg.h"
#include "config.h"

#ifndef CGROUP2_SUPER_MAGIC
# define CGROUP2_SUPER_MAGIC 0x63677270

This comment has been minimized.

Copy link
@mheon

mheon May 10, 2019

Contributor

Space between # and define?

This comment has been minimized.

Copy link
@giuseppe

giuseppe May 10, 2019

Author Member

I usually use it to indent C preprocessor macros (as done by https://www.gnu.org/software/cppi/)

This comment has been minimized.

Copy link
@giuseppe

giuseppe May 10, 2019

Author Member

well clang doesn't like it, so I had to drop it :-)

@rhatdan

This comment has been minimized.

Copy link
Contributor

commented May 10, 2019

LGTM

@mrunalp

This comment has been minimized.

Copy link
Member

commented May 10, 2019

/test e2e_rhel

@mrunalp

This comment has been minimized.

Copy link
Member

commented May 10, 2019

conmon: detect cgroup2 and skip OOM handling
add detection for a cgroup v2 unified mode.  Skip setting up OOM for
now.  It is not proper support for will temporarily unlock Podman.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

@giuseppe giuseppe force-pushed the giuseppe:conmon-detect-cgroup2 branch from 6fe4b7b to 736b14d May 10, 2019

@rhatdan

This comment has been minimized.

Copy link
Contributor

commented May 10, 2019

/lgtm

@giuseppe

This comment has been minimized.

Copy link
Member Author

commented May 11, 2019

/test e2e_fedora

@openshift-merge-robot openshift-merge-robot merged commit e0b89a3 into cri-o:master May 11, 2019

12 checks passed

Travis CI - Pull Request Build Passed
Details
ci/kata-jenkins Jenkins job succeeded.
Details
ci/openshift-jenkins/critest_fedora Jenkins job succeeded.
Details
ci/openshift-jenkins/critest_rhel Jenkins job succeeded.
Details
ci/openshift-jenkins/e2e_features_fedora Jenkins job succeeded.
Details
ci/openshift-jenkins/e2e_features_rhel Jenkins job succeeded.
Details
ci/openshift-jenkins/e2e_fedora Jenkins job succeeded.
Details
ci/openshift-jenkins/e2e_rhel Jenkins job succeeded.
Details
ci/openshift-jenkins/integration_fedora Jenkins job succeeded.
Details
ci/openshift-jenkins/integration_rhel Jenkins job succeeded.
Details
dco All commits have Signed-off-by
Details
tide In merge pool.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.