Bug 2074026

Summary: Remove -o json option
Product: Red Hat Enterprise Linux 9 Reporter: Richard W.M. Jones <rjones>
Component: virt-v2vAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED ERRATA QA Contact: Vera <vwu>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.1CC: juzhou, lersek, mxie, rjones, tyan, tzheng, vwu, xiaodwan
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-v2v-2.0.7-1.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-15 09:56:05 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:

Description Richard W.M. Jones 2022-04-11 12:03:25 UTC
Description of problem:

Virt-v2v has an option to output to a templated JSON file.  It
is currently documented as follows:

        virt-v2v [-i* options] -o json -os DIRECTORY
                               [-oo json-disks-pattern=PATTERN]
    [...]
    OUTPUT TO JSON
       The -o json option produces the following files by default:

        NAME.json                     JSON metadata.
        NAME-sda, NAME-sdb, etc.      Guest disk(s).

       where "NAME" is the guest name.

       It is possible to change the pattern of the disks using the -oo
       json-disks-pattern=... option: it allows parameters in form of "%{...}"
       variables, for example:

        -oo json-disks-pattern=disk%{DiskNo}.img
    [...]

This feature was added for KubeVirt but was never used.

I'm intending to remove this in virt-v2v upstream version 2.2,
but I think we should remove it from virt-v2v in RHEL 9.1 (version 2.0.x).

This will be a kind of regression because the feature is available
in RHEL 9.0, but we don't believe anyone is using it.

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

virt-v2v-2.0.2-1.el9.x86_64

Comment 1 Richard W.M. Jones 2022-04-11 12:04:50 UTC
Fixed upstream in:

https://github.com/libguestfs/virt-v2v/commit/02e58d54fef14be72078559dae8c7c7a39f7c0f5
https://github.com/libguestfs/virt-v2v/commit/4e6b389b4e27c8d13e57fcaf777d96ad7e08650b

For QE, you can remove any tests of this feature from RHEL 9.

Comment 7 Vera 2022-04-15 06:12:55 UTC
Reproduced with virt-v2v-1.45.99-2.el9_0.x86_64.

Step1: Check the manual page
# man virt-v2v |grep json
       -o json
           Set the output method to json.
           For -o json, -o local and -o qemu, this is a directory name.  The directory must exist.

Step2: Check in the command
# virt-v2v -o json
[   0.3] Setting up the source: -i libvirt
virt-v2v: error: -i libvirt: 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 [...]


Verified with virt-v2v-2.0.3-1.el9.x86_64.
Step1: Check the manual page
# man virt-v2v |grep json

Step2: Check in the command
# virt-v2v -o json
virt-v2v: error: unknown -o option: json

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

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

Moving to Verified.

Comment 9 errata-xmlrpc 2022-11-15 09:56:05 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 (Low: virt-v2v security, 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/RHSA-2022:7968