Bug 1583530

Summary: [3.6]Fail to upgrade against ocp with embedded etcd
Product: OpenShift Container Platform Reporter: liujia <jiajliu>
Component: Cluster Version OperatorAssignee: Russell Teague <rteague>
Status: CLOSED ERRATA QA Contact: liujia <jiajliu>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 3.6.1CC: aos-bugs, erich, fshaikh, jiajliu, jokerman, mmccomas, pkanthal, rteague, sdodson, smunilla, wmeng
Target Milestone: ---   
Target Release: 3.6.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: When using embedded etcd the group 'oo_etcd_to_config' is undefined and was being used as a conditional for the task. Consequence: The task was failing because the conditional could not be evaluated due to the undefined variable. Fix: Added a conditional check to ensure the variable was present before evaluating the remaining conditions. Result: The task would be skipped when using embedded etcd because the task does not apply in that scenario.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-08-09 22:10:03 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 liujia 2018-05-29 08:01:27 UTC
Description of problem:
Fail to upgrade against ocp with embedded etcd.
PLAY [Create etcd client certificates for master hosts] ************************

TASK [Gathering Facts] *********************************************************
fatal: [x.x.x.x]: FAILED! => {
    "failed": true
}

MSG:

The conditional check 'true in hostvars | oo_select_keys(groups['oo_etcd_to_config']) | oo_collect('__etcd_cert_lacks_hostname') | default([false])' failed. The error was: |oo_select_keys failed expects first param is a list

Version-Release number of the following components:
openshift-ansible-3.6.173.0.122-1.git.0.4b56b4f.el7.noarch

How reproducible:
always

Steps to Reproduce:
1. Install ocp v3.5 with embedded etcd
2. Upgrade above ocp
3.

Actual results:
Upgrade failed.

Expected results:
Upgrade succeed.

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

Comment 11 Eric Rich 2018-07-06 13:46:14 UTC
It should be noted that in 3.7 we remove embedded etcd! 

https://docs.openshift.com/container-platform/3.7/upgrading/migrating_embedded_etcd.html

Is that a possible mitigation here?

Comment 14 Russell Teague 2018-07-06 18:08:44 UTC
Proposed: https://github.com/openshift/openshift-ansible/pull/9097

Comment 15 Russell Teague 2018-07-09 20:18:14 UTC
Waiting for build with 
$  git tag --contains a413b8b90ab0d1d4d135dfb7504ec8b93c1141de

Comment 17 liujia 2018-07-16 09:00:37 UTC
Still failed for the same error on openshift-ansible-3.6.173.0.126-1.git.0.47264f0.el7.noarch.

Checked that pr9097 was not merged in latest v3.6.173.0.126-1

Comment 18 Russell Teague 2018-07-17 13:08:46 UTC
Fixed in build openshift-ansible-3.6.173.0.127-1

Comment 21 Russell Teague 2018-07-25 17:27:06 UTC
Proposed: https://github.com/openshift/openshift-ansible/pull/9337

Comment 25 liujia 2018-08-01 05:16:04 UTC
Verified on openshift-ansible-3.6.173.0.128-1.git.0.8b3b86b.el7.noarch

Comment 29 errata-xmlrpc 2018-08-09 22:10:03 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-2018:2339