Bug 869269 - [RHEVM-SHELL] make ctrl-c breaking the command rather than existing shell
Summary: [RHEVM-SHELL] make ctrl-c breaking the command rather than existing shell
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-cli
Version: 3.4.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 3.3.0
Assignee: Juan Hernández
QA Contact: Ilia Meerovich
URL:
Whiteboard: infra
Depends On:
Blocks: 902971
TreeView+ depends on / blocked
 
Reported: 2012-10-23 12:52 UTC by David Jaša
Modified: 2016-07-05 00:07 UTC (History)
11 users (show)

Fixed In Version: is18
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-14 07:30:02 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 19893 0 None None None Never

Description David Jaša 2012-10-23 12:52:24 UTC
Description of problem:
trap sigint / ctrl-c. Ctrl-C is a fast way to clear whole command in shells or to end prematurely long-duration commands. Ctrl-C in ovirt-shell should behave the same

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

How reproducible:
always

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


Expected results:


Additional info:

Comment 1 Yaniv Kaul 2012-10-23 12:57:36 UTC

*** This bug has been marked as a duplicate of bug 868647 ***

Comment 2 Michael Pasternak 2012-10-23 13:36:24 UTC
rhevm-shell traps sigint, can you tell me where do you see KeyboardInterapt
(besides getpass that don't treat it) ?

Comment 3 David Jaša 2012-10-23 13:38:12 UTC
Just after start with no parameters (when typing the first command). Or actually, when typing any command.

Comment 4 Michael Pasternak 2012-10-23 13:41:26 UTC
sigint treated here "exiting shell", not being trapped means KeyboardInterapt
exception thrown, can you see it thrown?

Comment 5 David Jaša 2012-10-23 14:20:28 UTC
No, I can't see no exception even with --debug, I'm just dropped to the bash:

[djasa@dhcp-29-7 ~]$ rhevm-shell --debug



error: missing configuration variable: url



        
 ++++++++++++++++++++++++++++++++++++++++++
 
           Welcome to RHEVM shell
 
 ++++++++++++++++++++++++++++++++++++++++++
        
    
[RHEVM shell (disconnected)]#           // ctrl-c pressed here
[djasa@dhcp-29-7 ~]$

Comment 6 Michael Pasternak 2012-10-23 14:27:17 UTC
(In reply to comment #5)
> No, I can't see no exception even with --debug, I'm just dropped to the bash:
> 
> [djasa@dhcp-29-7 ~]$ rhevm-shell --debug
> 
> 
> 
> error: missing configuration variable: url
> 
> 
> 
>         
>  ++++++++++++++++++++++++++++++++++++++++++
>  
>            Welcome to RHEVM shell
>  
>  ++++++++++++++++++++++++++++++++++++++++++
>         
>     
> [RHEVM shell (disconnected)]#           // ctrl-c pressed here
> [djasa@dhcp-29-7 ~]$

and as you can see /sigint treated here exiting the shell (what is by design),
if it wasn't treated, you would see  KeyboardInterrupt exception being thrown
as in Bug 868647 (which was suppose to be treated by used python module btw and
not by our shell)

Comment 7 David Jaša 2012-10-23 15:29:19 UTC
I actually wanted r-s not to exit when ctrl-c is pressed (when intended usage of ctrl-c is to just wipe command line) but virsh and nslookup exit as well when Ctrl-C is pressed so I'm closing this bug as NOTABUG.

Comment 8 Marina Kalinin 2013-10-03 20:46:47 UTC
I would like to reopen this bug.
This is really annoying. Maybe virsh and nslookup having similar behaviour. But most of standard shells behave differently and do not quit the whole shell, but wipe the command line.

It requires relogin after it. And very inconvenient from the user perspective.
I had to relogin 10 times during one hour working with the tool today.

Please provide more reasonable explanation why not to use the standard behaviour.

Thank you,
Marina, GSS.

Comment 9 Michael Pasternak 2013-10-06 08:24:08 UTC
(In reply to Marina from comment #8)
> I would like to reopen this bug.
> This is really annoying. Maybe virsh and nslookup having similar behaviour.
> But most of standard shells behave differently and do not quit the whole
> shell, but wipe the command line.
> 
> It requires relogin after it. And very inconvenient from the user
> perspective.
> I had to relogin 10 times during one hour working with the tool today.
> 

you don't have to exit by pressing cntrl+c on command, you can just add
a '#' at the beginning of the line to make it comment ..., but i'll address
your request.

Comment 10 Marina Kalinin 2013-10-07 14:52:45 UTC
(In reply to Michael Pasternak from comment #9)
> (In reply to Marina from comment #8)
> > I would like to reopen this bug.
> > This is really annoying. Maybe virsh and nslookup having similar behaviour.
> > But most of standard shells behave differently and do not quit the whole
> > shell, but wipe the command line.
> > 
> > It requires relogin after it. And very inconvenient from the user
> > perspective.
> > I had to relogin 10 times during one hour working with the tool today.
> > 
> 
> you don't have to exit by pressing cntrl+c on command, you can just add
> a '#' at the beginning of the line to make it comment ..., but i'll address
> your request.

Thank you, Michael.
I am aware about # option. But most of the people (myself too), are using Ctrl+C more frequently than #.

Comment 11 Ilia Meerovich 2013-11-04 09:16:56 UTC
verified with is21

Comment 13 Itamar Heim 2014-01-21 22:29:48 UTC
Closing - RHEV 3.3 Released

Comment 14 Itamar Heim 2014-01-21 22:29:48 UTC
Closing - RHEV 3.3 Released

Comment 15 Itamar Heim 2014-01-21 22:32:50 UTC
Closing - RHEV 3.3 Released


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