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

utils: takes the longest path on cgroup v1 #9302

Merged
merged 4 commits into from
Feb 11, 2021

Conversation

giuseppe
Copy link
Member

@giuseppe giuseppe commented Feb 10, 2021

now getCgroupProcess takes the longest path on cgroup v1, instead of
complaining if the paths are different.

This should help when --cgroups=split is used on cgroup v1 and the
process cgroups look like:

$ cat /proc/self/cgroup
11:pids:/user.slice/user-0.slice/session-4.scope
10:blkio:/
9:cpuset:/
8:devices:/user.slice
7:freezer:/
6:memory:/user.slice/user-0.slice/session-4.scope
5:net_cls,net_prio:/
4:hugetlb:/
3:cpu,cpuacct:/
2:perf_event:/

Signed-off-by: Giuseppe Scrivano [email protected]

@openshift-ci-robot
Copy link
Collaborator

[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

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 10, 2021
Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

@vrothberg
Copy link
Member

CI is not yet happy:

[+1203s] Error: mkdir /sys/fs/cgroup/memory/machine.slice/libpod-bf1e2a75367731b3cf893e42daf86675d1f7b99d22ab1b487795705a328ca07c.scope/supervisor: no such file or directory
[+1203s] output:

@rhatdan
Copy link
Member

rhatdan commented Feb 10, 2021

/lgtm
/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 10, 2021
@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 10, 2021
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Feb 10, 2021
Signed-off-by: Giuseppe Scrivano <[email protected]>
Signed-off-by: Giuseppe Scrivano <[email protected]>
@giuseppe giuseppe force-pushed the cgroup-split-v1 branch 3 times, most recently from 2b9e028 to a7220b4 Compare February 11, 2021 11:51
@vrothberg
Copy link
Member

/lgtm
/hold

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 11, 2021
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Feb 11, 2021
now getCgroupProcess takes the longest path on cgroup v1, instead of
complaining if the paths are different.

This should help when --cgroups=split is used on cgroup v1 and the
process cgroups look like:

$ cat /proc/self/cgroup
11:pids:/user.slice/user-0.slice/session-4.scope
10:blkio:/
9:cpuset:/
8:devices:/user.slice
7:freezer:/
6:memory:/user.slice/user-0.slice/session-4.scope
5:net_cls,net_prio:/
4:hugetlb:/
3:cpu,cpuacct:/
2:perf_event:/

Signed-off-by: Giuseppe Scrivano <[email protected]>
@TomSweeneyRedHat
Copy link
Member

LGTM
and happy green test buttons.

@TomSweeneyRedHat
Copy link
Member

Ugh, thought this had been merged and backported into v3.0... This solves an 8.4 potential blocker BZ....

@rhatdan
Copy link
Member

rhatdan commented Feb 11, 2021

/hold cancel
podman 3.0.* will be what we release to RHEL8.4 so this should get in.

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 11, 2021
@rhatdan
Copy link
Member

rhatdan commented Feb 11, 2021

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 11, 2021
@openshift-merge-robot openshift-merge-robot merged commit 1b284a2 into containers:master Feb 11, 2021
@giuseppe
Copy link
Member Author

backport to 3.0: #9332

@chuanchang
Copy link
Contributor

@giuseppe the tests "podman run with cgroups=split" is failed for downstream podman on RHEL 8.4.

1:name=systemd:/user.slice/user-0.slice/session-11.scope/supervisor

[root@ibm-x3650m4-01-vm-02 podman]# rpm -q podman crun
podman-3.0.1-1.module+el8.4.0+10073+30e5ea69.x86_64
crun-0.18-1.module+el8.4.0+10073+30e5ea69.x86_64
[root@ibm-x3650m4-01-vm-02 podman]# ll bin/podman
lrwxrwxrwx. 1 root root 15 Feb 23 11:24 bin/podman -> /usr/bin/podman
[root@ibm-x3650m4-01-vm-02 podman]# git rev-parse HEAD
96fc9d983e0fc5bae48c3cec3acce86cdb6e1059

[root@ibm-x3650m4-01-vm-02 podman]# ginkgo -v --focus "podman run with cgroups=split" test/e2e
...ignore...
unning: /root/go/src/github.com/containers/podman/bin/podman --storage-opt vfs.imagestore=/tmp/podman/imagecachedir --root /tmp/podman_test131803001/crio --runroot /tmp/podman_test131803001/crio-run --runtime crun --conmon /usr/bin/conmon --cni-config-dir /etc/cni/net.d --cgroup-manager systemd --tmpdir /tmp/podman_test131803001 --events-backend file --storage-driver vfs rm -fa
output: 

• Failure [1.709 seconds]
Podman run
/root/go/src/github.com/containers/podman/test/e2e/run_test.go:21
  podman run with cgroups=split [It]
  /root/go/src/github.com/containers/podman/test/e2e/run_test.go:1217

  Expected
      <string>: "...cope/contai..."
  to equal               |
      <string>: "...cope/superv..."

  /root/go/src/github.com/containers/podman/test/e2e/run_test.go:1244
------------------------------
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSintegration timing results
podman run with cgroups=split		1.709453


Summarizing 1 Failure:

[Fail] Podman run [It] podman run with cgroups=split 
/root/go/src/github.com/containers/podman/test/e2e/run_test.go:1244

Ran 1 of 1389 Specs in 199.272 seconds
FAIL! -- 0 Passed | 1 Failed | 0 Pending | 1388 Skipped
--- FAIL: TestLibpod (199.41s)
FAIL

Ginkgo ran 1 suite in 3m44.979875003s
Test Suite Failed

[root@ibm-x3650m4-01-vm-02 ~]# podman run --rm --cgroups=split quay.io/libpod/alpine cat /proc/self/cgroup
Trying to pull quay.io/libpod/alpine:latest...
Getting image source signatures
Copying blob 9d16cba9fb96 done  
Copying config 9617696764 done  
Writing manifest to image destination
Storing signatures
12:hugetlb:/user.slice/user-0.slice/session-11.scope/container
11:rdma:/
10:devices:/user.slice/user-0.slice/session-11.scope/container
9:memory:/user.slice/user-0.slice/session-11.scope/container
8:freezer:/user.slice/user-0.slice/session-11.scope/container
7:cpu,cpuacct:/user.slice/user-0.slice/session-11.scope/container
6:net_cls,net_prio:/user.slice/user-0.slice/session-11.scope/container
5:cpuset:/user.slice/user-0.slice/session-11.scope/container
4:perf_event:/user.slice/user-0.slice/session-11.scope/container
3:pids:/user.slice/user-0.slice/session-11.scope/container
2:blkio:/user.slice/user-0.slice/session-11.scope/container
1:name=systemd:/user.slice/user-0.slice/session-11.scope/supervisor

giuseppe added a commit to giuseppe/libpod that referenced this pull request Feb 23, 2021
ignore named hierarchies for the --cgroups=split test as crun does not
set it.

Closes: containers#9302 (comment)

Signed-off-by: Giuseppe Scrivano <[email protected]>
@vrothberg
Copy link
Member

@chuanchang, could you open bugzilla against RHEL 8.4? We need that for backports now.

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants