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.
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
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
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
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