Bug 1431178

Summary: missing parser implementation for JSON backing volume driver 'raw'
Product: [Community] Virtualization Tools Reporter: Richard W.M. Jones <rjones>
Component: libvirtAssignee: Tomáš Golembiovský <tgolembi>
Status: CLOSED NOTABUG QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: berrange, libvirt-maint, ptoscano, rbalakri, tgolembi
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-12 18:47:29 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:
Bug Depends On:    
Bug Blocks: 910269    
Attachments:
Description Flags
v2v/test-v2v-i-ova.sh.log none

Description Richard W.M. Jones 2017-03-10 14:25:43 UTC
Created attachment 1261943 [details]
v2v/test-v2v-i-ova.sh.log

Description of problem:

virt-v2v -i ova fails eventually with:

  virt-v2v: error: libguestfs error: could not create appliance through 
  libvirt.

  Try running qemu directly without libvirt using this environment variable:
  export LIBGUESTFS_BACKEND=direct

  Original error from libvirt: internal error: missing parser implementation 
  for JSON backing volume driver 'raw' [code=1 int1=-1]

I don't understand why this is because I'm using libvirt 3.1.0
which is supposed to have an implementation for this.

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

libvirt-3.1.0-1.fc27.x86_64

How reproducible:

100%

Steps to Reproduce:
1. This happens in the test-v2v-i-ova.sh test in the libguestfs test suite, so:

  make -C v2v check

Please see the attached log file for full details of what's happening.

Comment 1 Richard W.M. Jones 2017-03-10 14:28:16 UTC
Tomáš, as you worked on this most recently, could you please have
a look at the log file attached to see what's going wrong.

Comment 2 Daniel Berrangé 2017-03-10 14:31:27 UTC
Yeah this doesn't make much sense looking at the code. The message comes from:

    for (i = 0; i < ARRAY_CARDINALITY(jsonParsers); i++) {
        if (STREQ(drvname, jsonParsers[i].drvname)) {
            ret = jsonParsers[i].func(src, file, jsonParsers[i].opaque);
            goto cleanup;
        }
    }

    virReportError(VIR_ERR_INTERNAL_ERROR,
                   _("missing parser implementation for JSON backing volume "
                     "driver '%s'"), drvname);



and 

commit e4c6d4ae557a5de3a4b9a7e789df0e8f1d140557
Author: Tomáš Golembiovský <tgolembi>
Date:   Mon Feb 13 23:53:43 2017 +0100

    util: storage: add JSON backing volume parser 'raw' block driver
    
    The 'raw' block driver in Qemu is not directly interesting from
    libvirt's perspective, but it can be layered above some other block
    drivers and this may be interesting for the user.
    
    The patch adds support for the 'raw' block driver. The driver is treated
    simply as a pass-through and child driver in JSON is queried to get the
    necessary information.
    
    Signed-off-by: Tomáš Golembiovský <tgolembi>


added 'raw' to the jsonParsers array.

So if using 3.1.0 this really shouldn't be possible.

Comment 3 Richard W.M. Jones 2017-03-12 18:47:29 UTC
It looks like this was caused by the session libvirtd being (temporarily)
the old version just after I had updated libvirt to the new version.

Probably the version test in libguestfs is wrong, as it should test
the daemon version not the library version.