Bug 869269

Summary: [RHEVM-SHELL] make ctrl-c breaking the command rather than existing shell
Product: Red Hat Enterprise Virtualization Manager Reporter: David Jaša <djasa>
Component: ovirt-engine-cliAssignee: Juan Hernández <juan.hernandez>
Status: CLOSED CURRENTRELEASE QA Contact: Ilia Meerovich <iliam>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.4.0CC: aberezin, dyasny, ecohen, iheim, juan.hernandez, mkalinin, oramraz, Rhev-m-bugs, srevivo, yeylon, ykaul
Target Milestone: ---Keywords: Reopened
Target Release: 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: is18 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-10-14 07:30:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 902971    

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