Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 908639

Summary: 'Unexpected error' while adding CDS
Product: Red Hat Update Infrastructure for Cloud Providers Reporter: Vitaly Kuznetsov <vkuznets>
Component: ToolsAssignee: James Slagle <jslagle>
Status: CLOSED ERRATA QA Contact: mkovacik
Severity: high Docs Contact:
Priority: unspecified    
Version: 2.1.1CC: juwu, tsanders, whayutin
Target Milestone: ---   
Target Release: 2.1.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
When adding a new CDS and select abort, an error message returned. This fix updates cds.py so when abort action is performed, the shell interaction will end and return to the previous screen.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-27 17:03:30 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:
Attachments:
Description Flags
Proposed patch to handle abort properly none

Description Vitaly Kuznetsov 2013-02-07 08:39:01 UTC
Description of problem:
Doing 'Abort' action in Cluster selection while adding CDS leads to the following error:
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/rhui/tools/shell.py", line 86, in safe_listen
    self.listen(clear=first_run)
  File "/usr/lib/python2.6/site-packages/rhui/tools/shell.py", line 112, in listen
    Shell.listen(self)
  File "/usr/lib/python2.6/site-packages/rhui/common/shell.py", line 186, in listen
    item.func(*args, **item.kwargs)
  File "/usr/lib/python2.6/site-packages/rhui/tools/screens/cds.py", line 206, in register
    cluster_name = menu_values[selection]
TypeError: list indices must be integers, not object

Version-Release number of selected component (if applicable):
# rpm -q rh-rhui-tools
rh-rhui-tools-2.1.15-1.el6_3.noarch

How reproducible:
100%

Steps to Reproduce:
1. Create RHUI setup, add 1 CDS
2. Try to add second CDS, in 'Select a CDS cluster or enter a new one:' type 'b'

Actual results:
Got 'An unexpected error has occurred during the last operation. More information can be found in /root/.rhui/rhui.log.' error message and traceback mentioned above in this logfile.

Expected results:
Return to CDS menu

Comment 1 Vitaly Kuznetsov 2013-02-11 15:05:47 UTC
Created attachment 696138 [details]
Proposed patch to handle abort properly

Comment 2 James Slagle 2013-02-13 19:11:11 UTC
Thanks for the patch, but it wasn't quite correct.  We need to check for an abort, and if there was one, end the shell interaction and return.

cloude commit e66f497bb7c710f4ad6b8623817a045f2b1cdac2

Comment 3 Vitaly Kuznetsov 2013-02-18 12:07:12 UTC
Verified in # rpm -q rh-rhui-tools
rh-rhui-tools-2.1.17-1.el6_3.noarch

rhui (cds) => a

Prior to registering a CDS, the CDS must be configured and running.

Hostname of the CDS to register:
cds2.example.com

Client hostname (hostname clients will use to connect to the CDS) [cds2.example.com]:


Display name for the CDS [cds2.example.com]:


Select a CDS cluster or enter a new one:
  1  - *** Create a new cluster ***
  2  - Cl1
Enter value (1-2) or 'b' to abort: b

------------------------------------------------------------------------------
rhui (cds) =>

Comment 6 errata-xmlrpc 2013-02-27 17:03:30 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.

http://rhn.redhat.com/errata/RHBA-2013-0571.html