Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1500631 - Etcd migrate failed for an undefined variable
Etcd migrate failed for an undefined variable
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Upgrade (Show other bugs)
3.6.1
Unspecified Unspecified
medium Severity medium
: ---
: 3.7.0
Assigned To: Jan Chaloupka
liujia
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-10-11 04:45 EDT by liujia
Modified: 2017-11-28 17:16 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-11-28 17:16:24 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:3188 normal SHIPPED_LIVE Moderate: Red Hat OpenShift Container Platform 3.7 security, bug, and enhancement update 2017-11-28 21:34:54 EST

  None (edit)
Description liujia 2017-10-11 04:45:00 EDT
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 04:46:03 EDT
Back to v3.6.173.0.21, it works well.
Comment 4 Jan Chaloupka 2017-10-12 10:21:31 EDT
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 11:38:09 EDT
Upstream PR: https://github.com/openshift/openshift-ansible/pull/5735
Comment 7 liujia 2017-10-17 02:00:09 EDT
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 07:08:43 EDT
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 17:16:24 EST
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.