Bug 1324088 - should provide meaningful information rather than throw exception
Summary: should provide meaningful information rather than throw exception
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Cluster Version Operator
Version: 3.2.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: ---
Assignee: Samuel Munilla
QA Contact: Anping Li
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-05 13:41 UTC by Anping Li
Modified: 2016-09-06 18:14 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Upgrade workflow attempted to "smartly" choose the next version. Consequence: If users tried to upgrade from the latest version the above would fail. Fix: Now, a mapping of valid upgrade paths is maintained. Result: Upgrade workflow no longer errors out for unusual cases.
Clone Of:
Environment:
Last Closed: 2016-09-06 18:14:27 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Anping Li 2016-04-05 13:41:46 UTC
Description of problem:
If the target playbook can't be found, it is better to provide a meaningful messages rather than throw exception

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

How reproducible:
always

Steps to Reproduce:
1. specify  variant_version: '3.2' or variant_version to unsupported values
2. try to upgrade to the latest version

Actual results:
atomic-openshift-installer -c config/hostmini.yaml upgrade

        This tool will help you upgrade your existing OpenShift installation.

Version 3.2 found. Do you want to update to the latest version of 3.2 or migrate to the next major release?
(1) Update to latest 3.2 (2) Migrate to next release: 1
Traceback (most recent call last):
  File "/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 839, in upgrade
    playbook = mapping['minor_playbook']
TypeError: 'NoneType' object has no attribute '__getitem__'

Expected Result:
it is better to display human language like 'upgrade from openshift-enterprise 3.2 to latest is unsupported' rather than throw exception.

Additional info:

Comment 1 Scott Dodson 2016-06-21 15:16:33 UTC
This should no longer be happening in the latest code.

Comment 2 Anping Li 2016-06-22 01:44:39 UTC
The result is fine as following.
[root@ha1master ha1]# atomic-openshift-installer -c config/hostmini.yaml upgrade
No hosts defined in: config/hostmini.yaml


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