Bug 1152819

Summary: Can not end a running command in virt-rescue by press ^C or other keys, the only way is to exit virt-rescue
Product: [Community] Virtualization Tools Reporter: Lingfei Kong <lkong>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: leiwang, linl, mbooth, ptoscano, rbalakri, wshi
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1152821 (view as bug list) Environment:
Last Closed: 2017-03-23 19:16:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1152821, 1288337    

Description Lingfei Kong 2014-10-15 03:07:08 UTC
Description of problem:
Currently if i want to end a running commands, these commands often can not finish correctly, the only way is to exit virt-rescue. If the commands have a acceptable time to return, then i can wait until it return. But if the commands can not return when it run incorrectly or have a very long time to return, then i have to quit virt-rescue to end that commands.
If i use virt-rescue to fix a bad virt machine, there is a high probability to encounter this situation.


Version-Release number of selected component (if applicable):
libguestfs-1.27.62-1.1.el7


How reproducible:
100%


Steps to Reproduce:
1. Get a rhel guest image: rhel.img
2. #virt-rescue --network -a rhel.img
><rescue> ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
3. Press ^C


Actual results:
><rescue> ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
qemu: terminating on signal 2

^C will let you exit virt-rescue


Expected results:
Can press ^C or other keys to end command 'ping 8.8.8.8' and not exit virt-rescue


Additional info:

Comment 4 Richard W.M. Jones 2016-06-27 17:08:55 UTC
Still a bug even upstream, but moving to 7.4.

Comment 5 Richard W.M. Jones 2017-02-16 17:04:55 UTC
This is an upstream bug that probably won't affect RHEL customers
very much.  Let's track this upstream instead.  (It's also really
a bug in qemu, not libguestfs)

Comment 6 Richard W.M. Jones 2017-03-03 12:27:47 UTC
Patches posted:
https://www.redhat.com/archives/libguestfs/2017-March/msg00017.html

Comment 7 Richard W.M. Jones 2017-03-23 19:16:58 UTC
Fixed in libguestfs >= 1.37.1.

https://github.com/libguestfs/libguestfs/commit/32d60801443647b3523b9374c431fefdbf054e3c