Bug 1319505
| Summary: | 'dr', 'vr' and 'sr' options don't contain the check for the empty list of repos | ||
|---|---|---|---|
| Product: | Red Hat Update Infrastructure for Cloud Providers | Reporter: | Irina Gulina <igulina> |
| Component: | Tools | Assignee: | RHUI Bug List <rhui-bugs> |
| Status: | CLOSED ERRATA | QA Contact: | Irina Gulina <igulina> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 2.1.3 | CC: | bizhang, cduryee, pcreech |
| Target Milestone: | --- | ||
| Target Release: | 3.0.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-03-01 22:11:46 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: | |||
on RHUI3:
>> rpm -qa *rhui*
rhui-installer-base-0.0.24-1.el7ui.noarch
rh-rhui-tools-libs-pre.3.0.16-1.el7ui.noarch
rhui-installer-0.0.24-1.el7ui.noarch
rh-rhui-tools-pre.3.0.16-1.el7ui.noarch
rhui-default-ca-1.0-1.noarch
rh-amazon-rhui-client-2.2.118-1.el7.noarch
rh-amazon-rhui-client-rhs30-2.2.124-1.el7.noarch
RHUI iso 20151013
rhui (sync) => vr
Select a repository:
Enter value (1-0) or 'b' to abort:
Enter value (1-0) or 'b' to abort: 1
Enter value (1-0) or 'b' to abort: 0
An unexpected error has occurred during the last operation.
More information can be found in /root/.rhui/rhui.log.
2016-04-04 11:33:32,652 - <type 'exceptions.IndexError'>
2016-04-04 11:33:32,652 - Unexpected error caught at the shell level
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/rhui/tools/shell.py", line 88, in safe_listen
self.listen(clear=first_run)
File "/usr/lib/python2.7/site-packages/rhui/tools/shell.py", line 122, in listen
Shell.listen(self)
File "/usr/lib/python2.7/site-packages/rhui/common/shell.py", line 186, in listen
item.func(*args, **item.kwargs)
File "/usr/lib/python2.7/site-packages/rhui/tools/screens/sync.py", line 106, in repo_details
repo_id = repos[index]['id']
IndexError: list index out of range
sr
Select one or more repositories to schedule to be synchronized before its scheduled time.
The sync will happen as soon as possible depending on other tasks that may be executing
in the RHUI. Only repositories that are not currently synchronizing are displayed.
Last Result Next Sync Repository
------------------------------------------
Enter value (1-0) to toggle selection, 'c' to confirm selections, or '?' for more commands: 1
Select one or more repositories to schedule to be synchronized before its scheduled time.
The sync will happen as soon as possible depending on other tasks that may be executing
in the RHUI. Only repositories that are not currently synchronizing are displayed.
Last Result Next Sync Repository
------------------------------------------
Enter value (1-0) to toggle selection, 'c' to confirm selections, or '?' for more commands: c
The following repositories will be scheduled for synchronization:
Proceed? (y/n) y
------------------------------------------------------------------------------
rhui (sync) => sr
Select one or more repositories to schedule to be synchronized before its scheduled time.
The sync will happen as soon as possible depending on other tasks that may be executing
in the RHUI. Only repositories that are not currently synchronizing are displayed.
Last Result Next Sync Repository
------------------------------------------
Enter value (1-0) to toggle selection, 'c' to confirm selections, or '?' for more commands: 0
Select one or more repositories to schedule to be synchronized before its scheduled time.
The sync will happen as soon as possible depending on other tasks that may be executing
in the RHUI. Only repositories that are not currently synchronizing are displayed.
Last Result Next Sync Repository
------------------------------------------
Enter value (1-0) to toggle selection, 'c' to confirm selections, or '?' for more commands: c
An unexpected error has occurred during the last operation.
More information can be found in /root/.rhui/rhui.log.
2016-04-04 11:42:06,019 - <type 'exceptions.IndexError'>
2016-04-04 11:42:06,020 - Unexpected error caught at the shell level
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/rhui/tools/shell.py", line 88, in safe_listen
self.listen(clear=first_run)
File "/usr/lib/python2.7/site-packages/rhui/tools/shell.py", line 122, in listen
Shell.listen(self)
File "/usr/lib/python2.7/site-packages/rhui/common/shell.py", line 186, in listen
item.func(*args, **item.kwargs)
File "/usr/lib/python2.7/site-packages/rhui/tools/screens/sync.py", line 176, in repo_sync
selected_repos = [repos[index] for index in selected_repo_indices]
IndexError: list index out of range
Fixed functionality with 'sr' and 'vr' The functionality 'dr' is correct in displaying a report with nothing in it if there is nothing to report. RHEL6 and 7 ISO's 20161025
Connected: rhua.example.com
------------------------------------------------------------------------------
rhui (sync) => vr
There are no synced repository records.
------------------------------------------------------------------------------
rhui (sync) => sr
There are no repositories available to be synced.
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/RHBA-2017:0367 |
Description of problem: dr display repo sync summary vr view the details of the last repository sync sr sync an individual repository immediately options don't check whether the list of repos is empty. And the user is offered to choose the repo from the empty list! Version-Release number of selected component (if applicable): RHEL-6.5-RHUI-2.1.3.1-20140912.1-Server-x86_64-DVD1.iso >> rpm -qa "*rhui-tools*" rh-rhui-tools-debug-script-2.1.39-1.el6_5.noarch rh-rhui-tools-2.1.37-2.el6.noarch How reproducible: always Steps to Reproduce: -= Red Hat Update Infrastructure Management Tool =- -= Synchronization Status =- dr display repo sync summary vr view the details of the last repository sync sr sync an individual repository immediately dc display CDS sync summary vc view the details of the last CDS sync sc sync an individual CDS immediately sl sync a CDS cluster immediately 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: XXX ------------------------------------------------------------------------------ rhui (sync) => vr Select a repository: Enter value (1-0) or 'b' to abort: Enter value (1-0) or 'b' to abort: Enter value (1-0) or 'b' to abort: b ------------------------------------------------------------------------------ rhui (sync) => sr Select one or more repositories to schedule to be synchronized before its scheduled time. The sync will happen as soon as possible depending on other tasks that may be executing in the RHUI. Only repositories that are not currently synchronizing are displayed. Last Result Next Sync Repository ------------------------------------------ Enter value (1-0) to toggle selection, 'c' to confirm selections, or '?' for more commands: 1 Select one or more repositories to schedule to be synchronized before its scheduled time. The sync will happen as soon as possible depending on other tasks that may be executing in the RHUI. Only repositories that are not currently synchronizing are displayed. Last Result Next Sync Repository ------------------------------------------ Enter value (1-0) to toggle selection, 'c' to confirm selections, or '?' for more commands: c The following repositories will be scheduled for synchronization: Proceed? (y/n) y ------------------------------------------------------------------------------ rhui (sync) => dr -= Repository Synchronization Status =- Last Refreshed: 14:12:39 (updated every 5 seconds, ctrl+c to exit) Next Sync Last Sync Last Result ------------------------------------------------------------------------------ Connected: XXX ------------------------------------------------------------------------------ ^Crhui (sync) => Actual results: The user is allowed to select a repository from the empty list! Expected results: A message: No repositories to schedule