Patchwork [v4,10/10] QMP/qemu-ga-client: make timeout longer for guest-fsfreeze-freeze command

login
register
mail settings
Submitter Tomoki Sekiyama
Date June 6, 2013, 3:07 p.m.
Message ID <20130606150702.10486.89130.stgit@hds.com>
Download mbox | patch
Permalink /patch/249453/
State New
Headers show

Comments

Tomoki Sekiyama - June 6, 2013, 3:07 p.m.
guest-fsfreeze-freeze command can take longer than 3 seconds when heavy
disk I/O is running. To avoid unexpected timeout, this changes the timeout
to 60 seconds (timeout of pre-commit phase of VSS).

Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@hds.com>
---
 QMP/qemu-ga-client |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Paolo Bonzini - June 18, 2013, 10:17 a.m.
Il 06/06/2013 17:07, Tomoki Sekiyama ha scritto:
> guest-fsfreeze-freeze command can take longer than 3 seconds when heavy
> disk I/O is running. To avoid unexpected timeout, this changes the timeout
> to 60 seconds (timeout of pre-commit phase of VSS).
> 
> Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@hds.com>
> ---
>  QMP/qemu-ga-client |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/QMP/qemu-ga-client b/QMP/qemu-ga-client
> index 46676c3..b5f7e7c 100755
> --- a/QMP/qemu-ga-client
> +++ b/QMP/qemu-ga-client
> @@ -267,7 +267,9 @@ def main(address, cmd, args):
>              print('Hint: qemu is not running?')
>          sys.exit(1)
>  
> -    if cmd != 'ping':
> +    if cmd == 'fsfreeze' and args[0] == 'freeze':
> +        client.sync(60)
> +    elif cmd != 'ping':
>          client.sync()
>  
>      globals()['_cmd_' + cmd](client, args)
> 

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Laszlo Ersek - July 1, 2013, 3:02 p.m.
On 06/06/13 17:07, Tomoki Sekiyama wrote:
> guest-fsfreeze-freeze command can take longer than 3 seconds when heavy
> disk I/O is running. To avoid unexpected timeout, this changes the timeout
> to 60 seconds (timeout of pre-commit phase of VSS).
> 
> Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@hds.com>
> ---
>  QMP/qemu-ga-client |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/QMP/qemu-ga-client b/QMP/qemu-ga-client
> index 46676c3..b5f7e7c 100755
> --- a/QMP/qemu-ga-client
> +++ b/QMP/qemu-ga-client
> @@ -267,7 +267,9 @@ def main(address, cmd, args):
>              print('Hint: qemu is not running?')
>          sys.exit(1)
>  
> -    if cmd != 'ping':
> +    if cmd == 'fsfreeze' and args[0] == 'freeze':
> +        client.sync(60)
> +    elif cmd != 'ping':
>          client.sync()
>  
>      globals()['_cmd_' + cmd](client, args)
> 
> 

Reviewed-by: Laszlo Ersek <lersek@redhat.com>

Patch

diff --git a/QMP/qemu-ga-client b/QMP/qemu-ga-client
index 46676c3..b5f7e7c 100755
--- a/QMP/qemu-ga-client
+++ b/QMP/qemu-ga-client
@@ -267,7 +267,9 @@  def main(address, cmd, args):
             print('Hint: qemu is not running?')
         sys.exit(1)
 
-    if cmd != 'ping':
+    if cmd == 'fsfreeze' and args[0] == 'freeze':
+        client.sync(60)
+    elif cmd != 'ping':
         client.sync()
 
     globals()['_cmd_' + cmd](client, args)