Bug 1370935

Summary: docker-selinux broken in 7.3
Product: Red Hat Enterprise Linux 7 Reporter: Jeremy Eder <jeder>
Component: dockerAssignee: Lokesh Mandvekar <lsm5>
Status: CLOSED ERRATA QA Contact: atomic-bugs <atomic-bugs>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 7.3CC: dwalsh, gouyang, jhonce, jneedle, lsm5, lvrabec, mgrepl, mmarhefk, ncredi, sejug, walters, wmeng
Target Milestone: rcKeywords: Extras
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-04 09:09:13 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:
Bug Depends On:    
Bug Blocks: 1375561    

Comment 2 Daniel Walsh 2016-08-29 09:36:13 UTC
The problem is the docker-selinux package did not install properly.  There are build differences between 7.3 and 7.2.7 selinux-policy package that is causing docker-selinux to blow up.

Comment 8 Daniel Walsh 2016-09-03 09:28:02 UTC
I agree this is a blocker.

The latest docker-selinux should have /usr/bin/docker* labeled as docker_exec_t.

yum reinstall docker-selinux
restorecon -v /usr/bin/docker*
ls -lZ /usr/bin/docker*

If they are all labeled docker_exec_t, then you should be able to 

systemctl restart docker Or docker-latest

Now check the label on the docker process.

ps -eZ | grep docker

They should all be labeled docker_t.

Comment 9 Colin Walters 2016-09-03 10:20:52 UTC
That only applies to non-AH.  For AH we want Docker to work by default.

If you look at https://atomic-e2e-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/job/rhelah-autobrew-7.3-treecompose/

The error is:
02:02:16 Failed to resolve typeattributeset statement at /etc/selinux/targeted/tmp/modules/200/docker/cil:168
02:02:16 /usr/sbin/semodule:  Failed!

Comment 10 Daniel Walsh 2016-09-03 11:05:54 UTC
Is /etc/selinux/targeted/tmp/modules/200/docker/cil still available?

The question is what typeattribute is it blowing up over.

Comment 12 Daniel Walsh 2016-09-06 16:21:27 UTC
The issue was on selinux-policy

Comment 13 Daniel Walsh 2016-09-06 16:26:34 UTC
Should be fixed in selinux-policy-3.13.1-97.el7

Comment 14 Daniel Walsh 2016-09-06 16:26:58 UTC
Docker package should be a requires on this patch.

Comment 18 Sebastian Jug 2016-09-06 20:27:48 UTC
@Colin,

Indeed you're right, after docker reinstall issue resolved.

Comment 20 Daniel Walsh 2016-09-06 21:08:05 UTC
Yes I just checked in a fix for this in docker-selinux.

edbbfc9001fbf949e4fb98392c647cdd820f06fe fixes this issue.

Seems selinux policy in RHEL now has a domain for k8s which defines this path.
This policy is not present in Rawhide though.

Comment 22 Colin Walters 2016-09-07 14:05:15 UTC
*** Bug 1373952 has been marked as a duplicate of this bug. ***

Comment 24 Daniel Walsh 2016-09-07 16:23:44 UTC
C#19 is this bug. I would say.

Comment 25 Daniel Walsh 2016-09-07 16:29:39 UTC
c#21 is somewhat covered here.
https://bugzilla.redhat.com/show_bug.cgi?id=1373648

Comment 26 Colin Walters 2016-09-08 12:52:40 UTC
Ok, works with:

# atomic host status
State: idle
Deployments:
● rhelah-autobuild:rhel-atomic-host/7.3/x86_64/autobrew/buildmaster
       Version: 7.3.internal.0.27 (2016-09-08 12:49:40)
        Commit: ff03b46032f9e12b033b322b4f2e0841543f04178d955963a08a1b7e71412413
        OSName: rhel-atomic-host
# rpm -q docker selinux-policy
docker-1.10.3-53.el7.x86_64
selinux-policy-3.13.1-97.el7.noarch

Comment 27 Daniel Walsh 2016-09-08 13:08:28 UTC
Woohoo Finally.

Comment 29 Matus Marhefka 2016-09-21 10:15:53 UTC
VERIFIED with these versions:

docker-1.10.3-53.el7.x86_64
docker-selinux-1.10.3-53.el7.x86_64
selinux-policy-3.13.1-98.el7.noarch

Beaker job which works with atomic/docker executables:
https://beaker.engineering.redhat.com/recipes/3085819#tasks

Comment 33 errata-xmlrpc 2016-11-04 09:09:13 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://rhn.redhat.com/errata/RHSA-2016-2634.html