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.

Bug 1406674

Summary: Upgrading oci-systemd-hook to oci-systemd-hook-0.1.4-7.gita9c551a.el7 prevents execution of systemd in containers
Product: Red Hat Enterprise Linux 7 Reporter: Jan Pazdziora (Red Hat) <jpazdziora>
Component: oci-systemd-hookAssignee: Lokesh Mandvekar <lsm5>
Status: CLOSED DUPLICATE QA Contact: Martin Jenner <mjenner>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.3CC: jpazdziora
Target Milestone: rcKeywords: Extras
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-21 08:54:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jan Pazdziora (Red Hat) 2016-12-21 08:34:27 UTC
Description of problem:

For some time, running

# docker run --rm -ti rhel7 /usr/sbin/init

made systemd run in container just fine. After upgrade of oci-systemd-hook, it now produces errors.

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

oci-systemd-hook-0.1.4-7.gita9c551a.el7

How reproducible:

Deterministic.

Steps to Reproduce:
1. Have RHEL 7 machine with docker 1.10 installed.
2. Check that running docker run --rm -ti rhel7 /usr/sbin/init produces nice output from systemd.
3. Use latest Extras, upgrade docker to 1.12, restart the docker daemon, check that the same docker run command still works.
4. Upgrade oci-systemd-hook, restart the docker daemon.
5. Run docker run --rm -ti rhel7 /usr/sbin/init

Actual results:

# docker run --rm -ti rhel7 /usr/sbin/init
systemd 219 running in system mode. (+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
Detected virtualization docker.
Detected architecture x86-64.

Welcome to Red Hat Enterprise Linux Server 7.3 (Maipo)!

Set hostname to <a50fa9ae159c>.
Failed to install release agent, ignoring: No such file or directory
Failed to create root cgroup hierarchy: Read-only file system
Failed to allocate manager object: Read-only file system
[!!!!!!] Failed to allocate manager object, freezing.

AVC denial

type=AVC msg=audit(1482308994.962:565): avc:  denied  { remount } for  pid=16520 comm="systemd" scontext=system_u:system_r:svirt_lxc_net_t:s0:c87,c549 tcontext=system_u:object_r:svirt_sandbox_file_t:s0:c87,c549 tclass=filesystem

gets logged but even in Permissive the execution fails.

Expected results:

# docker run --rm -ti rhel7 /usr/sbin/initsystemd 219 running in system mode. (+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
Detected virtualization docker.
Detected architecture x86-64.

Welcome to Red Hat Enterprise Linux Server 7.3 (Maipo)!

Set hostname to <c8ed534635b3>.
[  OK  ] Created slice Root Slice.
[  OK  ] Created slice System Slice.
[  OK  ] Reached target Swap.
[  OK  ] Created slice system-getty.slice.
[  OK  ] Reached target Remote File Systems.
[  OK  ] Listening on Delayed Shutdown Socket.
[  OK  ] Listening on Journal Socket.
         Starting Journal Service...
[  OK  ] Reached target Paths.

[...]

Additional info:

Downgrading to oci-systemd-hook-0.1.4-6.git337078c.el7 from released rhel-7-server-extras-rpms makes things work again.

Comment 1 Jan Pazdziora (Red Hat) 2016-12-21 08:54:22 UTC
This bug was around for so long that I completely forgot I've already reported it in November.

*** This bug has been marked as a duplicate of bug 1393312 ***