Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1392742 - OpenShift installer always sets --selinux-enabled in sysconfig/docker. Can break working overlay installs.
OpenShift installer always sets --selinux-enabled in sysconfig/docker. Can b...
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer (Show other bugs)
3.4.0
x86_64 Linux
unspecified Severity medium
: ---
: ---
Assigned To: Russell Teague
Johnny Liu
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-11-08 01:13 EST by Mike Fiedler
Modified: 2018-08-29 14:34 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Feature: Add new option 'openshift_docker_selinux_enabled' Reason: Allow user to override default installation docker options setting of '--selinux-enabled'. Result: Placing 'openshift_docker_selinux_enabled=false' in user inventory file will remove --selinux-enabled docker option.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-04-12 14:48:14 EDT
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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0903 normal SHIPPED_LIVE OpenShift Container Platform atomic-openshift-utils bug fix and enhancement 2017-04-12 18:45:42 EDT

  None (edit)
Description Mike Fiedler 2016-11-08 01:13:20 EST
Description of problem:

I installed docker 1.12.3-3 the way I wanted it configured.   This included configuring overlayfs as the graphdriver which requires setting --selinux-enabled=false.   This disables selinux in containers, but that is OK for me.

When I install OpenShift 3.4, it overwrites my setting for --selinux-enabled.   After the install, containers will no longer start until the flag is restored (or if selinux is disabled entirely).

The install should maintain existing docker settings.  I suppose if they are known to break OpenShift they could be changed, but that's not the case here.


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


How reproducible: Always


Steps to Reproduce:
1. Install docker 1.12.3-3 outside of OpenShift and configure it for overlay.  ere's a good guide:  http://www.projectatomic.io/blog/2015/06/notes-on-fedora-centos-and-docker-storage-drivers/
2. Verify --selinux-enabled=false
3. Install OpenShift 3.4.0.22 using the byo/config.yml playbook


Actual results:

sysconfig/docker contains --selinux-enabled and no containers will start after the install.

Expected results:

config value is maintained
Comment 1 Scott Dodson 2016-11-08 11:09:08 EST
Mike, marking this upcoming release. If this is a regression lets remove that flag and we can treat it as a blocker, if it's not a regression we'll get to it after the release.
Comment 2 Alex Dellapenta 2016-11-08 11:29:55 EST
Related discussion (docs BZ):

https://bugzilla.redhat.com/show_bug.cgi?id=1290487#c8
Comment 3 Mike Fiedler 2016-11-08 21:00:52 EST
This is not a regression.   3.3 installer behaves the same way.   

The discussion Alex links is a good one, but I think the more general issue here is having the installer respect the existing docker config if there is nothing about it that breaks OpenShift.   UpcomingRelease sounds fine.
Comment 4 Russell Teague 2016-12-12 15:21:37 EST
Related: https://github.com/ansible/ansible/issues/18692
Comment 6 Johnny Liu 2017-01-06 06:29:56 EST
@Russell, go through the above PR, seem like introduce a new ansible option - openshift_docker_selinux_enabled, that means user should set "openshift_docker_selinux_enabled=false" in inventory host file to run install with docker overlay setting, am I right?
Comment 7 Russell Teague 2017-01-09 13:28:16 EST
(In reply to Johnny Liu from comment #6)
Johnny, if the user wants to disable the use of selinux within the containers, they would set "openshift_docker_selinux_enabled=false".  This will cause docker to not run selinux within the container regardless of the status of selinux on the host.
Comment 8 Russell Teague 2017-01-09 13:31:11 EST
Mike, could you comment on where we are headed with this and if it meets your original request?
Comment 9 Mike Fiedler 2017-01-09 13:33:34 EST
This handles the specific example of enabling/disabling selinux for the containers.  My more general concern in this bug was not breaking existing good Docker configurations by overwriting the configuration during OpenShift install.

Is OpenShift always "in control" of the Docker configuration?  i.e. existing user configuration outside of what OpenShift performs is not supported?
Comment 10 Mike Fiedler 2017-01-09 13:34:28 EST
I can live with a restriction, but we should probably document it.
Comment 11 Russell Teague 2017-01-24 13:26:13 EST
Merged. https://github.com/openshift/openshift-ansible/pull/3044
Comment 12 Johnny Liu 2017-02-03 02:39:35 EST
Verified this bug with openshift-ansible-3.5.3-1.git.0.80c2436.el7.noarch, and PASS.

Set openshift_docker_selinux_enabled=false in inventory host file, trigger installation, after it is completed, checking:

# cat /etc/sysconfig/docker|grep OPTION
OPTIONS=' --log-driver=json-file --log-opt max-size=50m'

No "--selinux-enabled" options in docker config file.
Comment 15 errata-xmlrpc 2017-04-12 14:48:14 EDT
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://access.redhat.com/errata/RHBA-2017:0903

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