Bug 707283 - Repository Management: aborting while adding repo 'by repositories' throws error
Summary: Repository Management: aborting while adding repo 'by repositories' throws error
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Update Infrastructure for Cloud Providers
Classification: Red Hat
Component: Tools
Version: 2.0
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
: ---
Assignee: Jay Dobies
QA Contact: wes hayutin
URL:
Whiteboard:
Depends On:
Blocks: rhui-20
TreeView+ depends on / blocked
 
Reported: 2011-05-24 15:16 UTC by Kedar Bidarkar
Modified: 2012-05-31 12:54 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-05-31 12:54:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Kedar Bidarkar 2011-05-24 15:16:37 UTC
Description of problem:
------------------------------------------------------------------------------
rhui (home) => r








------------------------------------------------------------------------------
             -= Red Hat Update Infrastructure Management Tool =-


-= Repository Management =-

   l   list repositories currently managed by the RHUI
   i   display detailed information on a repository
   a   add a new Red Hat content repository
   c   create a new custom repository
   d   delete a repository from the RHUI
   u   upload content to a custom repository
   p   list packages in a repository

                                         Connected: pulp-server.pnq.redhat.com
------------------------------------------------------------------------------
rhui (repo) => a

Loading latest entitled products from Red Hat...
... listings loaded
Determining undeployed products...
... product list calculated

Import Repositories:
  1  - All in Certificate
  2  - By Product
  3  - By Repository
Enter value from (1-3) or 'b' to abort: 3

Select the product repositories to be deployed to the RHUI (only undeployed
products are displayed):
  Red Hat Enterprise Linux Server (SRPMS)
    -  1 : Red Hat Enterprise Linux Server (SRPMS) (5Server-x86_64)
    -  2 : Red Hat Enterprise Linux Server (SRPMS) (5Server-i386)

  Red Hat Enterprise Linux Server 6 Releases (SRPMS)
    -  3 : Red Hat Enterprise Linux Server 6 Releases (SRPMS) (6Server-x86_64)
    -  4 : Red Hat Enterprise Linux Server 6 Releases (SRPMS) (6Server-i386)

  Red Hat Enterprise Linux Server 6 Updates (RPMs)
    -  5 : Red Hat Enterprise Linux Server 6 Updates (RPMs) (6Server-x86_64)
    -  6 : Red Hat Enterprise Linux Server 6 Updates (RPMs) (6Server-i386)

  Red Hat Enterprise Linux Server 6 Updates (SRPMS)
    -  7 : Red Hat Enterprise Linux Server 6 Updates (SRPMS) (6Server-i386)
    -  8 : Red Hat Enterprise Linux Server 6 Updates (SRPMS) (6Server-x86_64)

  Red Hat Enterprise Linux Server 6 Releases (RPMs)
    -  9 : Red Hat Enterprise Linux Server 6 Releases (RPMs) (6Server-i386)

  Red Hat Enterprise Linux Server (RPMs)
    -  10: Red Hat Enterprise Linux Server (RPMs) (5Server-i386)

  Red Hat Enterprise Linux Server 6 Optional Releases (RPMs)
    -  11: Red Hat Enterprise Linux Server 6 Optional Releases (RPMs) (6Server-i386)
    -  12: Red Hat Enterprise Linux Server 6 Optional Releases (RPMs) (6Server-x86_64)

  Red Hat Update Infrastructure 1.2 (SRPMS)
    -  13: Red Hat Update Infrastructure 1.2 (SRPMS) (5Server-i386)

Enter value from (1-13) to toggle selection, 'c' to confirm selections, or '?' for more commands: b


The following product repositories will be deployed:

An unexpected error has occurred during the last operation.
More information can be found in /root/.rhui/rhui.log.


------------------------------------------------------------------------------
             -= Red Hat Update Infrastructure Management Tool =-


-= Repository Management =-

   l   list repositories currently managed by the RHUI
   i   display detailed information on a repository
   a   add a new Red Hat content repository
   c   create a new custom repository
   d   delete a repository from the RHUI
   u   upload content to a custom repository
   p   list packages in a repository

   logout
       removes stored authentication credentials and exits

   <   move to the previous screen
   ^, home
       move to the home screen
   /, clear
       clears the screen
   ?, help
       display help
   q, quit, exit
       exit

                                         Connected: pulp-server.pnq.redhat.com
------------------------------------------------------------------------------

Connecting to RHUA [pulp-server.pnq.redhat.com]...
Successfully connected to [pulp-server.pnq.redhat.com]
Unexpected error caught at the shell level
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/rhui/tools/shell.py", line 73, in safe_listen
    self.listen(clear=first_run)
  File "/usr/lib/python2.6/site-packages/rhui/tools/shell.py", line 92, in listen
    Shell.listen(self)
  File "/usr/lib/python2.6/site-packages/rhui/common/shell.py", line 191, in listen
    item.func(*args, **item.kwargs)
  File "/usr/lib/python2.6/site-packages/rhui/tools/screens/repo.py", line 145, in add
    create_performed = mode_handlers[mode](repos, products)
  File "/usr/lib/python2.6/site-packages/rhui/tools/screens/repo.py", line 254, in _add_by_repo
    for product_name in selected_indices_by_product:
TypeError: 'object' object is not iterable


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

[root@pulp-server ~]# rpm -qav | grep -i rhui-tools
rh-rhui-tools-2.0.22-1.el6.noarch
[root@pulp-server ~]# rpm -qav | grep -i pulp
pulp-0.0.171-1.el6.noarch
pulp-common-0.0.171-1.el6.noarch
pulp-client-0.0.171-1.el6.noarch


How reproducible:

by aborting 'by repository' selection option.

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:
Should handle this scenario properly.

Additional info:

Comment 1 wes hayutin 2011-06-06 21:15:46 UTC
added to rhui-20 tracker

Comment 2 Jay Dobies 2011-06-16 14:32:38 UTC
commit 8a5072c5f03f9c70d27b9a537c513d056a27ed81
Author: Jay Dobies <jason.dobies>
Date:   Thu Jun 16 10:31:16 2011 -0400

    707283 - Properly catch abort during add by repo selection

rhui-2.0/tools/src/rhui/tools/screens/repo.py

Comment 3 Jay Dobies 2011-06-21 20:58:41 UTC
Fixed in RHUI 2.0.31.

Comment 4 Kedar Bidarkar 2011-06-27 13:46:46 UTC
------------------------------------------------------------------------------
             -= Red Hat Update Infrastructure Management Tool =-


-= Repository Management =-

   l   list repositories currently managed by the RHUI
   i   display detailed information on a repository
   a   add a new Red Hat content repository
   c   create a new custom repository
   d   delete a repository from the RHUI
   u   upload content to a custom repository
   p   list packages in a repository

                         Connected: ip-10-170-226-4.us-west-1.compute.internal
------------------------------------------------------------------------------
rhui (repo) => a

Loading latest entitled products from Red Hat...
... listings loaded
Determining undeployed products...
... product list calculated

Import Repositories:
  1  - All in Certificate
  2  - By Product
  3  - By Repository
Enter value (1-3) or 'b' to abort: 3

Select the product repositories to be deployed to the RHUI (only undeployed
products are displayed):
  Red Hat Enterprise Linux Server 6 Updates (RPMs)
    -  1 : Red Hat Enterprise Linux Server 6 Updates (RPMs) (6Server-x86_64)
    -  2 : Red Hat Enterprise Linux Server 6 Updates (RPMs) (6Server-i386)

  Red Hat Enterprise Linux Server (RPMs)
    -  3 : Red Hat Enterprise Linux Server (RPMs) (5Server-i386)
    -  4 : Red Hat Enterprise Linux Server (RPMs) (5Server-x86_64)

  Red Hat Enterprise Linux Server 6 Releases (RPMs)
    -  5 : Red Hat Enterprise Linux Server 6 Releases (RPMs) (6Server-x86_64)
    -  6 : Red Hat Enterprise Linux Server 6 Releases (RPMs) (6Server-i386)

  Red Hat Update Infrastructure 1.2 (RPMs)
    -  7 : Red Hat Update Infrastructure 1.2 (RPMs) (5Server-x86_64)
    -  8 : Red Hat Update Infrastructure 1.2 (RPMs) (5Server-i386)

  Red Hat Update Infrastructure 1.1 (RPMs)
    -  9 : Red Hat Update Infrastructure 1.1 (RPMs) (5Server-i386)
    -  10: Red Hat Update Infrastructure 1.1 (RPMs) (5Server-x86_64)

Enter value (1-10) to toggle selection, 'c' to confirm selections, or '?' for more commands: b



------------------------------------------------------------------------------

Comment 5 wes hayutin 2011-08-01 21:39:43 UTC
moving to release pending

Comment 6 wes hayutin 2012-05-31 12:54:55 UTC
closing out, product released


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