Bug 1538446

Summary: [3.7]Run etcd upgrade failed due to an undefined variable
Product: OpenShift Container Platform Reporter: liujia <jiajliu>
Component: Cluster Version OperatorAssignee: Michael Gugino <mgugino>
Status: CLOSED ERRATA QA Contact: liujia <jiajliu>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.7.1CC: aos-bugs, jokerman, mmccomas, wmeng
Target Milestone: ---   
Target Release: 3.7.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-05 09:35:31 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-01-25 06:15:21 UTC
Description of problem:
Run etcd upgrade playbook to upgrade etcd from v3.1.9. Upgrade failed when generate etcd backup file due to an undefined variable.

TASK [etcd : Generate etcd backup] *********************************************
task path: /usr/share/ansible/openshift-ansible/roles/etcd/tasks/backup/backup.yml:64
fatal: [x.x.x.x]: FAILED! => {"failed": true, "msg": "the field 'args' has an invalid value, which appears to include a variable that is undefined. The error was: {{ 'etcdctl' if r_etcd_common_etcd_runtime == 'host' or r_etcd_common_embedded_etcd | bool else 'docker exec etcd_container etcdctl' if r_etcd_common_etcd_runtime == 'docker' else 'runc exec etcd etcdctl' }}: {{ openshift.common.etcd_runtime }}: 'openshift' is undefined\n\nThe error appears to have been in '/usr/share/ansible/openshift-ansible/roles/etcd/tasks/backup/backup.yml': line 64, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Generate etcd backup\n  ^ here\n"}

Version-Release number of the following components:
openshift-ansible-3.7.26-1.git.0.f87f1af.el7.noarch

How reproducible:
always

Steps to Reproduce:
1. Rpm install ocp with external etcd(v3.1.9)
2. Upgrade etcd
# ansible-playbook -i hosts playbooks/byo/openshift-cluster/upgrades/upgrade_etcd.yml
3.

Actual results:
Upgrade etcd failed.

Expected results:
Upgrade etcd succeed.

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

Comment 1 Michael Gugino 2018-01-25 23:17:17 UTC
This does not appear to be a problem in master due to refactoring.

PR Created for 3.7: https://github.com/openshift/openshift-ansible/pull/6887

Comment 3 liujia 2018-03-05 04:49:45 UTC
Verified on openshift-ansible-3.7.36-1.git.0.0f4a93c.el7.noarch

Comment 7 errata-xmlrpc 2018-04-05 09:35:31 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:0636