Bug 1308621 - installer should retain options in /etc/sysconfig/docker
installer should retain options in /etc/sysconfig/docker
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer (Show other bugs)
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Scott Dodson
Ma xiaoqiang
: UpcomingRelease
Depends On:
  Show dependency treegraph
Reported: 2016-02-15 10:54 EST by Evgheni Dereveanchin
Modified: 2016-07-03 20:46 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Feature: Installation playbooks now allow you to specify arbitrary docker options to be added to /etc/sysconfig/docker Reason: To provide more flexible installation playbooks. Result: Docker options specified via the openshift_docker_options variable are now appended to the OPTIONS variable in /etc/sysconfig/docker allowing admins to specify arbitrary docker configuration values via installation playbooks.
Story Points: ---
Clone Of:
Last Closed: 2016-02-29 07:58:08 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
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 Knowledge Base (Solution) 2170951 None None None 2016-02-18 05:50 EST

  None (edit)
Description Evgheni Dereveanchin 2016-02-15 10:54:55 EST
Description of problem:
 Currently the Ansible installer will wipe all unexpected parameters at each run, so it's impossible to set a custom logging level, or for example the MTU for use with OpenShift on OpenStack

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

How reproducible:

Steps to Reproduce:
1. set up OpenShift 3.1.1
2. on nodes add options to /etc/sysconfig/docker, for example the docker logging level and MTU:
 OPTIONS='--insecure-registry= --selinux-enabled --mtu=1400 -l warn'

3. re-run the Ansible  playbook (typical practice when adding new nodes)

Actual results:
 On pre-existing nodes the added parameters were removed:
  OPTIONS='--insecure-registry= --selinux-enabled   '

Expected results:
 Parameters are preserved

Additional info:
 Ideally it would be great to pass custom parameters to the Ansible installer to avoid having to add these parameters each time manually
Comment 1 Scott Dodson 2016-02-15 13:31:15 EST
I'll add a variable to add arbitrary docker options.

As a workaround, for the specific items mentioned thus far in the bug you can work around the need to set them in /etc/sysconfig/docker via three ansible variables: openshift_node_sdn_mtu, cli_docker_log_driver, and cli_docker_log_options.

If using openshift sdn, you end up with an environment file placed in /run/openshift-sdn/docker-network that sets DOCKER_NETWORK_OPTIONS dynamically as required by the SDN. Setting openshift_node_sdn_mtu will override the code that looks at the interface and subtracts 50 from the MTU.
Comment 2 Scott Dodson 2016-02-15 16:22:31 EST
Proposed fix in https://github.com/openshift/openshift-ansible/pull/1404

To test, 

git pull https://github.com/sdodson/openshift-ansible docker-options

Then set openshift_docker_options="-l warn --ipv6=false" or whatever you wish
Comment 4 Ma xiaoqiang 2016-02-16 01:08:16 EST
Install environment with OpenShiftEnterpriseErrata[3.1/2016-02-15.3]
vim hosts
openshift_docker_options="-l warn --ipv6=false"

check the docker configuration
vim service docker status
 /usr/bin/docker daemon --insecure-registry= --selinux-enabled --log-driver json-file --log-opt max-size=10M -l warn --ipv6=false --storage-driver devicemapper --storage-opt dm.fs=xfs --storage-opt dm.thinpooldev=/dev/mapper/rhel72-docker--pool --storage-opt dm.use_deferred_removal=true -b=lbr0 --mtu=1000

The docker use correct parameters, move this issue to VERIFIED.
Comment 6 errata-xmlrpc 2016-02-29 07:58:08 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.


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