Bug 1500631 - Etcd migrate failed for an undefined variable
Summary: Etcd migrate failed for an undefined variable
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Cluster Version Operator
Version: 3.6.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 3.7.0
Assignee: Jan Chaloupka
QA Contact: liujia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-11 08:45 UTC by liujia
Modified: 2017-11-28 22:16 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
Last Closed: 2017-11-28 22:16:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:3188 0 normal SHIPPED_LIVE Moderate: Red Hat OpenShift Container Platform 3.7 security, bug, and enhancement update 2017-11-29 02:34:54 UTC

Description liujia 2017-10-11 08:45:00 UTC
Description of problem:
Run migrate playbook to migrate etcd2 to etcd3 against an upgraded v3.6 cluster, etcd migration failed at task [openshift_master_facts : Set master facts].

fatal: [x.x.x.x]: FAILED! => {
    "failed": true
}

MSG:

The task includes an option with an undefined variable. The error was: {{ hostvars | oo_select_keys(groups['oo_etcd_to_config'] | union(groups['oo_new_etcd_to_config'])) | oo_collect('openshift.common.hostname') | default(none, true) }}: 'dict object' has no attribute 'oo_new_etcd_to_config'

The error appears to have been in '/usr/share/ansible/openshift-ansible/roles/openshift_master_facts/tasks/main.yml': line 31, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:
- name: Set master facts
  ^ here

exception type: <class 'ansible.errors.AnsibleUndefinedVariable'>
exception: {{ hostvars | oo_select_keys(groups['oo_etcd_to_config'] | union(groups['oo_new_etcd_to_config'])) | oo_collect('openshift.common.hostname') | default(none, true) }}: 'dict object' has no attribute 'oo_new_etcd_to_config'
        to retry, use: --limit @/usr/share/ansible/openshift-ansible/playbooks/byo/openshift-etcd/migrate.retry


Version-Release number of the following components:
atomic-openshift-utils-3.6.173.0.45-1.git.0.dc70c99.el7.noarch
ansible-2.4.0.0-4.el7.noarch

How reproducible:
always

Steps to Reproduce:
1. Upgrade ocp v3.5 to ocp v3.6
2. Do etcd migration
# ansible-playbook -i hosts /usr/share/ansible/openshift-ansible/playbooks/byo/openshift-etcd/migrate.yml -v
3.

Actual results:
Migration failed.

Expected results:
Migration succeed.

Additional info:
Hosts and log in attachment.

Comment 1 liujia 2017-10-11 08:46:03 UTC
Back to v3.6.173.0.21, it works well.

Comment 4 Jan Chaloupka 2017-10-12 14:21:31 UTC
Because we cannot scale-up after we migrate the first etcd member if the cluster is of size 1.

Comment 5 Jan Chaloupka 2017-10-12 15:38:09 UTC
Upstream PR: https://github.com/openshift/openshift-ansible/pull/5735

Comment 7 liujia 2017-10-17 06:00:09 UTC
Version:
atomic-openshift-utils-3.6.173.0.53-1.git.0.6c1b7a9.el7.noarch

Steps to Reproduce:
1. Upgrade ocp v3.5 to ocp v3.6
2. Do etcd migration
# ansible-playbook -i hosts /usr/share/ansible/openshift-ansible/playbooks/byo/openshift-etcd/migrate.yml -v
3.

Migration succeed.

Comment 8 Jan Chaloupka 2017-10-25 11:08:43 UTC
No docs needed, just a bug in the etcd data migration that has not been shipped to a customer yet.

Comment 11 errata-xmlrpc 2017-11-28 22:16:24 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


Note You need to log in before you can comment on or make changes to this bug.