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 1488864 - Errors Failed to set context ... svirt_sandbox_file_t ... on /var/lib/docker/devicemapper/... and /sys/fs/cgroup/... logged in journal
Summary: Errors Failed to set context ... svirt_sandbox_file_t ... on /var/lib/docker/...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: container-selinux
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Lokesh Mandvekar
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-06 11:14 UTC by Jan Pazdziora
Modified: 2019-06-04 19:10 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-04 19:10:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:1356 0 None None None 2019-06-04 19:10:33 UTC

Description Jan Pazdziora 2017-09-06 11:14:41 UTC
Description of problem:

When running systemd from registry.access.redhat.com/rhel7, oci-systemd-hook logs errors about failures to set context to journal.

Version-Release number of selected component (if applicable):

oci-systemd-hook-0.1.12-1.git1e84754.el7.x86_64
docker-1.12.6-55.gitc4618fb.el7.x86_64
selinux-policy-3.13.1-166.el7_4.4.noarch
container-selinux-2.21-2.gitba103ac.el7.noarch

How reproducible:

Deterministic.

Steps to Reproduce:
1. systemctl start docker
2. docker run -d registry.access.redhat.com/rhel7 /usr/sbin/init
3. journalctl -l | grep 'Failed to set context'

Actual results:

Sep 06 05:20:19 machine.example.com oci-systemd-hook[14327]: systemdhook <error>: Failed to set context system_u:object_r:svirt_sandbox_file_t:s0:c359,c405 on /var/lib/docker/devicemapper/mnt/7a5b43492b4305a08bcda37ca40a2532750828a83adc63367f7d705be9295831/rootfs//sys/fs/cgroup/systemd/system.slice/docker-dbe43aa3e9926b762bec91a0b6c4862d719039b3a4086213cd6b52748fcee872.scope/.: Operation not supported
Sep 06 05:20:19 machine.example.com oci-systemd-hook[14327]: systemdhook <error>: Failed to set context system_u:object_r:svirt_sandbox_file_t:s0:c359,c405 on /var/lib/docker/devicemapper/mnt/7a5b43492b4305a08bcda37ca40a2532750828a83adc63367f7d705be9295831/rootfs//sys/fs/cgroup/systemd/system.slice/docker-dbe43aa3e9926b762bec91a0b6c4862d719039b3a4086213cd6b52748fcee872.scope/..: Read-only file system
Sep 06 05:20:19 machine.example.com oci-systemd-hook[14327]: systemdhook <error>: Failed to set context system_u:object_r:svirt_sandbox_file_t:s0:c359,c405 on /var/lib/docker/devicemapper/mnt/7a5b43492b4305a08bcda37ca40a2532750828a83adc63367f7d705be9295831/rootfs//sys/fs/cgroup/systemd/system.slice/docker-dbe43aa3e9926b762bec91a0b6c4862d719039b3a4086213cd6b52748fcee872.scope/cgroup.clone_children: Operation not supported
Sep 06 05:20:19 machine.example.com oci-systemd-hook[14327]: systemdhook <error>: Failed to set context system_u:object_r:svirt_sandbox_file_t:s0:c359,c405 on /var/lib/docker/devicemapper/mnt/7a5b43492b4305a08bcda37ca40a2532750828a83adc63367f7d705be9295831/rootfs//sys/fs/cgroup/systemd/system.slice/docker-dbe43aa3e9926b762bec91a0b6c4862d719039b3a4086213cd6b52748fcee872.scope/cgroup.event_control: Operation not supported
Sep 06 05:20:19 machine.example.com oci-systemd-hook[14327]: systemdhook <error>: Failed to set context system_u:object_r:svirt_sandbox_file_t:s0:c359,c405 on /var/lib/docker/devicemapper/mnt/7a5b43492b4305a08bcda37ca40a2532750828a83adc63367f7d705be9295831/rootfs//sys/fs/cgroup/systemd/system.slice/docker-dbe43aa3e9926b762bec91a0b6c4862d719039b3a4086213cd6b52748fcee872.scope/notify_on_release: Operation not supported
Sep 06 05:20:19 machine.example.com oci-systemd-hook[14327]: systemdhook <error>: Failed to set context system_u:object_r:svirt_sandbox_file_t:s0:c359,c405 on /var/lib/docker/devicemapper/mnt/7a5b43492b4305a08bcda37ca40a2532750828a83adc63367f7d705be9295831/rootfs//sys/fs/cgroup/systemd/system.slice/docker-dbe43aa3e9926b762bec91a0b6c4862d719039b3a4086213cd6b52748fcee872.scope/cgroup.procs: Operation not supported
Sep 06 05:20:19 machine.example.com oci-systemd-hook[14327]: systemdhook <error>: Failed to set context system_u:object_r:svirt_sandbox_file_t:s0:c359,c405 on /var/lib/docker/devicemapper/mnt/7a5b43492b4305a08bcda37ca40a2532750828a83adc63367f7d705be9295831/rootfs//sys/fs/cgroup/systemd/system.slice/docker-dbe43aa3e9926b762bec91a0b6c4862d719039b3a4086213cd6b52748fcee872.scope/tasks: Operation not supported
Sep 06 05:20:19 machine.example.com oci-systemd-hook[14327]: systemdhook <error>: Failed to set context system_u:object_r:svirt_sandbox_file_t:s0:c359,c405 on /sys/fs/cgroup/systemd/system.slice/docker-dbe43aa3e9926b762bec91a0b6c4862d719039b3a4086213cd6b52748fcee872.scope/.: Operation not supported
Sep 06 05:20:19 machine.example.com oci-systemd-hook[14327]: systemdhook <error>: Failed to set context system_u:object_r:svirt_sandbox_file_t:s0:c359,c405 on /sys/fs/cgroup/systemd/system.slice/docker-dbe43aa3e9926b762bec91a0b6c4862d719039b3a4086213cd6b52748fcee872.scope/..: Operation not supported
Sep 06 05:20:19 machine.example.com oci-systemd-hook[14327]: systemdhook <error>: Failed to set context system_u:object_r:svirt_sandbox_file_t:s0:c359,c405 on /sys/fs/cgroup/systemd/system.slice/docker-dbe43aa3e9926b762bec91a0b6c4862d719039b3a4086213cd6b52748fcee872.scope/cgroup.clone_children: Operation not supported
Sep 06 05:20:19 machine.example.com oci-systemd-hook[14327]: systemdhook <error>: Failed to set context system_u:object_r:svirt_sandbox_file_t:s0:c359,c405 on /sys/fs/cgroup/systemd/system.slice/docker-dbe43aa3e9926b762bec91a0b6c4862d719039b3a4086213cd6b52748fcee872.scope/cgroup.event_control: Operation not supported
Sep 06 05:20:19 machine.example.com oci-systemd-hook[14327]: systemdhook <error>: Failed to set context system_u:object_r:svirt_sandbox_file_t:s0:c359,c405 on /sys/fs/cgroup/systemd/system.slice/docker-dbe43aa3e9926b762bec91a0b6c4862d719039b3a4086213cd6b52748fcee872.scope/notify_on_release: Operation not supported
Sep 06 05:20:19 machine.example.com oci-systemd-hook[14327]: systemdhook <error>: Failed to set context system_u:object_r:svirt_sandbox_file_t:s0:c359,c405 on /sys/fs/cgroup/systemd/system.slice/docker-dbe43aa3e9926b762bec91a0b6c4862d719039b3a4086213cd6b52748fcee872.scope/cgroup.procs: Operation not supported
Sep 06 05:20:19 machine.example.com oci-systemd-hook[14327]: systemdhook <error>: Failed to set context system_u:object_r:svirt_sandbox_file_t:s0:c359,c405 on /sys/fs/cgroup/systemd/system.slice/docker-dbe43aa3e9926b762bec91a0b6c4862d719039b3a4086213cd6b52748fcee872.scope/tasks: Operation not supported

Expected results:

No errors logged in out-of-box situation.

Additional info:

Since the errors don't actually prevent the container and systemd from running, it's confusing to see them logged. Either the hook shouldn't try those operations at all, or it should ignore those errors and be less verbose if they are only nice-to-have, or if getting that context set is important, the container should not get started at all if setting it fails.

Comment 3 Jan Pazdziora 2017-09-06 11:15:33 UTC
I see the same errors on Fedora 25 as well.

Comment 4 Mikhail Zabaluev 2018-05-01 22:01:13 UTC
May be related to bug 1510139.

Comment 5 Daniel Walsh 2019-01-10 18:24:19 UTC
Should be fixed in current contaner-selinux

Comment 8 Daniel Walsh 2019-05-29 13:01:43 UTC
I think the issue here is oci-systemd-hook is attempting to set the SELinux label on cgroups but the kernel does not support this, I don't know why this gets the read-only error.

Can you try this command with podman?

Comment 10 errata-xmlrpc 2019-06-04 19:10:32 UTC
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://access.redhat.com/errata/RHBA-2019:1356


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