Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
When running "docker exec bash" into a container, cgroups can be set wrong.
Running a systemd-based container built from:
https://github.com/riekrh/Fedora-Dockerfiles/tree/master/systemd/apache-atomic
The Dockerfile has:
CMD ["/usr/sbin/init"]
Ignore the LABELS.
Starting via:
# docker run --rm -p 80:80 -v /sys/fs/cgroup:/sys/fs/cgroup --init=systemd --name my-httpd-atomic llunved/httpd-atomic
Then:
# docker exec CONTAINERID bash
[ ENTERING CONTAINER ]
bash-4.3# cat /proc/1/cgroup
10:hugetlb:/
9:perf_event:/
8:blkio:/system.slice/docker-8a632f02f168fed20f7ff7c56c060cfba3f8c5f081297d4e60360cbeaa4c53e3.scope
7:net_cls:/
6:freezer:/system.slice/docker-8a632f02f168fed20f7ff7c56c060cfba3f8c5f081297d4e60360cbeaa4c53e3.scope
5:devices:/system.slice/docker-8a632f02f168fed20f7ff7c56c060cfba3f8c5f081297d4e60360cbeaa4c53e3.scope
4:memory:/system.slice/docker-8a632f02f168fed20f7ff7c56c060cfba3f8c5f081297d4e60360cbeaa4c53e3.scope
3:cpuacct,cpu:/system.slice/docker-8a632f02f168fed20f7ff7c56c060cfba3f8c5f081297d4e60360cbeaa4c53e3.scope
2:cpuset:/system.slice/docker-8a632f02f168fed20f7ff7c56c060cfba3f8c5f081297d4e60360cbeaa4c53e3.scope
1:name=systemd:/system.slice/docker-8a632f02f168fed20f7ff7c56c060cfba3f8c5f081297d4e60360cbeaa4c53e3.scope
bash-4.3# cat /proc/self/cgroup
10:hugetlb:/
9:perf_event:/
8:blkio:/system.slice/docker-8a632f02f168fed20f7ff7c56c060cfba3f8c5f081297d4e60360cbeaa4c53e3.scope
7:net_cls:/
6:freezer:/system.slice/docker-8a632f02f168fed20f7ff7c56c060cfba3f8c5f081297d4e60360cbeaa4c53e3.scope
5:devices:/system.slice/docker-8a632f02f168fed20f7ff7c56c060cfba3f8c5f081297d4e60360cbeaa4c53e3.scope
4:memory:/system.slice/docker-8a632f02f168fed20f7ff7c56c060cfba3f8c5f081297d4e60360cbeaa4c53e3.scope
3:cpuacct,cpu:/system.slice/docker-8a632f02f168fed20f7ff7c56c060cfba3f8c5f081297d4e60360cbeaa4c53e3.scope
2:cpuset:/system.slice/docker-8a632f02f168fed20f7ff7c56c060cfba3f8c5f081297d4e60360cbeaa4c53e3.scope
1:name=systemd:/system.slice/docker.service
* So the cgroups are different between systemd in the container and the instance of bash (self) created by docker exec.
Note sure if this affects non-systemd containers.
A possible effect of this is, that "# systemctl restart httpd" does no work in the example container.
(In reply to Daniel Riek from comment #0)
> Starting via:
> # docker run --rm -p 80:80 -v /sys/fs/cgroup:/sys/fs/cgroup --init=systemd
> --name my-httpd-atomic llunved/httpd-atomic
There is no '--init' option in docker-1.9.1-16.el7.x86_64.
# docker run --rm -p 80:80 -v /sys/fs/cgroup:/sys/fs/cgroup --init=systemd --name my-httpd-atomic llunved/httpd-atomic
flag provided but not defined: --init
See 'docker run --help'.
Since lack of implementation of --init in docker client, i'd like to verified this via ONLY checking those patch whether is in the current git branch(top git commit)
In docker-1.9.1-38.el7.x86_64, move to verified
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://rhn.redhat.com/errata/RHSA-2016-1034.html