Bug 1782853

Summary: RFE: Reduce log sizes in virt-v2v, especially important when running virt-v2v in a limited size container or VM
Product: Red Hat Enterprise Linux Advanced Virtualization Reporter: Nenad Peric <nperic>
Component: virt-v2vAssignee: Richard W.M. Jones <rjones>
Status: CLOSED ERRATA QA Contact: liuzi <zili>
Severity: high Docs Contact:
Priority: high    
Version: 8.2CC: jsuchane, mkletzan, mtessun, mxie, mzhan, ptoscano, tzheng, xiaodwan, zili
Target Milestone: rcKeywords: FutureFeature
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: V2V
Fixed In Version: virt-v2v-1.42.0-3.module+el8.3.0+6497+b190d2a5 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1782868 (view as bug list) Environment:
Last Closed: 2020-11-17 17:46:15 UTC Type: Feature Request
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: 1809231    
Bug Blocks: 1782868    

Description Nenad Peric 2019-12-12 13:58:20 UTC
Description of problem:

The v2v logs in containers are much larger than in previous versions running on RHV Host or OSP instances. 
This is due to the addition of nbdkit messages to these logs. 


Version-Release number of selected component (if applicable):


How reproducible:

N/A

Steps to Reproduce:
1. Run conversion
2. Check logs ;)


Actual results:

The log sizes are quite big:

container logs:

$ wc -c v2v-import-20190924T224558-14065.log
103661017 v2v-import-20190924T224558-14065.log

non-container logs:

$ grep -v "^nbdkit.*count=" v2v-import-20190924T224558-14065.log | wc -c
29205798


Expected results:
Reduced log sizes if possible.

Comment 1 Richard W.M. Jones 2020-01-28 14:14:49 UTC
nbdkit-1.16.2-1.el8 contains the required changes in nbdkit.
This still requires a single line patch to virt-v2v.  See also:

https://bugzilla.redhat.com/show_bug.cgi?id=1756307#c3

Comment 2 Richard W.M. Jones 2020-02-19 21:50:00 UTC
There's a rather complex fix for this upstream now in
https://github.com/libguestfs/virt-v2v/commit/74a69a181bf2e4b26c2c15c5c33851d8f5cb4cfa

To get the full fix also needs further changes to nbdkit (>= 1.17.10).

This isn't really going to be possible to backport for RHEL AV 8.2.  It
will have to wait until virt-v2v is rebased as a new package in AV 8.3,
and the full effect will not be clear until we also rebase nbdkit.

Note ITR = 8.3.

Comment 3 Pino Toscano 2020-05-19 15:45:07 UTC
This was fixed/implemented in virt-v2v 1.42.0, which was introduced in RHEL AV 8.3.0.

Comment 6 liuzi 2020-05-25 11:11:04 UTC
Reproduce bug with builds:
virt-v2v-1.40.2-9.el7.x86_64
libguestfs-1.40.2-9.el7.x86_64
nbdkit-1.8.0-3.el7.x86_64

Steps:
1.Use virt-v2v to convert a guest from esxi to rhv
# virt-v2v  -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1  esx6.7-win2019-x86_64  -o rhv-upload -os nfs_data -of raw -b ovirtmgmt  -it vddk -io vddk-libdir=/home/vddk6.7/vmware-vix-disklib-distrib -io vddk-thumbprint=1F:97:34:5F:B6:C2:BA:66:46:CB:1A:71:76:7D:6B:50:1E:03:00:EA  -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /home/rhvpasswd -oo rhv-cluster=Default -oo rhv-direct -ip /home/passwd -oo rhv-verifypeer=true -oo rhv-cafile=/home/ca.pem -v -x |& tee >>conversion.log

2.After conversion successfully finished,check the log size:
# wc -c conversion.log 
3535307 conversion.log
#  grep -v "^nbdkit.*count=" conversion.log |wc -c
1949283


Verify bug with builds:
virt-v2v-1.42.0-3.module+el8.3.0+6497+b190d2a5.x86_64
libguestfs-1.42.0-1.module+el8.3.0+6496+d39ac712.x86_64
nbdkit-1.20.1-1.module+el8.3.0+6491+7f1d5b30.x86_64

Steps to verify:
Scenario 1:convert a guest with vddk
1.1 Use virt-v2v to convert a same guest as before from esxi to rhv
# virt-v2v  -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1  esx6.7-win2019-x86_64  -o rhv-upload -os nfs_data -of raw -b ovirtmgmt  -it vddk -io vddk-libdir=/home/vddk6.7/vmware-vix-disklib-distrib -io vddk-thumbprint=1F:97:34:5F:B6:C2:BA:66:46:CB:1A:71:76:7D:6B:50:1E:03:00:EA  -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /home/rhvpasswd -oo rhv-cluster=Default -oo rhv-direct -ip /home/passwd -oo rhv-verifypeer=true -oo rhv-cafile=/home/ca.pem -v -x |& tee >>conversion.log

1.2 After conversion successfully finished,check the log size:
# wc -c conversion.log 
538414 conversion.log
# grep -v "^nbdkit.*count=" conversion.log |wc -c
538414

Scenario 2:convert a guest without vddk
2.1 Use virt-v2v to convert a same guest as before from esxi to rhv
virt-v2v  -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1  esx6.7-win2019-x86_64  -o rhv -os 10.66.144.40:/home/nfs_export -ip /home/passwd -v -x |& tee >> conversion2.log

2.2 After conversion successfully finished,check the log size:
# wc -c conversion2.log
397756 conversion2.log
# grep -v "^nbdkit.*count=" conversion2.log |wc -c
397756

Result:Compare log size with the previous conversion log,virt-v2v has reduce log size.so change the bug from ON_QA to VERIFIED.

Comment 9 errata-xmlrpc 2020-11-17 17:46:15 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 (virt:8.3 bug fix and enhancement update), 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://access.redhat.com/errata/RHBA-2020:5137