Re: [Qemu-block] [Qemu-devel] [PATCH] docs/block-replication.txt: Introduce nbd qmp commands

2016-11-07 Thread Changlong Xie

On 11/07/2016 03:50 PM, Markus Armbruster wrote:

Changlong Xie  writes:


Signed-off-by: Changlong Xie 
---
  docs/block-replication.txt | 22 +-
  1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/docs/block-replication.txt b/docs/block-replication.txt
index 6bde673..6b9c77b 100644
--- a/docs/block-replication.txt
+++ b/docs/block-replication.txt
@@ -152,9 +152,22 @@ Primary:
   children.0.driver=raw

Run qmp command in primary qemu:
-{ 'execute': 'human-monitor-command',
+{ 'execute': 'blockdev-add',
'arguments': {
-  'command-line': 'drive_add -n buddy 
driver=replication,mode=primary,file.driver=nbd,file.host=,file.port=,file.export=colo1,node-name=nbd_client1'
+  'driver': 'replication',
+  'node-name': 'nbd_client1',
+  'mode': 'primary',
+  'file': {
+  'driver': 'nbd',
+  'export': 'colo1',
+  'server': {
+  'type': 'inet',
+  'data': {
+  'host': '',
+  'port': ''
+  }
+  }
+  }
}
  }
  { 'execute': 'x-blockdev-change',
@@ -223,12 +236,11 @@ Primary:
  'child': 'children.1'
  }
}
-  { 'execute': 'human-monitor-command',
+  { 'execute': 'x-blockdev-del',
  'arguments': {
-'command-line': 'drive_del '
+'node-name': 'nbd_client1'
  }
}
-  Note: there is no qmp command to remove the blockdev now

  Secondary:
The primary host is down, so we should do the following thing:


This is premature: both blockdev-add and x-blockdev-del still aren't
ready for production.  Getting close, though.


Sound nice : ), so let this patch pending here.

Thanks
-Xie



.







Re: [Qemu-block] [Qemu-devel] [PATCH] docs/block-replication.txt: Introduce nbd qmp commands

2016-11-06 Thread Markus Armbruster
Changlong Xie  writes:

> Signed-off-by: Changlong Xie 
> ---
>  docs/block-replication.txt | 22 +-
>  1 file changed, 17 insertions(+), 5 deletions(-)
>
> diff --git a/docs/block-replication.txt b/docs/block-replication.txt
> index 6bde673..6b9c77b 100644
> --- a/docs/block-replication.txt
> +++ b/docs/block-replication.txt
> @@ -152,9 +152,22 @@ Primary:
>   children.0.driver=raw
>  
>Run qmp command in primary qemu:
> -{ 'execute': 'human-monitor-command',
> +{ 'execute': 'blockdev-add',
>'arguments': {
> -  'command-line': 'drive_add -n buddy 
> driver=replication,mode=primary,file.driver=nbd,file.host=,file.port=,file.export=colo1,node-name=nbd_client1'
> +  'driver': 'replication',
> +  'node-name': 'nbd_client1',
> +  'mode': 'primary',
> +  'file': {
> +  'driver': 'nbd',
> +  'export': 'colo1',
> +  'server': {
> +  'type': 'inet',
> +  'data': {
> +  'host': '',
> +  'port': ''
> +  }
> +  }
> +  }
>}
>  }
>  { 'execute': 'x-blockdev-change',
> @@ -223,12 +236,11 @@ Primary:
>  'child': 'children.1'
>  }
>}
> -  { 'execute': 'human-monitor-command',
> +  { 'execute': 'x-blockdev-del',
>  'arguments': {
> -'command-line': 'drive_del '
> +'node-name': 'nbd_client1'
>  }
>}
> -  Note: there is no qmp command to remove the blockdev now
>  
>  Secondary:
>The primary host is down, so we should do the following thing:

This is premature: both blockdev-add and x-blockdev-del still aren't
ready for production.  Getting close, though.