Bug 1615081

Summary: Running container with -t fails to start systemd
Product: [Fedora] Fedora Reporter: Jan Pazdziora (Red Hat) <jpazdziora>
Component: dockerAssignee: Daniel Walsh <dwalsh>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 28CC: adimania, admiller, amurdaca, dwalsh, fkluknav, ichavero, jcajka, jpazdziora, lsm5, marianne, nalin, santiago, vbatts
Target Milestone: ---   
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: 2018-08-13 09:07:04 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) 2018-08-12 07:15:39 UTC
Description of problem:

Running

docker run -ti --name systemd --rm registry.fedoraproject.org/fedora:28 /usr/sbin/init

results in

Mount failed for selinuxfs on /sys/fs/selinux:  No such file or directory
Failed to set up the root directory for shared mount propagation: Operation not permitted

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

docker-1.13.1-59.gitaf6b32b.fc28.x86_64
container-selinux-2.65-1.gitbf5b26b.fc28.noarch
oci-systemd-hook-0.1.17-1.git87fb61e.fc28.x86_64

How reproducible:

Deterministic.

Steps to Reproduce:
1. Run

docker run -i --name systemd --rm registry.fedoraproject.org/fedora:28 /usr/sbin/init

2. See it say

Mount failed for selinuxfs on /sys/fs/selinux:  No such file or directory

3. In another terminal run docker exec systemd journalctl, see it print out some entries
4. In another terminal run docker rm -f systemd
5. Now repeat with -t option added to the docker run command:

docker run -ti --name systemd --rm registry.fedoraproject.org/fedora:28 /usr/sbin/init

Actual results:

Mount failed for selinuxfs on /sys/fs/selinux:  No such file or directory
Failed to set up the root directory for shared mount propagation: Operation not permitted

and docker exec systemd journalctl prints

-- No entries --
No journal files were found.

Expected results:

The output with -ti should be the same as with -i.

Additional info:

Comment 1 Jan Pazdziora (Red Hat) 2018-08-13 09:07:04 UTC
I managed to hit Enter too soon and created duplicate bugzillas.

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