Bug 1326045

Summary: Docker CLI option backward compatability not taking effect
Product: OpenShift Container Platform Reporter: Devan Goodwin <dgoodwin>
Component: InstallerAssignee: Devan Goodwin <dgoodwin>
Status: CLOSED ERRATA QA Contact: Ma xiaoqiang <xiama>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.2.0CC: aos-bugs, gpei, jialiu, jokerman, mmccomas, xtian
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-07 10:55: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:

Description Devan Goodwin 2016-04-11 16:06:13 UTC
Description of problem:

CLI options such as cli_docker_log_options and cli_docker_options are supposed to be migrated to the new format (openshift_docker_log_options) but this does not appear to be working.

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

atomic-openshift-utils-3.0.76-1.git.6.d2118c7.fc23.noarch
RPM based install environment


How reproducible:

Seemingly 100%


Steps to Reproduce:
1. Run an inventory with the following options:

cli_docker_log_options="max-size=1M"
cli_docker_options="--log-level=\"warn\""


Actual results:

On any master, or node:

(root@node2 ~) $ cat /etc/sysconfig/docker | grep OPTIONS
OPTIONS=' --selinux-enabled --insecure-registry=172.30.0.0/16 '


Expected results:

Log options should have been added to the OPTIONS line.

Comment 1 Devan Goodwin 2016-04-11 16:07:03 UTC
Switching to the new openshift_docker_* options and re-running will cause them to take effect.

Comment 2 Devan Goodwin 2016-04-12 14:15:27 UTC
Fixed in: https://github.com/openshift/openshift-ansible/pull/1742

Worth noting however that the format of the option has changed to now be a JSON list. i.e.:

cli_docker_log_options=["max-size=2M" , "max-file=5"]

Comment 3 Devan Goodwin 2016-04-15 16:12:17 UTC
This is probably specific to ops, so I am going to move it to upcoming release.

Comment 4 Devan Goodwin 2016-04-20 19:03:42 UTC
PR now merged. The new list format, as well as the old comma separated string format are both supported, as are both openshift_docker_log_options and the legacy cli_docker_log_options.

Comment 6 Ma xiaoqiang 2016-05-17 03:00:11 UTC
Check on openshift-ansible-3.0.90-1.git.0.a077b68.el7.noarch.rpm

Scenario 1:
Install env with the following parameters
openshift_docker_log_options: ["max-size=1M", "max-file=3"]
cli_docker_options: "--log-level=\"warn\" --insecure-registry=192.168.0.0/16"

Check the docker options
OPTIONS=' --selinux-enabled --log-opt max-size=1M --log-opt max-file=3 --insecure-registry=172.30.0.0/16 --log-level="warn" --insecure-registry=192.168.0.0/16'
Get the expected result.


Scenario 2:
Install env with the following parameters
cli_docker_log_options: "max-size=1M, max-file=3"
  openshift_docker_options: "--log-level=\"warn\" --insecure-registry=192.168.0.0/16"

Check the docker options
OPTIONS=' --selinux-enabled --log-opt max-size=1M --log-opt max-file=3 --insecure-registry=172.30.0.0/16 --log-level="warn" --insecure-registry=192.168.0.0/16'
Get the expected result.

Comment 8 errata-xmlrpc 2016-06-07 10:55: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://access.redhat.com/errata/RHBA-2016:1208