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 1136739 - virt-v2v warning info should be printed to fill the whole line
Summary: virt-v2v warning info should be printed to fill the whole line
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard: V2V
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-03 08:11 UTC by tingting zheng
Modified: 2015-03-05 13:44 UTC (History)
6 users (show)

Fixed In Version: libguestfs-1.27.38-1.1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 13:44:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0303 0 normal SHIPPED_LIVE libguestfs bug fix and enhancement update 2015-03-05 17:34:44 UTC

Description tingting zheng 2014-09-03 08:11:17 UTC
Description
virt-v2v warning info should be printed to fill the whole line

Version:
libguestfs-tools-c-1.27.32-1.1.el7.x86_64
libguestfs-1.27.32-1.1.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Run virt-v2v to connect a wrong URI to see the warning info.
# virt-v2v -ic sdll://sdfl test
[   0.0] Opening the source -i libvirt -ic sdll://sdfl test
virt-v2v: warning: no support for remote libvirt connections to '-ic 
sdll://sdfl'.  The conversion may fail when it tries to read the source 
disks.
libvirt: XML-RPC error : Cannot read CA certificate '/etc/pki/CA/cacert.pem': No such file or directory
virt-v2v: internal error: invalid argument: cannot open libvirt connection 'sdll://sdfl'

2.Just run virt-v2v command:
# virt-v2v
virt-v2v: error: expecting a libvirt guest name on the command line

virt-v2v: If reporting bugs, run virt-v2v with debugging enabled (-v 
-x) and include the complete output.

Actual results:
Step 1:the warning info doesn't fill the whole line,which affects the readability and is not consistent with other warning info.
[   0.0] Opening the source -i libvirt -ic sdll://sdfl test
virt-v2v: warning: no support for remote libvirt connections to '-ic 
sdll://sdfl'.  The conversion may fail when it tries to read the source 
disks.

while the below info fills the whole line:
libvirt: XML-RPC error : Cannot read CA certificate '/etc/pki/CA/cacert.pem': No such file or directory
virt-v2v: internal error: invalid argument: cannot open libvirt connection 'sdll://sdfl'


Expected results:
The warning info should be printed to fill the whole line and be consistent.

Additional info:

Comment 2 Richard W.M. Jones 2014-09-03 10:39:16 UTC
There are several issues here:

(1) virt-v2v correctly wraps warning messages at 72 characters.

(2) virt-v2v wraps most error messages too.

(3) However there are some places where we don't call the error()
    function, but instead call eprintf directly.  This is a bug.

(4) The "libvirt: XML-RPC error" message is printed by libvirt
    directly.  We have no control over it.

Comment 3 Richard W.M. Jones 2014-09-03 12:32:43 UTC
Upstream fixes:

https://github.com/libguestfs/libguestfs/commit/bb362f687840cd9fcf68bea08fd34fe8e4ddc64c
https://github.com/libguestfs/libguestfs/commit/711c32b0d9d31dc554b78f471be4b529eab4dbba
https://github.com/libguestfs/libguestfs/commit/941ebaa5e44cbf41e0dd94f811329d59f18c2868

The errors now look like this:

$ virt-v2v -ic abc://def 
virt-v2v: error: expecting a libvirt guest name on the command line

If reporting bugs, run virt-v2v with debugging enabled and include the 
complete output:

  virt-v2v -v -x [...]


$ virt-v2v -ic abc://def test
[   0.0] Opening the source -i libvirt -ic abc://def test
virt-v2v: warning: no support for remote libvirt connections to '-ic 
abc://def'.  The conversion may fail when it tries to read the source 
disks.
libvirt: XML-RPC error : Cannot read CA certificate '/etc/pki/CA/cacert.pem': No such file or directory
virt-v2v: error: internal error: invalid argument: cannot open libvirt 
connection 'abc://def'

If reporting bugs, run virt-v2v with debugging enabled and include the 
complete output:

  virt-v2v -v -x [...]


Note I cannot do anything about the libvirt error message, it's
not controlled by virt-v2v at all.

Comment 5 zhoujunqin 2014-09-10 03:01:57 UTC
I can reproduce this issue as bug description.
And try to verify with new version:
virt-v2v-1.27.41-1.1.el7.x86_64
libguestfs-tools-c-1.27.41-1.1.el7.x86_64
libguestfs-1.27.41-1.1.el7.x86_64

Steps:
Run virt-v2v to connect a wrong URI to see the error message.
1.
# virt-v2v -ic sdll://sdfl
virt-v2v: error: expecting a libvirt guest name on the command line

If reporting bugs, run virt-v2v with debugging enabled and include the 
complete output:

  virt-v2v -v -x [...]

2.
# virt-v2v -ic sdll://sdfl test
[   0.0] Opening the source -i libvirt -ic sdll://sdfl test
libvirt: XML-RPC error : Cannot read CA certificate '/etc/pki/CA/cacert.pem': No such file or directory
virt-v2v: error: internal error: invalid argument: cannot open libvirt 
connection 'sdll://sdfl'

If reporting bugs, run virt-v2v with debugging enabled and include the 
complete output:

  virt-v2v -v -x [...]

And Richard W.M. Jones, i also have a question, why the error format showed by virt-v2v cannot fill the whole line, just likes libvirt error format, thanks.

Comment 6 Richard W.M. Jones 2014-09-10 10:26:42 UTC
(In reply to zhoujunqin from comment #5)
> And Richard W.M. Jones, i also have a question, why the error format showed
> by virt-v2v cannot fill the whole line, just likes libvirt error format,
> thanks.

virt-v2v wraps the error message to make it easier to read.
Otherwise on an 80 column display you would see words split
across lines.

Comment 9 zhoujunqin 2014-09-11 09:49:14 UTC
According to above comments, move it from ON_QA to VERIFIED.

Comment 11 errata-xmlrpc 2015-03-05 13:44:07 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/RHBA-2015-0303.html


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