Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1545155 - gluster volume QAPI schema is not accepted by qemu
Summary: gluster volume QAPI schema is not accepted by qemu
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.3
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Kevin Wolf
QA Contact: Longxiang Lyu
Depends On:
Blocks: 760547 1558125
TreeView+ depends on / blocked
Reported: 2018-02-14 11:48 UTC by Peter Krempa
Modified: 2018-11-01 11:06 UTC (History)
8 users (show)

Fixed In Version: qemu-kvm-rhev-2.12.0-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-11-01 11:04:15 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3443 None None None 2018-11-01 11:06:44 UTC

Description Peter Krempa 2018-02-14 11:48:37 UTC
Description of problem:

QAPI schema describes the field to pass the unix socket path as:

{ 'struct': 'BlockdevOptionsGluster',
  'data': { 'volume': 'str',
            'path': 'str',
            'server': ['SocketAddress'],
            '*debug': 'int',
            '*logfile': 'str' } }

{ 'union': 'SocketAddress',
  'base': { 'type': 'SocketAddressType' },
  'discriminator': 'type',
  'data': { 'inet': 'InetSocketAddress',
            'unix': 'UnixSocketAddress',
            'vsock': 'VsockSocketAddress',
            'fd': 'String' } }

{ 'struct': 'UnixSocketAddress',
  'data': {
    'path': 'str' } }

Using the 'path' field ends in a failure:

qemu-system-x86_64: -drive file.driver=gluster,file.volume=vol0,file.path=img4,file.server.0.type=unix,file.server.0.path=/tmp/sock,file.server.1.type=unix,file.server.1.path=/tmp/sock2,file.debug=9,format=qcow2,if=none,id=drive-virtio-disk0,cache=none: Parameter 'socket' is missing

Comment 2 Kevin Wolf 2018-04-04 15:03:11 UTC
Fixed in upstream commit 9dae635af ('gluster: Fix blockdev-add with server.N.type=unix').

Comment 5 Longxiang Lyu 2018-05-03 05:00:39 UTC
GlusterFS server and client are on the same machine.
GlusterFS version: glusterfs-server-3.8.4-18.6.el7rhgs.x86_64

a. reproduction
QEMU version: qemu-kvm-rhev-2.9.0-16.el7_4.5.x86_64
# qemu-kvm -drive file.driver=gluster,file.volume=gv0,file.path=rhel75-64-virtio-scsi.qcow2,file.server.0.type=unix,file.server.0.path=/var/run/glusterd.socket -monitor stdio
qemu-kvm: -drive file.driver=gluster,file.volume=gv0,file.path=rhel75-64-virtio-scsi.qcow2,file.server.0.type=unix,file.server.0.path=/var/run/glusterd.socket: Parameter 'socket' is missing
hint: check in 'server' array index '0'
Usage: -drive driver=qcow2,file.driver=gluster,file.volume=testvol,file.path=/path/a.qcow2[,file.debug=9][,file.logfile=/path/filename.log],file.server.0.type=inet,,file.server.0.port=24007,file.server.1.transport=unix,file.server.1.socket=/var/run/glusterd.socket ...

b. verification
QEMU version: qemu-img-rhev-2.12.0-1.el7.x86_64
# qemu-kvm -drive file.driver=gluster,file.volume=gv0,file.path=rhel75-64-virtio-scsi.qcow2,file.server.0.type=unix,file.server.0.path=/var/run/glusterd.socket -monitor stdio
[2018-05-03 04:59:39.906819] I [MSGID: 104045] [glfs-master.c:91:notify] 0-gfapi: New graph 6c79756c-6170-746f-702e-757365727379 (0) coming up
[2018-05-03 04:59:39.906847] I [MSGID: 114020] [client.c:2356:notify] 0-gv0-client-0: parent translators are ready, attempting connect on transport
[2018-05-03 04:59:39.909556] I [rpc-clnt.c:2001:rpc_clnt_reconfig] 0-gv0-client-0: changing port to 49152 (from 0)
[2018-05-03 04:59:39.911714] I [MSGID: 114057] [client-handshake.c:1439:select_server_supported_programs] 0-gv0-client-0: Using Program GlusterFS 3.3, Num (1298437), Version (330)
[2018-05-03 04:59:39.912057] I [MSGID: 114046] [client-handshake.c:1215:client_setvolume_cbk] 0-gv0-client-0: Connected to gv0-client-0, attached to remote volume '/home/brick'.
[2018-05-03 04:59:39.912066] I [MSGID: 114047] [client-handshake.c:1226:client_setvolume_cbk] 0-gv0-client-0: Server and Client lk-version numbers are not same, reopening the fds
[2018-05-03 04:59:39.930828] I [MSGID: 114035] [client-handshake.c:201:client_set_lk_version_cbk] 0-gv0-client-0: Server lk version = 1
[2018-05-03 04:59:39.931667] I [MSGID: 104041] [glfs-resolve.c:966:__glfs_active_subvol] 0-gv0: switched to graph 6c79756c-6170-746f-702e-757365727379 (0)
[2018-05-03 04:59:39.932399] W [MSGID: 114031] [client-rpc-fops.c:2211:client3_3_seek_cbk] 0-gv0-client-0: remote operation failed [No such device or address]
QEMU 2.12.0 monitor - type 'help' for more information
(qemu) VNC server running on ::1:5900
(qemu) info block
ide0-hd0 (#block107): json:{"driver": "qcow2", "file": {"driver": "gluster", "path": "rhel75-64-virtio-scsi.qcow2", "server.0.path": "/var/run/glusterd.socket", "server.0.type": "unix", "volume": "gv0"}} (qcow2)
    Attached to:      /machine/unattached/device[22]
    Cache mode:       writeback

mark as VERIFIED then.

Comment 6 errata-xmlrpc 2018-11-01 11:04: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, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

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