Bug 1171654 - Modify a file in virt-rescue with vi on some linux terminal such as yakuake, can lead to abnormal display in virt-rescue shell
Summary: Modify a file in virt-rescue with vi on some linux terminal such as yakuake, ...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-08 10:16 UTC by Lingfei Kong
Modified: 2017-03-23 19:17 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-23 19:17:30 UTC
Embargoed:


Attachments (Terms of Use)

Description Lingfei Kong 2014-12-08 10:16:59 UTC
Description of problem:
When i try to modify a file in virt-rescue with vi, add the content in the file and quit vi by pressing :wq, then in the virt-rescue shell presee ENTER key, i can not get a new line as expected. If i quit virt-rescue i can get some random strings in the shell command line. 
This problem is also exist in RHEL7, but in RHEL7 there is a very small probability that one will use yakuake, so i only file this bug on fedora, if it is necessary can clone it to RHEL. 
Also this bug may caused by yakuake itself, but i can not find a way to confirm this, so i file it against libguestfs for first review.


Version-Release number of selected component (if applicable):
libguestfs-1.26.9-1.fc20


How reproducible:
100%


Steps to Reproduce:
1. Install a yakuake on your work machine, yakuake not support well for GNOME, use KDE as a desktop environment.
# yum -y install yakuake
2. Open your yakuake(press F12) and run virt-rescue in it, and modify a file with vi then quit vi:
$virt-rescue  -a rhel7_kvm.img
> <rescue> vi test
> <rescue> <press ENTER here>
> <rescue> exit
$21676] reboot: machine restartemnizing SCSI cache


Actual results:
When quit vi, the display in virt-rescue is abnormal.


Expected results:
No abnormal displays


Additional info:

Comment 1 Richard W.M. Jones 2014-12-09 12:53:48 UTC
I can't reproduce this, possibly because I couldn't be bothered
to set up a whole KDE environment.

However it may be some kind of terminal setting.  What is the
value of $TERM ?

Comment 2 Lingfei Kong 2014-12-10 01:38:48 UTC
I reproduce it on Fedora20 with two machines:
$yakuake --version
Qt: 4.8.6
KDE Development Platform: 4.14.3
Yakuake: 2.9.9

$echo $TERM
xterm-256color

Comment 3 Richard W.M. Jones 2014-12-10 10:40:39 UTC
(In reply to Lingfei Kong from comment #2)
> $echo $TERM
> xterm-256color

For reference, it's the same $TERM setting that I had.

Comment 4 Lingfei Kong 2014-12-10 11:00:38 UTC
(In reply to Richard W.M. Jones from comment #3)
> (In reply to Lingfei Kong from comment #2)
> > $echo $TERM
> > xterm-256color
> 
> For reference, it's the same $TERM setting that I had.

Strange, my colleague reproduced it on his machine too. I will install another fedora20 host and try this again.

Comment 5 Pino Toscano 2014-12-16 12:24:14 UTC
I am actually able to reproduce it too (using yakuake too on Fedora 20).

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

Comment 8 Richard W.M. Jones 2017-03-23 19:17:30 UTC
Fixed upstream in libguestfs >= 1.37.1.


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