Bug 1464837 - qemu records an undocumented field "=keyvalue-pairs" in overlay image of a RBD volume after snapshot
qemu records an undocumented field "=keyvalue-pairs" in overlay image of a RB...
Status: NEW
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev (Show other bugs)
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Jeff Cody
Longxiang Lyu
: 1464838 (view as bug list)
Depends On:
Blocks: 1473046
  Show dependency treegraph
Reported: 2017-06-25 22:44 EDT by Han Han
Modified: 2018-02-07 23:13 EST (History)
13 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Han Han 2017-06-25 22:44:30 EDT
Description of problem:
As subject

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

How reproducible:

Steps to Reproduce:
1. Prepare a running VM with rbd backend
2. Create a snapshot with qemu
# virsh qemu-monitor-command V '{"execute":"blockdev-snapshot-sync", "arguments": { "device": "drive-virtio-disk0", "snapshot

3. Check the snapshot file
# qemu-img info /tmp/rbd.bak 
image: /tmp/rbd.bak
file format: qcow2
virtual size: 10G (10737418240 bytes)
disk size: 196K
cluster_size: 65536
backing file: json:{"driver": "raw", "file": {"pool": "rbd", "image": "V", "driver": "rbd", "=keyvalue-pairs": "[\"auth_supported\", \"none\", \"mon_host\", \"\"]"}}
backing file format: raw
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false

As I konw "=keyvalue-pairs" is not defined in qapi/block-core.json and qapi-schema.json. So it is not standard rbd json format.
The back file json format using raw driver and doesn't take standard rbd json format like:
'{"file": {"pool": "rbd", "image": "V", "driver": "rbd", "server":[{"host":"XX.XX.XX.XX","port":"6789"}]}}'

Actual results:
As above

Expected results:
The back file of rbd should use standard rbd format, without "=keyvalue-pairs".

Additional info:
Comment 2 Han Han 2017-06-26 02:48:21 EDT
*** Bug 1464838 has been marked as a duplicate of this bug. ***
Comment 5 Peter Krempa 2017-06-27 11:02:45 EDT
The impact on libvirt is following:

If you start a VM with the following disk definition:
    <disk type='network' device='disk'>
      <driver name='qemu' type='raw'/>
      <source protocol='rbd' name='rbd/V'>
        <host name='' port='6789'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>

This translates to the following command line options:
-drive file=rbd:rbd/V:auth_supported=none:mon_host=,format=raw,if=none,id=drive-virtio-disk0 -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x8,drive=drive-virtio-disk0,id=virtio-disk

Then if you create an external snapshot on top of that image, qemu records the following backing store string:
json:{"driver": "raw", "file": {"pool": "rbd", "image": "V", "driver": "rbd", "=keyvalue-pairs": "[\"auth_supported\", \"none\", \"mon_host\", \"\"]"}}

Since it contains non-documented fields, the libvirt backing store parser is not able to parse it and thus certain block jobs which require refresh of the backing store data won't work properly.

After this any other block job (except for snapshots, since I've already improved the backing store tracking so that re-detection is not necessary) won't work properly.

The problem here is that the string recorded by qemu changed to something that isn't the old string which used to be and neither isn't the proper json: pseudo-protocol string.
Comment 9 Suqin Huang 2017-07-02 21:39:39 EDT
no cmd blockdev-snapshot-sync in qemu-kvm

qemu-kvm didn't support storage vm migration

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