Description of problem: The task 'Comment old registry params' was called when deploy logging. and it was called each time. It restart docker each time and create useless data in /etc/sysconfig/docker . Version-Release number of selected component (if applicable): openshift-ansible-3.7.0-0.134.0.git.0.6f43fc3.el7.noarch How reproducible: always Steps to Reproduce: 1. deploy loggging on OCP by playbook 2. checking the docker service and cat /etc/sysconfig/docker 3. loop step 1. and 2. Actual results: The task 'The docker service was restart always' was called always. cat /etc/sysconfig/docker # To use docker-latest client, uncomment below lines #DOCKERBINARY=/usr/bin/docker-latest #DOCKERDBINARY=/usr/bin/dockerd-latest #DOCKER_CONTAINERD_BINARY=/usr/bin/docker-containerd-latest #DOCKER_CONTAINERD_SHIM_BINARY=/usr/bin/docker-containerd-shim-latest #ADD_REGISTRY=''# Moved to /etc/containers/registries.conf #BLOCK_REGISTRY=''# Moved to /etc/containers/registries.conf #INSECURE_REGISTRY=''# Moved to /etc/containers/registries.conf #ADD_REGISTRY=''# Moved to /etc/containers/registries.conf #BLOCK_REGISTRY=''# Moved to /etc/containers/registries.conf #INSECURE_REGISTRY=''# Moved to /etc/containers/registries.conf #ADD_REGISTRY=''# Moved to /etc/containers/registries.conf #BLOCK_REGISTRY=''# Moved to /etc/containers/registries.conf #INSECURE_REGISTRY=''# Moved to /etc/containers/registries.conf Expected results: Only Comment old registry params when there are ADD_REGISTRY and INSECURE_REGISTRY. Additional info:
Created attachment 1332642 [details] The docker service was restarted for comment old registry params are called Please ignore the last memory error, I will open another bug to trace it.
Could you please attach your inventory as well? I can't seem to reproduce this behavior, in my case the task 'Comment old registry params' is always skipped no matter what I do. Also, could you please provide the output of "ansible --version" just to make sure we are on the same version? TASK [docker : Comment old registry params in /etc/sysconfig/docker] ********************************************************************************************************************************************** task path: /home/test/openshift-ansible/roles/docker/tasks/package_docker.yml:64 Wednesday 04 October 2017 14:55:23 +0200 (0:00:00.028) 0:00:24.768 ***** skipping: [c1] => (item={u'reg_conf_var': u'ADD_REGISTRY'}) => { "changed": false, "item": { "reg_conf_var": "ADD_REGISTRY" }, "skip_reason": "Conditional result was False", "skipped": true } skipping: [c1] => (item={u'reg_conf_var': u'BLOCK_REGISTRY'}) => { "changed": false, "item": { "reg_conf_var": "BLOCK_REGISTRY" }, "skip_reason": "Conditional result was False", "skipped": true } skipping: [c1] => (item={u'reg_conf_var': u'INSECURE_REGISTRY'}) => { "changed": false, "item": { "reg_conf_var": "INSECURE_REGISTRY" }, "skip_reason": "Conditional result was False", "skipped": true }
A fix was merged to the master https://github.com/openshift/openshift-ansible/pull/5629
Verified and pass with v3.7.0-0.143.2.0.
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/RHSA-2017:3188