Bug 1497412

Summary: Comment old registry params are called always
Product: OpenShift Container Platform Reporter: Anping Li <anli>
Component: LoggingAssignee: Jan Wozniak <jwozniak>
Status: CLOSED ERRATA QA Contact: Anping Li <anli>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.7.0CC: aos-bugs, jwozniak, rmeggins
Target Milestone: ---   
Target Release: 3.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-28 22:14:33 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:
Attachments:
Description Flags
The docker service was restarted for comment old registry params are called none

Description Anping Li 2017-09-30 08:29:40 UTC
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:

Comment 1 Anping Li 2017-09-30 09:28:39 UTC
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.

Comment 2 Jan Wozniak 2017-10-04 13:03:05 UTC
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
}

Comment 3 Jan Wozniak 2017-10-06 13:05:35 UTC
A fix was merged to the master https://github.com/openshift/openshift-ansible/pull/5629

Comment 4 Anping Li 2017-10-11 09:47:30 UTC
Verified and pass with v3.7.0-0.143.2.0.

Comment 7 errata-xmlrpc 2017-11-28 22:14:33 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/RHSA-2017:3188