Displaying 20 results from an estimated 44 matches for "imagetransferphase".
2019 Nov 28
3
[PATCH] rhv-upload: Fix waiting for transfer
...ISHED_FAILURE.
+ # If the transfer was paused, we need to cancel it to remove the disk,
+ # otherwise the system will remove the disk and transfer shortly after.
+
endt = time.time() + timeout
while True:
- transfer = transfer_service.get()
- if transfer.phase != types.ImageTransferPhase.INITIALIZING:
+ time.sleep(1)
+ try:
+ transfer = transfer_service.get()
+ except sdk.NotFoundError:
+ # The system has removed the disk and the transfer.
+ raise RuntimeError("transfer %s was removed" % transfer.id)
+
+ if tran...
2019 Mar 17
2
[PATCH] v2v: rhv-upload-plugin - improve wait logic after finalize (RHBZ#1680361)
After invoking transfer_service.finalize, check operation
status by examining ImageTransferPhase and DiskStatus.
This is done instead of failing after a predefined timeout
regardless the status.
* not verified *
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1680361
---
v2v/rhv-upload-plugin.py | 26 +++++++++++++++++++++-----
1 file changed, 21 insertions(+), 5 deletions(-)
diff --g...
2019 Nov 28
0
Re: [PATCH] rhv-upload: Fix waiting for transfer
...ransfer was paused, we need to cancel it to remove the disk,
> + # otherwise the system will remove the disk and transfer shortly after.
> +
> endt = time.time() + timeout
> while True:
> - transfer = transfer_service.get()
> - if transfer.phase != types.ImageTransferPhase.INITIALIZING:
> + time.sleep(1)
> + try:
> + transfer = transfer_service.get()
> + except sdk.NotFoundError:
> + # The system has removed the disk and the transfer.
> + raise RuntimeError("transfer %s was removed" % t...
2019 Aug 12
1
[PATCH] v2v: -o rhv-upload: fix the phony ovirtsdk4 module
...4/types.py
index 9b3f557ee..60ba541cd 100644
--- a/v2v/test-v2v-o-rhv-upload-module/ovirtsdk4/types.py
+++ b/v2v/test-v2v-o-rhv-upload-module/ovirtsdk4/types.py
@@ -73,7 +73,7 @@ class Disk(object):
):
pass
- id = 123
+ id = "123"
status = DiskStatus.OK
class ImageTransferPhase(Enum):
@@ -104,7 +104,7 @@ class ImageTransfer(object):
):
pass
- id = 456
+ id = "456"
phase = ImageTransferPhase.TRANSFERRING
transfer_url = "http://localhost:" + str(imageio_port) + "/"
--
2.21.0
2019 Nov 28
2
Re: [PATCH] rhv-upload: Fix waiting for transfer
...cancel it to remove the disk,
> > + # otherwise the system will remove the disk and transfer shortly after.
> > +
> > endt = time.time() + timeout
> > while True:
> > - transfer = transfer_service.get()
> > - if transfer.phase != types.ImageTransferPhase.INITIALIZING:
> > + time.sleep(1)
> > + try:
> > + transfer = transfer_service.get()
> > + except sdk.NotFoundError:
> > + # The system has removed the disk and the transfer.
> > + raise RuntimeError("tra...
2019 Mar 17
0
Re: [PATCH] v2v: rhv-upload-plugin - improve wait logic after finalize (RHBZ#1680361)
On Sun, Mar 17, 2019 at 2:07 PM Daniel Erez <derez@redhat.com> wrote:
> After invoking transfer_service.finalize, check operation
> status by examining ImageTransferPhase and DiskStatus.
> This is done instead of failing after a predefined timeout
> regardless the status.
>
> * not verified *
>
> Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1680361
> ---
> v2v/rhv-upload-plugin.py | 26 +++++++++++++++++++++-----
> 1 file changed,...
2018 Aug 05
3
[PATCH] v2v: rhv-plugin: Use string literal concatenation
...ug("cannot find a running host with hw_id=%r, "
+ "that belongs to datacenter '%s', "
"using any host" % (vdsm_id, datacenter.name))
return None
@@ -193,15 +193,15 @@ def open(readonly):
if transfer.phase != types.ImageTransferPhase.INITIALIZING:
break
if time.time() > endt:
- raise RuntimeError("timed out waiting for transfer status " +
+ raise RuntimeError("timed out waiting for transfer status "
"!= INITIALIZING")...
2018 Dec 07
2
[PATCH] v2v: -o rhv-upload: Fix upload when using https
...+Subproject commit 646a44e1b190c4a7f6a9f32c63230c619e38d251
diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py
index 1a217b6dc..3272c3ce3 100644
--- a/v2v/rhv-upload-plugin.py
+++ b/v2v/rhv-upload-plugin.py
@@ -193,41 +193,41 @@ def open(readonly):
if transfer.phase != types.ImageTransferPhase.INITIALIZING:
break
if time.time() > endt:
raise RuntimeError("timed out waiting for transfer status "
"!= INITIALIZING")
# Now we have permission to start the transfer.
if params['rhv_direct...
2019 Mar 17
2
Re: [PATCH] v2v: rhv-upload-plugin - improve wait logic after finalize (RHBZ#1680361)
On Sun, Mar 17, 2019 at 2:59 PM Nir Soffer <nsoffer@redhat.com> wrote:
>
> On Sun, Mar 17, 2019 at 2:07 PM Daniel Erez <derez@redhat.com> wrote:
>>
>> After invoking transfer_service.finalize, check operation
>> status by examining ImageTransferPhase and DiskStatus.
>> This is done instead of failing after a predefined timeout
>> regardless the status.
>>
>> * not verified *
>>
>> Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1680361
>> ---
>> v2v/rhv-upload-plugin.py | 26 ++++++++++++++++...
2019 Sep 19
2
[PATCH] v2v: -o rhv-upload: check for a valid image transfer right away
...+ b/v2v/rhv-upload-plugin.py
@@ -188,7 +188,6 @@ def open(readonly):
# actual transfer can start when its status is "Transferring".
endt = time.time() + timeout
while True:
- time.sleep(5)
transfer = transfer_service.get()
if transfer.phase != types.ImageTransferPhase.INITIALIZING:
break
@@ -196,6 +195,7 @@ def open(readonly):
transfer_service.cancel()
raise RuntimeError("timed out waiting for transfer status "
"!= INITIALIZING")
+ time.sleep(5)
# Now we have...
2019 Sep 19
2
[PATCH] v2v: -o rhv-upload: cancel disk transfer on open failure
...-upload-plugin.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py
index 57e90484f..51a7f381a 100644
--- a/v2v/rhv-upload-plugin.py
+++ b/v2v/rhv-upload-plugin.py
@@ -193,12 +193,14 @@ def open(readonly):
if transfer.phase != types.ImageTransferPhase.INITIALIZING:
break
if time.time() > endt:
+ transfer_service.cancel()
raise RuntimeError("timed out waiting for transfer status "
"!= INITIALIZING")
# Now we have permission to start the tra...
2019 Sep 19
2
[PATCH] v2v: -o rhv-upload: adapt phony ovirtsdk4 module to recent changes
...ass
+
class ConfigurationType(Enum):
OVA = 'ova'
OVF = 'ovf'
@@ -71,9 +72,8 @@ class Disk(object):
sparse = False,
storage_domains = None
):
- pass
+ self.id = id
- id = "123"
status = DiskStatus.OK
class ImageTransferPhase(Enum):
@@ -104,7 +104,7 @@ class ImageTransfer(object):
):
pass
- id = "456"
+ id = "e26ac8ab-7090-4d5e-95ad-e707b511a359"
phase = ImageTransferPhase.TRANSFERRING
transfer_url = "http://localhost:" + str(imageio_port) + "/"
@...
2018 Sep 20
0
[PATCH v2 3/3] v2v: -o rhv-upload: Add a test.
...+ name = None,
+ description = None,
+ format = None,
+ initial_size = None,
+ provisioned_size = None,
+ sparse = False,
+ storage_domains = None
+ ):
+ pass
+
+ id = 123
+ status = DiskStatus.OK
+
+class ImageTransferPhase(Enum):
+ CANCELLED = 'cancelled'
+ FINALIZING_FAILURE = 'finalizing_failure'
+ FINALIZING_SUCCESS = 'finalizing_success'
+ FINISHED_FAILURE = 'finished_failure'
+ FINISHED_SUCCESS = 'finished_success'
+ INITIALIZING = 'initializing'...
2018 Sep 20
7
[PATCH v2 0/3] v2v: -o rhv-upload: Add a test.
v1 was here:
https://www.redhat.com/archives/libguestfs/2018-September/msg00121.html
v2:
- Rewrote patch 2 from scratch so it incorporates Nir's suggestions.
- Add fake module to EXTRA_DIST.
- Retested.
Unfortunately I am no longer able to test the ordinary conversion path
because ovirtsdk4 is incompatible with Fedora 29 / Python 3.7:
2020 Jan 10
7
[v2v PATCH 0/6] Various Python pycodestyle fixes
Fixes the majority of the pycodestyle issues in the Python scripts, and
fix the existing test-v2v-python-syntax.sh to use pycodestyle to
actually perform style checks.
Pino Toscano (6):
PEP 8: adapt whitespaces in lines
PEP 8: move imports at the top
PEP 8: adapt empty lines
tests: find all the Python scripts for syntax checks
-o rhv-upload: remove unused Python imports
Revamp check
2018 Aug 06
0
Re: [PATCH] v2v: rhv-plugin: Use string literal concatenation
...host with hw_id=%r, "
> + "that belongs to datacenter '%s', "
> "using any host" % (vdsm_id, datacenter.name))
> return None
>
> @@ -193,15 +193,15 @@ def open(readonly):
> if transfer.phase != types.ImageTransferPhase.INITIALIZING:
> break
> if time.time() > endt:
> - raise RuntimeError("timed out waiting for transfer status " +
> + raise RuntimeError("timed out waiting for transfer status "
> "...
2018 Dec 07
0
Re: [PATCH] v2v: -o rhv-upload: Fix upload when using https
...90c4a7f6a9f32c63230c619e38d251
> diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py
> index 1a217b6dc..3272c3ce3 100644
> --- a/v2v/rhv-upload-plugin.py
> +++ b/v2v/rhv-upload-plugin.py
> @@ -193,41 +193,41 @@ def open(readonly):
> if transfer.phase != types.ImageTransferPhase.INITIALIZING:
> break
> if time.time() > endt:
> raise RuntimeError("timed out waiting for transfer status "
> "!= INITIALIZING")
>
> # Now we have permission to start the transfer.
&g...
2018 Sep 19
4
[PATCH 0/3] v2v: -o rhv-upload: Add a test.
This adds a test of -o rhv-upload.
Obviously for an upstream test we cannot require a working oVirt
server. This test works by faking the ovirtsdk4 Python module,
setting PYTHONPATH so that the fake module is picked up instead of the
real module (if installed).
However it's more complex than that because the nbdkit plugin also
expects to talk to a working imageio HTTPS server. Therefore
2018 Dec 07
1
Re: [PATCH] v2v: -o rhv-upload: Fix upload when using https
...> > diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py
> > index 1a217b6dc..3272c3ce3 100644
> > --- a/v2v/rhv-upload-plugin.py
> > +++ b/v2v/rhv-upload-plugin.py
> > @@ -193,41 +193,41 @@ def open(readonly):
> > if transfer.phase != types.ImageTransferPhase.INITIALIZING:
> > break
> > if time.time() > endt:
> > raise RuntimeError("timed out waiting for transfer status "
> > "!= INITIALIZING")
> >
> > # Now we have permissi...
2018 Oct 09
2
Re: [PATCH v2 3/3] v2v: -o rhv-upload: Add a test.
...> + format = None,
> + initial_size = None,
> + provisioned_size = None,
> + sparse = False,
> + storage_domains = None
> + ):
> + pass
> +
> + id = 123
> + status = DiskStatus.OK
> +
> +class ImageTransferPhase(Enum):
> + CANCELLED = 'cancelled'
> + FINALIZING_FAILURE = 'finalizing_failure'
> + FINALIZING_SUCCESS = 'finalizing_success'
> + FINISHED_FAILURE = 'finished_failure'
> + FINISHED_SUCCESS = 'finished_success'
> + INITIALI...