Description of problem: Upload / download disk with python sdk on IPv6 host fails: # python3 /usr/share/doc/python3-ovirt-engine-sdk4/examples/upload_disk.py --engine-url https://<engine> --username admin@internal --disk-format qcow2 --disk-sparse --sd-name iscsi_1 -c <cer_file>.cer download_test.img Checking image... Image format: qcow2 Disk format: cow Disk content type: data Disk provisioned size: 1073741824 Disk initial size: 1074135040 Disk name: download_test.qcow2 Disk backup: False Connecting... Password: Creating disk... Traceback (most recent call last): File "/usr/lib64/python3.6/site-packages/ovirtsdk4/__init__.py", line 382, in authenticate self._sso_token = self._get_access_token() File "/usr/lib64/python3.6/site-packages/ovirtsdk4/__init__.py", line 618, in _get_access_token sso_response = self._get_sso_response(self._sso_url, post_data) File "/usr/lib64/python3.6/site-packages/ovirtsdk4/__init__.py", line 695, in _get_sso_response curl.perform() pycurl.error: (7, '') During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/share/doc/python3-ovirt-engine-sdk4/examples/upload_disk.py", line 262, in <module> name=args.sd_name File "/usr/lib64/python3.6/site-packages/ovirtsdk4/services.py", line 7697, in add return self._internal_add(disk, headers, query, wait) File "/usr/lib64/python3.6/site-packages/ovirtsdk4/service.py", line 223, in _internal_add context = self._connection.send(request) File "/usr/lib64/python3.6/site-packages/ovirtsdk4/__init__.py", line 371, in send return self.__send(request) File "/usr/lib64/python3.6/site-packages/ovirtsdk4/__init__.py", line 389, in __send self.authenticate() File "/usr/lib64/python3.6/site-packages/ovirtsdk4/__init__.py", line 385, in authenticate self.__parse_error(e) File "/usr/lib64/python3.6/site-packages/ovirtsdk4/__init__.py", line 933, in __parse_error six.reraise(clazz, clazz(error_msg), sys.exc_info()[2]) File "/usr/lib/python3.6/site-packages/six.py", line 674, in reraise raise value.with_traceback(tb) File "/usr/lib64/python3.6/site-packages/ovirtsdk4/__init__.py", line 382, in authenticate self._sso_token = self._get_access_token() File "/usr/lib64/python3.6/site-packages/ovirtsdk4/__init__.py", line 618, in _get_access_token sso_response = self._get_sso_response(self._sso_url, post_data) File "/usr/lib64/python3.6/site-packages/ovirtsdk4/__init__.py", line 695, in _get_sso_response curl.perform() ovirtsdk4.ConnectionError: Error while sending HTTP request: (7, '') # python3 /usr/share/doc/python3-ovirt-engine-sdk4/examples/download_disk.py --engine-url https://<engine> --username admin@internal -c <ser_file>.cer 8d6dc862-f578-41bc-9160-8193800ecd59 download.img Connecting... Password: Traceback (most recent call last): File "/usr/lib64/python3.6/site-packages/ovirtsdk4/__init__.py", line 382, in authenticate self._sso_token = self._get_access_token() File "/usr/lib64/python3.6/site-packages/ovirtsdk4/__init__.py", line 618, in _get_access_token sso_response = self._get_sso_response(self._sso_url, post_data) File "/usr/lib64/python3.6/site-packages/ovirtsdk4/__init__.py", line 695, in _get_sso_response curl.perform() pycurl.error: (7, '') During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/share/doc/python3-ovirt-engine-sdk4/examples/download_disk.py", line 150, in <module> disk = disk_service.get() File "/usr/lib64/python3.6/site-packages/ovirtsdk4/services.py", line 38498, in get return self._internal_get(headers, query, wait) File "/usr/lib64/python3.6/site-packages/ovirtsdk4/service.py", line 202, in _internal_get context = self._connection.send(request) File "/usr/lib64/python3.6/site-packages/ovirtsdk4/__init__.py", line 371, in send return self.__send(request) File "/usr/lib64/python3.6/site-packages/ovirtsdk4/__init__.py", line 389, in __send self.authenticate() File "/usr/lib64/python3.6/site-packages/ovirtsdk4/__init__.py", line 385, in authenticate self.__parse_error(e) File "/usr/lib64/python3.6/site-packages/ovirtsdk4/__init__.py", line 933, in __parse_error six.reraise(clazz, clazz(error_msg), sys.exc_info()[2]) File "/usr/lib/python3.6/site-packages/six.py", line 674, in reraise raise value.with_traceback(tb) File "/usr/lib64/python3.6/site-packages/ovirtsdk4/__init__.py", line 382, in authenticate self._sso_token = self._get_access_token() File "/usr/lib64/python3.6/site-packages/ovirtsdk4/__init__.py", line 618, in _get_access_token sso_response = self._get_sso_response(self._sso_url, post_data) File "/usr/lib64/python3.6/site-packages/ovirtsdk4/__init__.py", line 695, in _get_sso_response curl.perform() ovirtsdk4.ConnectionError: Error while sending HTTP request: (7, '') Version-Release number of selected component (if applicable): python3-ovirt-engine-sdk4-4.4.4-1.el8ev.x86_64 How reproducible: Have only one IPv6 host - always reproduces there. On IPv4 host on the same env, the same upload and download work. Steps to Reproduce: 1.Run upload_disk.py / download_disk.py on IPv6 host. Actual results: Operation fails Expected results: Operation succeeded. Additional info:
This SDK issue is blocking IPv6 RFE bug 1805267, setting severity to high.
Created attachment 1700735 [details] Logs vdsm-4.40.22-1.el8ev.x86_64 engine-4.4.1.8-0.7.el8ev ovirt-imageio-client-2.0.9-1.el8ev.x86_64
Can you describe the tested environment? What do you mean by "IPv6 host"? Is this host have only ipv6? If this host has only ipv6, do we have ipv6 address on the engine and hosts (e.g. dual-stack)? I think running this on all hosts in the setup will make the issue more clear: ip addr Can you access engine or host using curl from "IPv6 host"? Here are few commands you can try in your environment: $ curl -i -k https://engine3/ovirt-engine/ HTTP/1.1 302 Found Date: Sun, 12 Jul 2020 17:14:05 GMT Server: Apache/2.4.37 (centos) OpenSSL/1.1.1c mod_wsgi/4.6.4 Python/3.6 Set-Cookie: JSESSIONID=SkNm29MUGg-iIRZhGQozZTVNaGtoxEz8Eq25bdr5.engine3; path=/ovirt-engine; secure; HttpOnly Set-Cookie: locale=en_US; path=/; secure; HttpOnly; Max-Age=2147483647; Expires=Fri, 30-Jul-2088 20:28:12 GMT X-XSS-PROTECTION: 1; MODE=BLOCK X-CONTENT-TYPE-OPTIONS: NOSNIFF X-FRAME-OPTIONS: SAMEORIGIN Location: https://engine3/ovirt-engine/login?scope=ovirt-ext%3Dauth%3Aidentity Content-Length: 0 $ curl -k -X OPTIONS https://host4:54322/images/* {"unix_socket": "\u0000/org/ovirt/imageio", "features": ["extents", "zero", "flush"]} If you cannot access engine and host using other tools this is not sdk issue but bad configuration that cannot work.
after clarification please either close or add more information.
Talked to Michael, there is no configuration error on the host. If it matters, the host is RHVH. Let me know if you need more information.
Martin, do you think this a real bug or we can close this? See the discussion starting at comment 7.
(In reply to Nir Soffer from comment #12) > Martin, do you think this a real bug or we can close this? > See the discussion starting at comment 7. I talked to Michael B. and there was connectivity/ping from host -> engine in IPv6. The issue was DNS IPV6 resolution was not available on the engine so the host did not reach it. Can we change the SDK script to use IPv6 directly to avoid this issue and see the script works (host IPv6 -> Engine has IPv6 but not resolved in DNS)?
(In reply to Avihai from comment #13) > (In reply to Nir Soffer from comment #12) > > Martin, do you think this a real bug or we can close this? > > See the discussion starting at comment 7. ... > Can we change the SDK script to use IPv6 directly to avoid this issue and > see the script works (host IPv6 -> Engine has IPv6 but not resolved in DNS)? I don't think so. The SDK must use the DNS name to enable certificate verification, but infra folks should answer this.