Bug 869269 - [RHEVM-SHELL] make ctrl-c breaking the command rather than existing shell
[RHEVM-SHELL] make ctrl-c breaking the command rather than existing shell
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-cli (Show other bugs)
3.4.0
Unspecified Unspecified
unspecified Severity high
: ---
: 3.3.0
Assigned To: Juan Hernández
Ilia Meerovich
infra
: Reopened
Depends On:
Blocks: 902971
  Show dependency treegraph
 
Reported: 2012-10-23 08:52 EDT by David Jaša
Modified: 2016-07-04 20:07 EDT (History)
11 users (show)

See Also:
Fixed In Version: is18
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-14 03:30:02 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Infra
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 19893 None None None Never

  None (edit)
Description David Jaša 2012-10-23 08:52:24 EDT
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 08:57:36 EDT

*** This bug has been marked as a duplicate of bug 868647 ***
Comment 2 Michael Pasternak 2012-10-23 09:36:24 EDT
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 09:38:12 EDT
Just after start with no parameters (when typing the first command). Or actually, when typing any command.
Comment 4 Michael Pasternak 2012-10-23 09:41:26 EDT
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 10:20:28 EDT
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 10:27:17 EDT
(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 11:29:19 EDT
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 2013-10-03 16:46:47 EDT
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 04:24:08 EDT
(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 2013-10-07 10:52:45 EDT
(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 04:16:56 EST
verified with is21
Comment 13 Itamar Heim 2014-01-21 17:29:48 EST
Closing - RHEV 3.3 Released
Comment 14 Itamar Heim 2014-01-21 17:29:48 EST
Closing - RHEV 3.3 Released
Comment 15 Itamar Heim 2014-01-21 17:32:50 EST
Closing - RHEV 3.3 Released

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