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

@giuseppe giuseppe 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
Copy link

@openshift-ci-robot openshift-ci-robot 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
Copy link

@openshift-ci-robot openshift-ci-robot 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

conmon/conmon.c Outdated
int ofd = -1; /* Not closed */

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

@haircommander haircommander May 10, 2019

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

Copy link
Member Author

@giuseppe giuseppe May 10, 2019

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

@haircommander
Copy link
Member

@haircommander haircommander commented May 10, 2019

LGTM

@giuseppe giuseppe force-pushed the conmon-detect-cgroup2 branch from 2da34ba to 6fe4b7b May 10, 2019
conmon/conmon.c Outdated
@@ -35,6 +37,10 @@
#include "cmsg.h"
#include "config.h"

#ifndef CGROUP2_SUPER_MAGIC
# define CGROUP2_SUPER_MAGIC 0x63677270
Copy link
Collaborator

@mheon mheon May 10, 2019

Space between # and define?

Copy link
Member Author

@giuseppe giuseppe May 10, 2019

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

Copy link
Member Author

@giuseppe giuseppe May 10, 2019

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

@rhatdan
Copy link
Contributor

@rhatdan rhatdan commented May 10, 2019

LGTM

@mrunalp
Copy link
Member

@mrunalp mrunalp commented May 10, 2019

/test e2e_rhel

@mrunalp
Copy link
Member

@mrunalp mrunalp 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>
@giuseppe giuseppe force-pushed the conmon-detect-cgroup2 branch from 6fe4b7b to 736b14d May 10, 2019
@rhatdan
Copy link
Contributor

@rhatdan rhatdan commented May 10, 2019

/lgtm

@giuseppe
Copy link
Member Author

@giuseppe giuseppe 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

7 participants