Bug 1421033

Summary: Fail to upgrade ocp with quick installer due to wrong variant version
Product: OpenShift Container Platform Reporter: liujia <jiajliu>
Component: Cluster Version OperatorAssignee: Steve Milner <smilner>
Status: CLOSED ERRATA QA Contact: Anping Li <anli>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.5.0CC: aos-bugs, jokerman, mmccomas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: openshift-ansible-3.5.8-1.git.0.0e02ef8.el7 Doc Type: Bug Fix
Doc Text:
Cause: 3.5 was not added as an update variant version. Consequence: An upgrade from 3.4 to 3.5 with the quick installer would throw a traceback. Fix: Add 3.5 to the update variant list and move 3.4 to legacy. Result: The quick installer upgrade works.
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-12 19:01:48 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:

Description liujia 2017-02-10 07:34:59 UTC
Description of problem:
Upgrade ocp3.4 to ocp3.5 with quick installer tool, after confirm for the printed host info, quick upgrade can not proceed to run upgrade playbook due to variant version wrong.

Do you want to proceed? [y/N]: y
Traceback (most recent call last):
  File "/usr/bin/atomic-openshift-installer", line 9, in <module>
    load_entry_point('ooinstall==3.0.0', 'console_scripts', 'oo-install')()
  File "/usr/lib/python2.7/site-packages/click/core.py", line 664, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 644, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 991, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python2.7/site-packages/click/core.py", line 837, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 464, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/ooinstall/cli_installer.py", line 1039, in upgrade
  File "/usr/lib/python2.7/site-packages/ooinstall/openshift_ansible.py", line 331, in run_upgrade_playbook
    inventory_file = generate_inventory(hosts)
  File "/usr/lib/python2.7/site-packages/ooinstall/openshift_ansible.py", line 63, in generate_inventory
    write_inventory_vars(base_inventory, lb)
  File "/usr/lib/python2.7/site-packages/ooinstall/openshift_ansible.py", line 140, in write_inventory_vars
AttributeError: 'NoneType' object has no attribute 'ansible_key'

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.Prepare installer.cfy.yml for existed ocp3.4 env.
2.Trigger upgrade with quick installer tool
# atomic-openshift-installer -c /tmp/installer.cfg.yml upgrade

Actual results:
Can not proceed to run upgrade playbook.

Expected results:
Upgrade seccessfully with quick installer tool.

Additional info:

Comment 3 Steve Milner 2017-02-14 22:11:12 UTC
PR: https://github.com/openshift/openshift-ansible/pull/3362

Comment 4 liujia 2017-02-15 09:45:01 UTC

1.Prepare installer.cfy.yml for existed ocp3.4 env.
2.Trigger upgrade with quick installer tool
# atomic-openshift-installer -c /tmp/installer.cfg.yml upgrade

Upgrade failed but it can proceed to run upgrade playbook after confirm for the printed host info. As for upgrade failed issue, refer to another bug 1422348,for this bug, change status to verify.

Comment 6 errata-xmlrpc 2017-04-12 19:01:48 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.