Bug 880696 - rhevm-shell: Sending CTRL + C signal while password prompt appears causes to rhevm-cli to fall with traceback
Summary: rhevm-shell: Sending CTRL + C signal while password prompt appears causes to ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-cli
Version: 3.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.1.1
Assignee: Michael Pasternak
QA Contact: Ilia Meerovich
URL:
Whiteboard: infra
Depends On: 868647
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-27 15:51 UTC by Idith Tal-Kohen
Modified: 2016-02-10 19:29 UTC (History)
13 users (show)

Fixed In Version: rhevm-cli-3.1.1.1-1
Doc Type: Bug Fix
Doc Text:
Previously using the 'Ctrl+C' key combination during the password prompt would cause the rhevm-cli to fall with traceback. Now, the KeyboardInterruption exception has been removed and the 'Ctrl+C' key combination does not upset the rhevm-cli.
Clone Of: 868647
Environment:
Last Closed: 2013-01-15 15:04:08 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0161 0 normal SHIPPED_LIVE rhevm-cli bug fix update 2013-01-15 20:01:08 UTC

Description Idith Tal-Kohen 2012-11-27 15:51:57 UTC
+++ This bug was initially created as a clone of Bug #868647 +++

Description of problem:
Sending CTRL + C signal while password prompt appears causes to rhevm-cli to fall with traceback

Version-Release number of selected component (if applicable):
rhevm-cli-3.1.0.17-1.el6ev.noarch


How reproducible:
Deterministic

Steps to Reproduce:
1.try to connect: for example: "rhevm-shell  -c -l moo -u boo"
2.when password: prompt appears press CTRL+C

  
Actual results:
[imeerovi@imeerovi ART]$ rhevm-shell  -c -l moo -u boo
Password: Traceback (most recent call last):
  File "/usr/bin/rhevm-shell", line 9, in <module>
    load_entry_point('rhevm-shell==3.1.0.17-SNAPSHOT', 'console_scripts', 'rhevm-shell')()
  File "/usr/lib/python2.6/site-packages/ovirtcli/main.py", line 27, in main
    context = OvirtCliExecutionContext(sys.argv, parser)
  File "/usr/lib/python2.6/site-packages/ovirtcli/context.py", line 45, in __init__
    super(OvirtCliExecutionContext, self).__init__(args=args, option_parser=option_parser)
  File "/usr/lib/python2.6/site-packages/cli/context.py", line 70, in __init__
    self._load_settings()
  File "/usr/lib/python2.6/site-packages/cli/context.py", line 126, in _load_settings
    self.__collect_connection_data()
  File "/usr/lib/python2.6/site-packages/cli/context.py", line 95, in __collect_connection_data
    self.settings['ovirt-shell:password'] = getpass.getpass()
  File "/usr/lib64/python2.6/getpass.py", line 71, in unix_getpass
    passwd = _raw_input(prompt, stream, input=input)
  File "/usr/lib64/python2.6/getpass.py", line 133, in _raw_input
    line = input.readline()
KeyboardInterrupt


Expected results:
controlled cli exit or some other controlled behaviou (by design)

Additional info:

--- Additional comment from Yaniv Kaul on 2012-10-23 08:57:36 EDT ---

*** Bug 869269 has been marked as a duplicate of this bug. ***

--- Additional comment from David Jaša on 2012-10-23 09:05:54 EDT ---

The ctrl-c should be trapped and handled in all situations, as described in the duplicate.

--- Additional comment from Michael Pasternak on 2012-11-15 05:38:22 EST ---

(In reply to comment #2)
> The ctrl-c should be trapped and handled in all situations, as described in
> the duplicate.

it is handled, just getpass library of my control.

--- Additional comment from Michael Pasternak on 2012-11-15 05:38:46 EST ---

i've failed reproducing KeyboardInterrupt in ctrl+c, but added handling
to this use-case anyway.

4af73c9f47bacb0d6bbf37c169dc238eab6cc816

--- Additional comment from Michael Pasternak on 2012-11-15 05:46:30 EST ---

(In reply to comment #2)
> The ctrl-c should be trapped and handled in all situations, as described in
> the duplicate.

btw, this is not dup., but CLOSED-NOT_A_BUG

--- Additional comment from Ilia Meerovich on 2012-11-25 07:04:41 EST ---

Which build will contain this bugfix?

--- Additional comment from Michael Pasternak on 2012-11-25 07:11:52 EST ---

(In reply to comment #6)
> Which build will contain this bugfix?

the 3.1.1 release

Comment 2 Oded Ramraz 2012-12-19 18:51:18 UTC
[root@aqua-rhel yum.repos.d]# rpm -q rhevm-cli
rhevm-cli-3.1.1.1-1.el6ev.noarch
[root@aqua-rhel yum.repos.d]# rhevm-shell -c -l "https://10.35.113.33:443/api" -u admin@internal  --insecure
Password: 
[root@aqua-rhel yum.repos.d]#

Moving to verified , there is no exception anymore .

Comment 4 errata-xmlrpc 2013-01-15 15:04:08 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-0161.html


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