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 1271229 - when docker-selinux rules don't apply
Summary: when docker-selinux rules don't apply
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: docker
Version: 7.3
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Lokesh Mandvekar
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-13 12:25 UTC by Martin Cermak
Modified: 2019-03-06 02:41 UTC (History)
4 users (show)

Fixed In Version: 1.8.2-10.el7
Doc Type: Bug Fix
Doc Text:
Previously, when docker-selinux was installed as a dependency of docker, it was being installed before docker itself. This caused its %post scriptlet to fail. As of Docker 1.9, this has been fixed, and there are no related error messages.
Clone Of:
Environment:
Last Closed: 2015-12-08 15:36:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2554 0 normal SHIPPED_LIVE docker bug fix and enhancement update 2015-12-08 20:36:09 UTC

Description Martin Cermak 2015-10-13 12:25:56 UTC
When docker-selinux gets installed as a dependency of docker, it gets installed before docker itself making its %post scriptlet fail on a not-yet-installed docker.rpm's file. Not sure if this is yum, rpm or docker packaging issue. Please reassign the component if my guess was wrong. Detsails:

=======
[0 root@qeos-71 test]# yum -y install golang docker glibc-static device-mapper-devel btrfs-progs-devel selinux-policy-devel
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Repository 'extras' is missing name in configuration, using id
Repository 'extras-src' is missing name in configuration, using id
Repository 'golang-stuff' is missing name in configuration, using id
Package golang-1.4.2-9.el7.x86_64 already installed and latest version
Package glibc-static-2.17-105.el7.x86_64 already installed and latest version
Package 7:device-mapper-devel-1.02.107-2.el7.x86_64 already installed and latest version
Package btrfs-progs-devel-3.19.1-1.el7.x86_64 already installed and latest version
Package selinux-policy-devel-3.13.1-58.el7.noarch already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package docker.x86_64 0:1.8.2-6.el7 will be installed
--> Processing Dependency: docker-selinux >= 1.8.2-6.el7 for package: docker-1.8.2-6.el7.x86_64
--> Running transaction check
---> Package docker-selinux.x86_64 0:1.8.2-6.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===========================================================================================================================================================
 Package                                  Arch                             Version                                  Repository                        Size
===========================================================================================================================================================
Installing:
 docker                                   x86_64                           1.8.2-6.el7                              extras                           8.7 M
Installing for dependencies:
 docker-selinux                           x86_64                           1.8.2-6.el7                              extras                            60 k

Transaction Summary
===========================================================================================================================================================
Install  1 Package (+1 Dependent package)

Total download size: 8.7 M
Installed size: 37 M
Downloading packages:
(1/2): docker-selinux-1.8.2-6.el7.x86_64.rpm                                                                                        |  60 kB  00:00:00     
(2/2): docker-1.8.2-6.el7.x86_64.rpm                                                                                                | 8.7 MB  00:00:01     
-----------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                      7.6 MB/s | 8.7 MB  00:00:01     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : docker-selinux-1.8.2-6.el7.x86_64                                                                                                       1/2 
restorecon:  lstat(/var/lib/docker) failed:  No such file or directory
warning: %post(docker-selinux-1.8.2-6.el7.x86_64) scriptlet failed, exit status 255
Non-fatal POSTIN scriptlet failure in rpm package docker-selinux-1.8.2-6.el7.x86_64
  Installing : docker-1.8.2-6.el7.x86_64                                                                                                               2/2 
  Verifying  : docker-1.8.2-6.el7.x86_64                                                                                                               1/2 
  Verifying  : docker-selinux-1.8.2-6.el7.x86_64                                                                                                       2/2 

Installed:
  docker.x86_64 0:1.8.2-6.el7                                                                                                                              

Dependency Installed:
  docker-selinux.x86_64 0:1.8.2-6.el7                                                                                                                      

Complete!
[0 root@qeos-71 test]# 
[0 root@qeos-71 test]# rpm -q yum rpm
yum-3.4.3-132.el7.noarch
rpm-4.11.3-17.el7.x86_64
[0 root@qeos-71 test]# 
=======

Comment 2 Daniel Walsh 2015-10-13 13:49:31 UTC
Lokesh I think we need to add

%package selinux
Requires(post): docker

Comment 3 Daniel Walsh 2015-10-28 14:22:08 UTC
Fixed in docker-1.9

Comment 5 Alex Jia 2015-11-20 08:29:14 UTC
yum install docker works well on 1.8.2-10.el7, and there is no related error messages as Description mentioned.

Comment 7 errata-xmlrpc 2015-12-08 15:36:20 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/RHBA-2015-2554.html


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