Bug 1553012

Summary: Duplicated node-labels in node-config.yaml while enabling cri-o
Product: OpenShift Container Platform Reporter: Gan Huang <ghuang>
Component: InstallerAssignee: Steve Milner <smilner>
Status: CLOSED CURRENTRELEASE QA Contact: Gan Huang <ghuang>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.9.0CC: aos-bugs, ghuang, jokerman, mgugino, mmccomas, sdodson, smilner, smunilla, wmeng
Target Milestone: ---   
Target Release: 3.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openshift-ansible-3.9.4-1.git.0.a49cc04.el7 Doc Type: Bug Fix
Doc Text:
Cause: The nodes configuration file had hardcoded labels in the cri-o section. Consequence: Double labels could occur if labels were set elsewhere in the installer. Fix: Remove the hardcoded labels as they are not needed. Result: The possibility of having double labels is no longer present.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-18 18:19:21 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 Gan Huang 2018-03-08 02:29:17 UTC
Description of problem:
Duplicated node-labels in node-config.yaml while enabling cri-o:

# grep node-labels -A 3 /etc/origin/node/node-config.yaml 
  node-labels:
  - router=enabled
  - role=node
  - registry=enabled
--
  node-labels:
  - router=true
  - registry=true
  runtime-request-timeout:


Version-Release number of the following components:
openshift-ansible-3.9.3-1.git.0.e166207.el7.noarch.rpm

How reproducible:
always

Steps to Reproduce:
1. Trigger installation with cir-o enabled
# cat inventory
<--snip-->
openshift_use_crio=true
openshift_crio_systemcontainer_image_override=registry.reg-aws.openshift.com:443/openshift3/cri-o:v3.9
[nodes]
host-8-241-100.host.centralci.eng.rdu2.redhat.com openshift_node_labels="{'role': 'node','registry': 'enabled','router': 'enabled'}" 
<--snip-->


Actual results:
# grep node-labels -A 3 /etc/origin/node/node-config.yaml 
  node-labels:
  - router=enabled
  - role=node
  - registry=enabled
--
  node-labels:
  - router=true
  - registry=true
  runtime-request-timeout:

Expected results:

Additional info:
Please attach logs from ansible-playbook with the -vvv flag

Comment 1 Steve Milner 2018-03-08 14:36:47 UTC
It probably now needs the "run once" added to it.

Comment 2 Steve Milner 2018-03-08 14:52:06 UTC
Oops, this is node-config, not docker-gc. It's not run once on the gc.

Comment 3 Steve Milner 2018-03-08 14:52:57 UTC
Which form of cri-o installed was used?

Comment 4 Michael Gugino 2018-03-08 15:07:17 UTC
This seems to be caused by hard-coding node-labels in kubelet args when using crio:

https://github.com/openshift/openshift-ansible/commit/55f6b3879d770d756963564a5894c09806a31003

Are these strictly necessary?  I don't think they are, they don't look specific to crio and probably can be removed.

Comment 5 Steve Milner 2018-03-08 15:20:05 UTC
Good catch Michael! To my knowledge the node-labels that are hard coded in the template shouldn't be required. I'll remove them and push the PR up.

Comment 6 Steve Milner 2018-03-08 15:24:45 UTC
PR: https://github.com/openshift/openshift-ansible/pull/7453

Comment 7 Scott Dodson 2018-03-08 20:29:25 UTC
Release-3.9 backport https://github.com/openshift/openshift-ansible/pull/7462

Comment 9 Gan Huang 2018-03-09 08:44:21 UTC
Verified in openshift-ansible-3.9.4-1.git.0.a49cc04.el7.noarch.rpm