Hide Forgot
Description of problem: When one deletes repositories and is prompted to toggle selection (e.g. 'Enter value (1-2) to toggle selection'), and if s/he enters '0', the last repo will be marked to be deleted. However, if to enter '3' or any other number out of the range, nothing will happen. Version-Release number of selected component (if applicable): >> rpm -qa '*rhui*' rh-amazon-rhui-client-rhs30-2.2.124-1.el7.noarch 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 RHUI ISO 20151013 How reproducible: always How reproducible: >> rhui (home) => r >> rhui (repo) => l Steps to Reproduce: Custom Repositories custom-i386-i386 custom-i386-x86_64 custom-x86_64-x86_64 ------------------------------------------------------------------------------ >> rhui (repo) => d Select one or more repositories: Custom Repositories - 1 : custom-i386-i386 - 2 : custom-i386-x86_64 - 3 : custom-x86_64-x86_64 Red Hat Repositories >> Enter value (1-3) to toggle selection, 'c' to confirm selections, or '?' for more commands: 0 Select one or more repositories: Custom Repositories - 1 : custom-i386-i386 - 2 : custom-i386-x86_64 x 3 : custom-x86_64-x86_64 Red Hat Repositories >> Enter value (1-3) to toggle selection, 'c' to confirm selections, or '?' for more commands: c The following repositories will be deleted: Custom Repositories custom-x86_64-x86_64 >> Proceed? (y/n) y Delete custom-x86_64-x86_64 task has been queued up...repo will be deleted at the next available time slot Actual results: The repo will be deleted Expected results: No action when '0' is entered, like for any other nonexisitng repo number/value: >> rhui (repo) => d Select one or more repositories: Custom Repositories - 1 : custom-i386-i386 - 2 : custom-i386-x86_64 Red Hat Repositories >> Enter value (1-2) to toggle selection, 'c' to confirm selections, or '?' for more commands: 3 Select one or more repositories: Custom Repositories - 1 : custom-i386-i386 - 2 : custom-i386-x86_64 Red Hat Repositories Enter value (1-2) to toggle selection, 'c' to confirm selections, or '?' for more commands:
Please note, if to write '0' before index, it also will change the selection: >> Enter value (1-2) to toggle selection, 'c' to confirm selections, or '?' for more commands: 01 Select one or more repositories: Custom Repositories x 1 : custom-i386-i386 - 2 : custom-i386-x86_64 Red Hat Repositories >> Enter value (1-2) to toggle selection, 'c' to confirm selections, or '?' for more commands: 02 Select one or more repositories: Custom Repositories x 1 : custom-i386-i386 x 2 : custom-i386-x86_64 Red Hat Repositories >> Enter value (1-2) to toggle selection, 'c' to confirm selections, or '?' for more commands: 01-02 Select one or more repositories: Custom Repositories - 1 : custom-i386-i386 - 2 : custom-i386-x86_64 Try many zeroes: Select one or more repositories: Custom Repositories - 1 : custom-i386-i386 x 2 : custom-i386-x86_64 Red Hat Repositories >> Enter value (1-2) to toggle selection, 'c' to confirm selections, or '?' for more commands: 000000002 Select one or more repositories: Custom Repositories - 1 : custom-i386-i386 - 2 : custom-i386-x86_64 Red Hat Repositories Enter value (1-2) to toggle selection, 'c' to confirm selections, or '?' for more commands:
'0' also toggles selection for displaying detailed information on a repository ------------------------------------------------------------------------------ rhui (repo) => i Select one or more repositories: Custom Repositories - 1 : custom-i386-i386 - 2 : custom-i386-x86_64 - 3 : custom-x86_64-x86_64 Red Hat Repositories Enter value (1-3) to toggle selection, 'c' to confirm selections, or '?' for more commands: 0 Select one or more repositories: Custom Repositories - 1 : custom-i386-i386 - 2 : custom-i386-x86_64 x 3 : custom-x86_64-x86_64 Red Hat Repositories Enter value (1-3) to toggle selection, 'c' to confirm selections, or '?' for more commands: c Name: custom-x86_64-x86_64 Type: Custom Relative Path: custom/x86_64/x86_64 GPG Check: Yes Custom GPG Keys: (None) Red Hat GPG Key: Yes Package Count: 0 ------------------------------------------------------------------------------ rhui (repo) =>
It seems 0 always toggles an item with a maximum value, e.g. on adding a RH repo: rhui (repo) => a 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: 0 Select the product repositories to be deployed to the RHUI (only undeployed products are displayed): Red Hat Enterprise Linux 5 Update Infrastructure MRG 2.0 (SRPMS) - 1 : Red Hat Enterprise Linux 5 Update Infrastructure MRG 2.0 (SRPMS) (5Server-x86_64) (Yum) - 2 : Red Hat Enterprise Linux 5 Update Infrastructure MRG 2.0 (SRPMS) (5Server-i386) (Yum) Red Hat Storage 2 VSA Beta (RPMs) from RHUI - 3 : Red Hat Storage 2 VSA Beta (RPMs) from RHUI (x86_64) (Yum) RHEL RHUI Server 7 Rh-common OS - 4 : RHEL RHUI Server 7 Rh-common OS (7Server-x86_64) (Yum) RHEL RHUI Server 6 Rhscl 1 Debug - 5 : RHEL RHUI Server 6 Rhscl 1 Debug (6Server-i386) (Yum) - 6 : RHEL RHUI Server 6 Rhscl 1 Debug (6Server-x86_64) (Yum) I expect nothing to happen when 0 is entered.
There's in fact one more case where 0 was handled incorrectly. Scenario: 1 - add a load balancer or a CDS (if you don't have either) 2 - enter d on the load balancer or CDS management screen 3 - enter 0 4 - enter 1 5 - enter c -> unexpected error, details in rhui.log: File "/usr/lib/python2.7/site-packages/rhui/tools/screens/instances.py", line 297, in unregister unregistered_instances.append(instance_config.pop(selection)) The modified code fixes this too.
Oops, the last line of the traceback was left behind in the previous comment: IndexError: pop from empty list.
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/RHEA-2019:2757