search for: disk_service

Displaying 20 results from an estimated 74 matches for "disk_service".

2019 Mar 17
2
Re: [PATCH] v2v: rhv-upload-plugin - improve wait logic after finalize (RHBZ#1680361)
...quot;to finalize") >> + transfer = transfer_service.get() >> + >> + if transfer is None: > > > Are you sure this is possible? the original code assumed that we > fail with sdk.NotFoundError. > >> >> + disk_service = h['disk_service'] >> + disk = disk_service.get() >> + if disk.status == types.DiskStatus.OK: >> + continue > > > If the disk status is OK the upload was finished, so we should break, no? Yes, should f...
2019 Mar 17
2
[PATCH] v2v: rhv-upload-plugin - improve wait logic after finalize (RHBZ#1680361)
...if time.time() > endt: - raise RuntimeError("timed out waiting for transfer " - "to finalize") + transfer = transfer_service.get() + + if transfer is None: + disk_service = h['disk_service'] + disk = disk_service.get() + if disk.status == types.DiskStatus.OK: + continue + + if transfer.phase == types.ImageTransferPhase.FINISHED_SUCCESS: + debug("finalized afte...
2019 Sep 09
3
[PATCH] v2v: rhv-upload-plugin - improve wait logic after finalize
This is a patch which Daniel Erez wrote originally. I have modified it only to fix a small bug in the debug() statement, and Ilanit kindly tested it here: https://bugzilla.redhat.com/show_bug.cgi?id=1680361#c38 Rich.
2019 Mar 17
2
Re: [PATCH v2] v2v: rhv-upload-plugin - improve wait logic after finalize (RHBZ#1680361)
...time.sleep(1) > - tmp = transfer_service.get() > - if time.time() > endt: > - raise RuntimeError("timed out waiting for transfer " > - "to finalize") > + disk_service = h['disk_service'] > We can clean this a little bit by doing this outside of the loop. > + disk = disk_service.get() > + if disk.status == types.DiskStatus.LOCKED: > + if time.time() > start + timeout: > +...
2019 Nov 17
23
[PATCH 00/18] rvh-upload: Various fixes and cleanups
...class rhv-upload: Check status more frequently rhv-upload: Don't flush() in close() rhv-upload: Ensure connection is closed in close() rhv-upload: Ensure http is closed in close() rhv-upload: Fix cleanup after errors rhv-upload: Group oVirt SDK functions rhv-upload: Don't keep disk_service in handle rhv-upload: Extract create_disk() function rhv-upload: Try to remove disk on timeout rhv-upload: Keep disk_id in handle rhv-upload: Don't keep transfer_service in handle rhv-upload: Get host before creating disk rhv-upload: Extract create_transfer() function rhv-upload:...
2019 Sep 09
1
Re: [PATCH] v2v: rhv-upload-plugin - improve wait logic after finalize (RHBZ#1680361)
...time.sleep(1) > - tmp = transfer_service.get() > - if time.time() > endt: > - raise RuntimeError("timed out waiting for transfer " > - "to finalize") > + disk_service = h['disk_service'] > + disk = disk_service.get() > + if disk.status == types.DiskStatus.LOCKED: > + if time.time() > start + timeout: > + raise RuntimeError("timed out waiting for > transfer &quo...
2019 Nov 17
2
Re: [PATCH 06/18] rhv-upload: Fix cleanup after errors
...sfer_service'].pause() > > status = r.status > reason = r.reason > @@ -490,15 +491,10 @@ def flush(h): > > r.read() > > -def delete_disk_on_failure(h): > - transfer_service = h['transfer_service'] > - transfer_service.cancel() > - disk_service = h['disk_service'] > - disk_service.remove() > - > def close(h): > http = h['http'] > connection = h['connection'] > + transfer_service = h['transfer_service'] > > # This is sometimes necessary because python doesn't...
2019 Aug 08
2
Re: [PATCH v3] v2v: rhv-upload-plugin - improve wait logic after finalize (RHBZ#1680361)
...time.sleep(1) > - tmp = transfer_service.get() > - if time.time() > endt: > - raise RuntimeError("timed out waiting for transfer " > - "to finalize") > + disk_service = h['disk_service'] > + disk = disk_service.get() > + if disk.status == types.DiskStatus.LOCKED: > + if time.time() > start + timeout: > + raise RuntimeError("timed out waiting for transfer " &g...
2018 Mar 12
2
[PATCH] v2v: -o rhv-upload: Support zero requests.
Only compile tested. I'm keeping this as a separate patch for the moment until the relevant change on the oVirt side goes upstream. Rich.
2019 Mar 17
0
[PATCH v2] v2v: rhv-upload-plugin - improve wait logic after finalize (RHBZ#1680361)
...while True: time.sleep(1) - tmp = transfer_service.get() - if time.time() > endt: - raise RuntimeError("timed out waiting for transfer " - "to finalize") + disk_service = h['disk_service'] + disk = disk_service.get() + if disk.status == types.DiskStatus.LOCKED: + if time.time() > start + timeout: + raise RuntimeError("timed out waiting for transfer " +...
2019 Mar 18
0
[PATCH v3] v2v: rhv-upload-plugin - improve wait logic after finalize (RHBZ#1680361)
...while True: time.sleep(1) - tmp = transfer_service.get() - if time.time() > endt: - raise RuntimeError("timed out waiting for transfer " - "to finalize") + disk_service = h['disk_service'] + disk = disk_service.get() + if disk.status == types.DiskStatus.LOCKED: + if time.time() > start + timeout: + raise RuntimeError("timed out waiting for transfer " +...
2019 Sep 09
0
[PATCH] v2v: rhv-upload-plugin - improve wait logic after finalize (RHBZ#1680361)
...while True: time.sleep(1) - tmp = transfer_service.get() - if time.time() > endt: - raise RuntimeError("timed out waiting for transfer " - "to finalize") + disk_service = h['disk_service'] + disk = disk_service.get() + if disk.status == types.DiskStatus.LOCKED: + if time.time() > start + timeout: + raise RuntimeError("timed out waiting for transfer " +...
2019 Sep 16
0
[PATCH 8/8] v2v: -o rhv-upload: cancel disk transfer on failure
...n.py b/v2v/rhv-upload-plugin.py index 4d61a089b..57e90484f 100644 --- a/v2v/rhv-upload-plugin.py +++ b/v2v/rhv-upload-plugin.py @@ -485,6 +485,8 @@ def flush(h): r.read() def delete_disk_on_failure(h): + transfer_service = h['transfer_service'] + transfer_service.cancel() disk_service = h['disk_service'] disk_service.remove() -- 2.21.0
2019 Nov 17
0
[PATCH 06/18] rhv-upload: Fix cleanup after errors
...h['failed'] = True - h['transfer_service'].pause() status = r.status reason = r.reason @@ -490,15 +491,10 @@ def flush(h): r.read() -def delete_disk_on_failure(h): - transfer_service = h['transfer_service'] - transfer_service.cancel() - disk_service = h['disk_service'] - disk_service.remove() - def close(h): http = h['http'] connection = h['connection'] + transfer_service = h['transfer_service'] # This is sometimes necessary because python doesn't set up # sys.stderr to be line b...
2019 Mar 17
0
Re: [PATCH] v2v: rhv-upload-plugin - improve wait logic after finalize (RHBZ#1680361)
...- "to finalize") > + transfer = transfer_service.get() > + > + if transfer is None: > Are you sure this is possible? the original code assumed that we fail with sdk.NotFoundError. > + disk_service = h['disk_service'] > + disk = disk_service.get() > + if disk.status == types.DiskStatus.OK: > + continue > If the disk status is OK the upload was finished, so we should break, no? If the disk status is LOCKED, we s...
2018 Jun 25
0
[PATCH] v2v: rvh-upload-plugin: Always read the response
...(offset, count)) + r.read() + def flush(h): http = h['http'] transfer = h['transfer'] @@ -394,6 +405,8 @@ def flush(h): if r.status != 200: request_failed(h, r, "could not flush") + r.read() + def delete_disk_on_failure(h): disk_service = h['disk_service'] disk_service.remove() -- 2.17.1
2019 Nov 18
0
Re: [PATCH 06/18] rhv-upload: Fix cleanup after errors
...tus = r.status > > reason = r.reason > > @@ -490,15 +491,10 @@ def flush(h): > > > > r.read() > > > > -def delete_disk_on_failure(h): > > - transfer_service = h['transfer_service'] > > - transfer_service.cancel() > > - disk_service = h['disk_service'] > > - disk_service.remove() > > - > > def close(h): > > http = h['http'] > > connection = h['connection'] > > + transfer_service = h['transfer_service'] > > > > # This is someti...
2019 Nov 17
2
Re: [PATCH 10/18] rhv-upload: Try to remove disk on timeout
...6 +575,11 @@ def create_disk(connection): > if disk.status == types.DiskStatus.OK: > break > if time.time() > endt: > - raise RuntimeError("timed out waiting for disk to become unlocked") > + try: > + disk_service.remove() > + except Exception as e: > + debug("error removing disk %s: %s" % (disk.id, e)) > + raise RuntimeError( > + "timed out waiting for disk %s to become unlocked" % disk.id) > > return disk > --...
2019 Aug 08
0
Re: [PATCH v3] v2v: rhv-upload-plugin - improve wait logic after finalize (RHBZ#1680361)
...> - tmp = transfer_service.get() > > - if time.time() > endt: > > - raise RuntimeError("timed out waiting for transfer " > > - "to finalize") > > + disk_service = h['disk_service'] > > + disk = disk_service.get() > > + if disk.status == types.DiskStatus.LOCKED: > > + if time.time() > start + timeout: > > + raise RuntimeError("timed out waiting fo...
2018 Mar 22
0
Re: [PATCH v6] v2v: Add -o rhv-upload output mode.
...plugin just follows flush requests issued by the client (ie. qemu-img). qemu-img probably won't issue its own flush request. Should it issue a flush or is that the job of oVirt? > > + # Otherwise if we did fail then we should delete the disk. > > + else: > > + disk_service = h['disk_service'] > > + disk_service.remove() > > > > This should be done only if we created the disk - is this always the case? Yes. If we failed to create a disk, open() fails, and close() is never called. I made all the other changes you suggested, see upco...