Bug 1271229 - when docker-selinux rules don't apply
when docker-selinux rules don't apply
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: docker (Show other bugs)
7.3
Unspecified Linux
unspecified Severity medium
: rc
: ---
Assigned To: Lokesh Mandvekar
atomic-bugs@redhat.com
: Extras
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-13 08:25 EDT by Martin Cermak
Modified: 2015-12-08 10:36 EST (History)
4 users (show)

See Also:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-08 10:36:20 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Martin Cermak 2015-10-13 08:25:56 EDT
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 09:49:31 EDT
Lokesh I think we need to add

%package selinux
Requires(post): docker
Comment 3 Daniel Walsh 2015-10-28 10:22:08 EDT
Fixed in docker-1.9
Comment 5 Alex Jia 2015-11-20 03:29:14 EST
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 10:36:20 EST
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.