qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v14 5/8] docs: block replication's description


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v14 5/8] docs: block replication's description
Date: Tue, 2 Feb 2016 20:35:44 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0

On 02/02/2016 08:18 PM, Changlong Xie wrote:
> On 02/02/2016 11:20 PM, Eric Blake wrote:
>> On 01/13/2016 02:18 AM, Changlong Xie wrote:
>>> From: Wen Congyang <address@hidden>
>>>
>>> Signed-off-by: Wen Congyang <address@hidden>
>>> Signed-off-by: zhanghailiang <address@hidden>
>>> Signed-off-by: Gonglei <address@hidden>
>>> Signed-off-by: Changlong Xie <address@hidden>
>>> ---
>>>   docs/block-replication.txt | 229

>>> +== Usage ==
>>> +Primary:
>>> +  -drive
>>> if=xxx,driver=quorum,read-pattern=fifo,id=colo1,vote-threshold=1,\
>>> +         children.0.file.filename=1.raw,\
>>> +         children.0.driver=raw
>>> +
>>> +  Run qmp command in primary qemu:
>>> +    { 'execute': 'human-monitor-command',
>>> +      'arguments': {
>>> +          'command-line': 'drive_add buddy
>>> driver=replication,mode=primary,file.driver=nbd,file.host=xxxx,file.port=xxxx,file.export=colo1,node-name=nbd_client1,if=none'
>>>
>>
>> Eww. We shouldn't ever have to pack a command line as . single QMP
>> string that needs reparsing.  Instead, you should pass the information
>> as a nested QMP dictionary, something like:
>>
>> 'arguments': {
>>    'remote-command': { 'command': 'drive_add', 'name': 'buddy',
>>                        'driver': 'replication', 'mode': 'primary',
>>                        'file': { 'driver': 'nbd', 'host': 'xxxx',
> 
> Hi Eric
> 
> What is 'remote-command' here? I just tried below commands, but got some
> errors.

Oh, I totally missed that this was using the existing
'human-monitor-command' to send an HMP command, instead of trying to
send a formal QMP command.  I thought you were documenting a new QMP
command.

Still, it would be nice to do this command using strict QMP (that would
be via 'blockdev-add') rather than via HMP (an all-in-one text command
crammed into the single 'command-line' argument).

> 
> 'blockdev-add' doesn't support 'nbd'. So we use 'drive_add' here, and
> it's a hmp command. If i'm right, there seems just one way to execute
> hmp commands in QMP:

For 2.6, we _really_ ought to get blockdev-add working for everything.
We're running short on time, though :(

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]