search for: destination_url

Displaying 20 results from an estimated 63 matches for "destination_url".

2018 Dec 07
2
[PATCH] v2v: -o rhv-upload: Fix upload when using https
...d to host not supported, " "requires ovirt-engine >= 4.2 and only works " "when virt-v2v is run within the oVirt/RHV " "environment, eg. on an oVirt node.") destination_url = urlparse(transfer.transfer_url) else: destination_url = urlparse(transfer.proxy_url) if destination_url.scheme == "https": context = \ ssl.create_default_context(purpose = ssl.Purpose.SERVER_AUTH, - cafile...
2018 Sep 20
0
[PATCH v2 2/3] v2v: -o rhv-upload: Only set SSL context for https connections.
...+++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py index 5cd6d5cab..1a217b6dc 100644 --- a/v2v/rhv-upload-plugin.py +++ b/v2v/rhv-upload-plugin.py @@ -207,14 +207,25 @@ def open(readonly): else: destination_url = urlparse(transfer.proxy_url) - context = ssl.create_default_context() - context.load_verify_locations(cafile = params['rhv_cafile']) - - http = HTTPSConnection( - destination_url.hostname, - destination_url.port, - context = context - ) + if destinati...
2018 Dec 07
0
Re: [PATCH] v2v: -o rhv-upload: Fix upload when using https
...ted, " > "requires ovirt-engine >= 4.2 and only works " > "when virt-v2v is run within the oVirt/RHV " > "environment, eg. on an oVirt node.") > destination_url = urlparse(transfer.transfer_url) > else: > destination_url = urlparse(transfer.proxy_url) > > if destination_url.scheme == "https": > context = \ > ssl.create_default_context(purpose = ssl.Purpose.SERVER_AUTH, > -...
2018 Dec 07
1
Re: [PATCH] v2v: -o rhv-upload: Fix upload when using https
..."requires ovirt-engine >= 4.2 and only > works " > > "when virt-v2v is run within the > oVirt/RHV " > > "environment, eg. on an oVirt node.") > > destination_url = urlparse(transfer.transfer_url) > > else: > > destination_url = urlparse(transfer.proxy_url) > > > > if destination_url.scheme == "https": > > context = \ > > ssl.create_default_context(purpose = > ssl.Purpo...
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 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:
2019 Nov 18
15
[PATCH v2 00/11] rvh-upload: Various fixes and cleanups
This series extract oVirt SDK and imageio code to make it eaiser to follow the code and improve error handing in open() and close(). Tested with virt-v2v master. Changes since v1: - Rebase on merged patches from v1 - Fix regression introduced by "rhv-upload: Fix cleanup after errors" - Remove "rhv-upload: Try to remove disk on timeout" since it cannot succeed - Add more
2018 Sep 19
1
Re: [PATCH 2/3] v2v: -o rhv-upload: Only set SSL context for https connections.
...nged, 5 insertions(+), 2 deletions(-) > > diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py > index 5cd6d5cab..6e35b5057 100644 > --- a/v2v/rhv-upload-plugin.py > +++ b/v2v/rhv-upload-plugin.py > @@ -207,8 +207,11 @@ def open(readonly): > else: > destination_url = urlparse(transfer.proxy_url) > > - context = ssl.create_default_context() > - context.load_verify_locations(cafile = params['rhv_cafile']) > This line was never needed. In imageio client we use: context = ssl.create_default_context( purpose=ssl.Purpose.SERV...
2018 Jun 29
2
[PATCH] v2v: rhv-upload-plugin: Remove unneeded auth
...# Authentication was needed only for GET and PUT requests when + # communicating with old imageio-proxy. needs_auth = not params['rhv_direct'] + can_flush = False can_trim = False can_zero = False unix_socket = None - http.putrequest("OPTIONS", destination_url.path) - http.putheader("Authorization", transfer.signed_ticket) - http.endheaders() - + http.request("OPTIONS", destination_url.path) r = http.getresponse() data = r.read() @@ -298,7 +299,6 @@ def pread(h, count, offset): transfer = h['transfer'...
2019 Nov 17
23
[PATCH 00/18] rvh-upload: Various fixes and cleanups
This series extract oVirt SDK and imageio code to make it eaiser to follow the code and improve error handing in open() and close(). The first small patches can be consider as fixes for downstream. Tested based on libguestfs v1.41.5, since I had trouble building virt-v2v and libguestfs from master. Nir Soffer (18): rhv-upload: Remove unused exception class rhv-upload: Check status more
2019 Sep 19
2
[PATCH] v2v: -o rhv-upload: cancel disk transfer on open failure
...aise RuntimeError("direct upload to host not supported, " "requires ovirt-engine >= 4.2 and only works " "when virt-v2v is run within the oVirt/RHV " @@ -225,6 +227,7 @@ def open(readonly): destination_url.port, ) else: + transfer_service.cancel() raise RuntimeError("unknown URL scheme (%s)" % destination_url.scheme) # The first request is to fetch the features of the server. @@ -259,6 +262,7 @@ def open(readonly): pass else: + tra...
2018 Sep 19
0
[PATCH 2/3] v2v: -o rhv-upload: Only set SSL context for https connections.
...pload-plugin.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py index 5cd6d5cab..6e35b5057 100644 --- a/v2v/rhv-upload-plugin.py +++ b/v2v/rhv-upload-plugin.py @@ -207,8 +207,11 @@ def open(readonly): else: destination_url = urlparse(transfer.proxy_url) - context = ssl.create_default_context() - context.load_verify_locations(cafile = params['rhv_cafile']) + if destination_url.scheme == "https": + context = ssl.create_default_context() + context.load_verify_locations(cafile =...
2018 Jun 25
1
Re: [PATCH v2 1/2] v2v: -o rhv-upload: Always fetch server options when opening the connection.
...context = context > ) > > + # The first request is to fetch the features of the server. > + needs_auth = not params['rhv_direct'] > + can_flush = False > + can_trim = False > + can_zero = False > + > + http.putrequest("OPTIONS", destination_url.path) > + http.putheader("Authorization", transfer.signed_ticket) + http.endheaders() > + > + r = http.getresponse() > We should read the response data here to make sure we consume the entire response before sending hte nex > + if r.status == 200: > +...
2018 Jun 22
4
v2v: -o rhv-upload: Use Unix domain socket to access imageio (RHBZ#1588088).
v1 was here: https://www.redhat.com/archives/libguestfs/2018-June/msg00099.html v2: - Just fixes the two problems noted in the review of the previous version. Rich.
2018 Aug 05
3
[PATCH] v2v: rhv-plugin: Use string literal concatenation
...d to host not supported, " + "requires ovirt-engine >= 4.2 and only works " + "when virt-v2v is run within the oVirt/RHV " "environment, eg. on an oVirt node.") destination_url = urlparse(transfer.transfer_url) else: @@ -511,7 +511,7 @@ def close(h): time.sleep(1) tmp = transfer_service.get() if time.time() > endt: - raise RuntimeError("timed out waiting for transfer " + +...
2018 Feb 22
0
[PATCH 5/5] v2v: Add -o rhv-upload output mode.
...er. +while transfer.phase == types.ImageTransferPhase.INITIALIZING: + time.sleep(1) + transfer = transfer_service.get() + +if %s: + if transfer.transfer_url is None: + print(\"Direct upload to host not supported, requires ovirt-engine >= 4.2\") + sys.exit(1) + destination_url = urlparse(transfer.transfer_url) +else: + destination_url = urlparse(transfer.proxy_url) + +context = ssl.create_default_context() +context.load_verify_locations(cafile = %s) + +proxy_connection = HTTPSConnection( + destination_url.hostname, + destination_url.port, + context = context...
2018 Jun 29
0
Re: [PATCH] v2v: rhv-upload-plugin: Remove unneeded auth
...and PUT requests when > + # communicating with old imageio-proxy. > needs_auth = not params['rhv_direct'] > + > can_flush = False > can_trim = False > can_zero = False > unix_socket = None > > - http.putrequest("OPTIONS", destination_url.path) > - http.putheader("Authorization", transfer.signed_ticket) > - http.endheaders() > - > + http.request("OPTIONS", destination_url.path) > r = http.getresponse() > data = r.read() > > @@ -298,7 +299,6 @@ def pread(h, count, offse...
2018 Feb 27
0
[PATCH v2 3/3] v2v: Add -o rhv-upload output mode.
...r transfer status != INITIALIZING\") + +if %s: + if transfer.transfer_url is None: + raise RuntimeError(\"Direct upload to host not supported, requires ovirt-engine >= 4.2 and only works when virt-v2v is run within the oVirt/RHV environment, eg. on an ovirt node.\") + destination_url = urlparse(transfer.transfer_url) +else: + destination_url = urlparse(transfer.proxy_url) + +context = ssl.create_default_context() +context.load_verify_locations(cafile = %s) + +proxy_connection = HTTPSConnection( + destination_url.hostname, + destination_url.port, + context = context...
2018 Jun 21
0
[PATCH 1/2] v2v: -o rhv-upload: Always fetch server options when opening the connection.
...65,63 +165,60 @@ def open(readonly): context = context ) + # The first request is to fetch the features of the server. + needs_auth = not params['rhv_direct'] + can_flush = False + can_trim = False + can_zero = False + + http.putrequest("OPTIONS", destination_url.path) + http.putheader("Authorization", transfer.signed_ticket) + http.endheaders() + + r = http.getresponse() + if r.status == 200: + # New imageio never needs authentication. + needs_auth = False + + j = json.loads(r.read()) + can_flush = "fl...
2018 Jun 22
0
[PATCH v2 1/2] v2v: -o rhv-upload: Always fetch server options when opening the connection.
...65,63 +165,60 @@ def open(readonly): context = context ) + # The first request is to fetch the features of the server. + needs_auth = not params['rhv_direct'] + can_flush = False + can_trim = False + can_zero = False + + http.putrequest("OPTIONS", destination_url.path) + http.putheader("Authorization", transfer.signed_ticket) + http.endheaders() + + r = http.getresponse() + if r.status == 200: + # New imageio never needs authentication. + needs_auth = False + + j = json.loads(r.read()) + can_flush = "fl...