Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1314244

Summary: RFE: virt-p2v log window should process colour escapes and backspaces
Product: Red Hat Enterprise Linux 7 Reporter: Xiaodai Wang <xiaodwan>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 7.3CC: juzhou, mxie, mzhan, ptoscano, rjones, tzheng
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: P2V
Fixed In Version: libguestfs-1.32.5-6.el7 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-03 17:59:27 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:
Attachments:
Description Flags
screen shot
none
virt-p2v-1.32.5-5.el7 none

Description Xiaodai Wang 2016-03-03 09:36:18 UTC
Description of problem:
Some messy code display at the beginning of virt-p2v log window

Version-Release number of selected component (if applicable):
# rpm -q libguestfs virt-v2v virt-p2v
libguestfs-1.32.3-1.el7.x86_64
virt-v2v-1.32.3-1.el7.x86_64
virt-p2v-1.28.1-1.51.4.el7.iso

How reproducible:
100%

Steps to Reproduce:
1. Launch virt-p2v boot GUI via iso or virt-p2v pxe image.
2. Use virt-p2v to convert a host
3. See the logs in virt-p2v window.

Actual results:
There are some messy code at the beginning of the log. You can see the attachment pictures.

Expected results:
There should be no messy code.

Additional info:

Comment 1 Xiaodai Wang 2016-03-03 09:37:55 UTC
Created attachment 1132701 [details]
screen shot

Comment 3 Richard W.M. Jones 2016-03-03 12:46:28 UTC
Yup.  The log window is kind of messy and doesn't "process" colour escape
sequences or backspaces (in this example).  I tried to fix this a while
back but it wasn't that simple.

Comment 4 Richard W.M. Jones 2016-06-18 15:10:05 UTC
Patches posted:
https://www.redhat.com/archives/libguestfs/2016-June/msg00112.html

Comment 6 mxie@redhat.com 2016-06-22 08:22:55 UTC
I can reproduce the bug with build:
virt-p2v-1.28.1-1.51.4.el7.iso

Try to verify the bug with build:
virt-p2v-1.32.5-5.el7

Steps 
1. Launch virt-p2v boot GUI via iso 
2. Input conversion server info and click next
3. Input conversion info for host and then click start conversion


Result now:
There are still little messy code at the beginning of the log, pls refer to screeshot'virt-p2v-1.32.5-5.el7'


Hi rjones

Could you help to check this problem,thanks

Comment 7 mxie@redhat.com 2016-06-22 08:23:19 UTC
Created attachment 1170625 [details]
virt-p2v-1.32.5-5.el7

Comment 8 Richard W.M. Jones 2016-06-22 09:05:04 UTC
Yup, that's not supposed to happen.  I didn't see it in my own testing.

Comment 9 Richard W.M. Jones 2016-06-22 09:50:07 UTC
OK this is caused because you have a readline setting

  set horizontal-scroll-mode on

probably in /root/.inputrc or /etc/inputrc.  The solution is to turn
that setting off.  See also: http://superuser.com/a/862341

There's apparently no way to get bash to ignore this file or to turn
off the setting at runtime, so there's no real way to fix it from virt-p2v.

Comment 10 Richard W.M. Jones 2016-06-23 10:35:21 UTC
(In reply to Richard W.M. Jones from comment #9)
> OK this is caused because you have a readline setting
> 
>   set horizontal-scroll-mode on
> 
> probably in /root/.inputrc or /etc/inputrc.  The solution is to turn
> that setting off.  See also: http://superuser.com/a/862341
> 
> There's apparently no way to get bash to ignore this file or to turn
> off the setting at runtime, so there's no real way to fix it from virt-p2v.

This issue is possibly fixed by:
https://github.com/libguestfs/libguestfs/commit/d41cf142e1eb285eca798889d3b6a955afffbe32

However there are still some cases where the final virt-v2v-wrapper
command gets echoed back into the messages output.

Comment 11 mxie@redhat.com 2016-06-24 06:46:16 UTC
Try to verify the bug with build
libguestfs-1.32.5-6.el7

Steps 
1. Launch virt-p2v boot GUI via iso 
2. Input conversion server info and click next
3. Input conversion info for host and then click start conversion


Result now:
There is no messy code at the beginning of the log

So move the bug from ON_QA to VERIFIED

Comment 12 mxie@redhat.com 2016-06-24 06:48:24 UTC
Sorry, forgot to add p2v version in build, verify the bug with build:
virt-p2v-1.32.5-6.el7

Comment 16 errata-xmlrpc 2016-11-03 17:59:27 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2016-2576.html