RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2170444 - podman system service not work with rootless user under cgroupv1
Summary: podman system service not work with rootless user under cgroupv1
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: podman
Version: 9.2
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Giuseppe Scrivano
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-02-16 11:38 UTC by Yuhui Jiang
Modified: 2023-02-21 10:34 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-02-21 10:34:06 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-148878 0 None None None 2023-02-16 11:39:19 UTC

Description Yuhui Jiang 2023-02-16 11:38:40 UTC
Description of problem:
testcase "podman-system-service containers survive service stop" fail in 251-system-service.bats, this only found in cgroupv1 and runtime for crun.
When the system is cgroupv2, this case will success.

Version-Release number of selected component (if applicable):
podman-4.4.0-1.el9.x86_64

How reproducible:
100%


Steps to Reproduce:
1. set up cgroupv1 in RHEL9
2. check runtime is "crun"
3. bats 251-system-service.bats


Actual results:
[test@kvm-07-guest27 system]$ bats 251-system-service.bats
251-system-service.bats
 ✓ podman systerm service <bad_scheme_uri> returns error
 ✗ podman-system-service containers survive service stop
   (from function `is' in file helpers.bash, line 689,
    in test file 251-system-service.bats, line 50)
     `is "$output" "true" "Container is still running after podman server stops"' failed
   $ podman rm -t 0 --all --force --ignore
   $ podman ps --all --external --format {{.ID}} {{.Names}}
   $ podman images --all --format {{.Repository}}:{{.Tag}} {{.ID}}
   quay.io/libpod/testimage:20221018 f5a99120db64
   Running as unit: podman-service-SEC0EgR1iw.service
   $ podman --url tcp://127.0.0.1:5245 run -d --name keeps-running quay.io/libpod/testimage:20221018 top -d 2
   Resource limits are not supported and ignored on cgroups V1 rootless systems
   7691f04bdd2d56af2daa61eba160a9d5e10ac85219b00ddbffb7da9aa56ce587
   $ podman container inspect -l --format {{.State.Running}}
   true
   $ podman container inspect keeps-running --format {{.State.Running}}
   false
   #/vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
   #|     FAIL: Container is still running after podman server stops
   #| expected: 'true'
   #|   actual: 'false'
   #\^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   # [teardown]
   $ podman pod rm -t 0 --all --force --ignore
   $ podman rm -t 0 --all --force --ignore
   7691f04bdd2d56af2daa61eba160a9d5e10ac85219b00ddbffb7da9aa56ce587
   $ podman network prune --force
   $ podman volume rm -a -f
 ✓ podman --host / -H options

3 tests, 1 failure



Expected results:
the testcase should success.

Additional info:

Comment 2 Giuseppe Scrivano 2023-02-17 08:10:04 UTC
that is probably related to not creating a cgroup when running rootless on cgroupv1.  Since anyway we cannot apply limits we don't even create one.

Before we invest time into this issue, how much do we care about this specific configuration (rootless + system service + cgroupv1) given the default on RHEL 9 is cgroupv2?

Comment 3 Giuseppe Scrivano 2023-02-17 08:55:40 UTC
another problem: we will need to fix the OCI runtimes to create the scope and not try to configure it; so it is not only Podman but we need to change crun and runc as well.  My vote is to skip the test and just add a warning to podman system service when it runs on rootless cgroupv1

Comment 4 Daniel Walsh 2023-02-17 15:26:14 UTC
I agree the test should be disabled, This is not something we want to support.

Comment 5 Tom Sweeney 2023-02-20 19:50:56 UTC
Thanks for the input all.  Giuseppe, please create a warning message upstream, and we'll close this out once it's merged.  Yiqiao, please diable this test.

Comment 6 Giuseppe Scrivano 2023-02-21 10:34:06 UTC
opened a PR: https://github.com/containers/podman/pull/17589

I don't think there is a need to track or backport this minor warning message, so I am closing the issue


Note You need to log in before you can comment on or make changes to this bug.