|
|
da373f |
From 7a4b425471223234fde5a65ca5fe5abc87fb0276 Mon Sep 17 00:00:00 2001
|
|
|
3efd08 |
From: Nir Soffer <nirsof@gmail.com>
|
|
|
3efd08 |
Date: Mon, 18 Nov 2019 01:04:24 +0200
|
|
|
3efd08 |
Subject: [PATCH] rhv-upload: Check status more frequently
|
|
|
3efd08 |
|
|
|
3efd08 |
Checking status more frequently save a couple of seconds. Here is
|
|
|
3efd08 |
an example flow tested with oVirt upload_disk.py example:
|
|
|
3efd08 |
|
|
|
3efd08 |
With 5 seconds wait:
|
|
|
3efd08 |
|
|
|
3efd08 |
Created disk in 11.085111 seconds
|
|
|
3efd08 |
Created transfer in 1.857502 seconds
|
|
|
3efd08 |
|
|
|
3efd08 |
With 1 second wait:
|
|
|
3efd08 |
|
|
|
3efd08 |
Created disk in 4.991227 seconds
|
|
|
3efd08 |
Created transfer in 1.961243 seconds
|
|
|
3efd08 |
|
|
|
3efd08 |
(cherry picked from commit 8816c5db220f518ef70beec7ac543290e3d5c0c7
|
|
|
3efd08 |
in virt-v2v)
|
|
|
3efd08 |
---
|
|
|
3efd08 |
v2v/rhv-upload-plugin.py | 4 ++--
|
|
|
3efd08 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
3efd08 |
|
|
|
3efd08 |
diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py
|
|
|
3efd08 |
index 7f62b4e3b..f13405df1 100644
|
|
|
3efd08 |
--- a/v2v/rhv-upload-plugin.py
|
|
|
3efd08 |
+++ b/v2v/rhv-upload-plugin.py
|
|
|
3efd08 |
@@ -161,7 +161,7 @@ def open(readonly):
|
|
|
3efd08 |
|
|
|
3efd08 |
endt = time.time() + timeout
|
|
|
3efd08 |
while True:
|
|
|
3efd08 |
- time.sleep(5)
|
|
|
3efd08 |
+ time.sleep(1)
|
|
|
3efd08 |
disk = disk_service.get()
|
|
|
3efd08 |
if disk.status == types.DiskStatus.OK:
|
|
|
3efd08 |
break
|
|
|
3efd08 |
@@ -196,7 +196,7 @@ def open(readonly):
|
|
|
3efd08 |
if time.time() > endt:
|
|
|
3efd08 |
raise RuntimeError("timed out waiting for transfer status "
|
|
|
3efd08 |
"!= INITIALIZING")
|
|
|
3efd08 |
- time.sleep(5)
|
|
|
3efd08 |
+ time.sleep(1)
|
|
|
3efd08 |
|
|
|
3efd08 |
# Now we have permission to start the transfer.
|
|
|
3efd08 |
if params['rhv_direct']:
|
|
|
3efd08 |
--
|
|
|
da373f |
2.18.4
|
|
|
3efd08 |
|