Hide Forgot
Description of problem: ansible does not correctly apply docker options configured in inventory file. 1. does not work at all: openshift_docker_options="-l warn --ipv6=false --log-opt max-size=1M --log-opt max-file=3" 2. does not work at all: docker_log_options="--log-opt max-size=1M --log-opt max-file=3" docker_options="--log-level=\"warn\"" 3. does not work. Produce incorrect results for log options, do not apply log level at all. cli_docker_log_options="max-size=1M max-file=3" cli_docker_options="--log-level=\"warn\"" these settings produce the following line: OPTIONS='--insecure-registry=172.30.0.0/16 --selinux-enabled --log-opt max-size=1M max-file=3' Version-Release number of selected component (if applicable): 3.1.1 How reproducible: set options as above and run ansible playbook Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Are they using the packaged version of the playbooks, or are they using the version from the openshift-ansible repository? I don't think we've shipped a version of atomic-openshift-utils to the 3.1 channel that supports the new openshift_docker_* variables (It will ship with 3.2 though).
I have reproduced this issue on my test environment: root@master # rpm -qa | grep -i atomic atomic-openshift-utils-3.0.35-1.git.0.6a386dd.el7aos.noarch atomic-openshift-clients-3.1.1.6-1.git.0.b57e8bd.el7aos.x86_64 atomic-openshift-master-3.1.1.6-1.git.0.b57e8bd.el7aos.x86_64 atomic-openshift-node-3.1.1.6-1.git.0.b57e8bd.el7aos.x86_64 atomic-openshift-sdn-ovs-3.1.1.6-1.git.0.b57e8bd.el7aos.x86_64 atomic-openshift-3.1.1.6-1.git.0.b57e8bd.el7aos.x86_64 tuned-profiles-atomic-openshift-node-3.1.1.6-1.git.0.b57e8bd.el7aos.x86_64 yes, new options "openshift_docker_* " do not work at all. But old ones work incorrectly: cli_docker_log_options="max-size=1M max-file=3" cli_docker_options="--log-level=\"warn\"" produced line: OPTIONS='--insecure-registry=172.30.0.0/16 --selinux-enabled --log-opt max-size=1M max-file=3' Which is incorrect and prevent docker to start.
Hey Alexander, the code is using a "," as the default separator, so this should work: cli_docker_log_options="max-size=1M,max-file=3" However we're going to be migrating this to require a JSON list instead in the new openshift_docker_log_options setting. (This will not be backward compat with the old plain string value anymore)
PR is up here: https://github.com/openshift/openshift-ansible/pull/1742 Once this is merged and rebuilt, the new format for the log options will be: openshift_docker_log_options=["max-size=1M", "max-file=3"]
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.
check on openshift-ansible-3.0.82-1 scenarios 1 install env with 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 configuration 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' set the correct value Scenarios 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' set the correct value. Move this issue to VERIFIED.
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:1065
(In reply to Devan Goodwin from comment #4) > PR is up here: https://github.com/openshift/openshift-ansible/pull/1742 > > Once this is merged and rebuilt, the new format for the log options will be: > > openshift_docker_log_options=["max-size=1M", "max-file=3"] We don't need to update documentation? https://docs.openshift.com/enterprise/3.2/install_config/install/advanced_install.html#configuring-host-variables
https://github.com/openshift/openshift-docs/pull/2129