Open jaydabi opened 2 years ago
@jaydabi Thanks for reporting this issue. This is due to the fact that vmware_tag_manager
uses vSphere Automation SDK for Python
to deal with VMware Tag functionality. You need to have requests
version 3.0 or greater as discussed here.
Can you please upgrade requests
version and let us know if this solution works for you? Thanks,
Thanks for getting back so fast, @Akasurde .
As I understand, requests version 3.x is not released yet. I will try your suggestion as soon as the version will be officially released by the maintainer. I will respond to this issue as soon as I tested the new requests version.
For now, I will just add the affected certificate to the ca-certificate store of the container to workaround the issue.
@jaydabi Thanks. I will keep this issue open.
Seeing the same/similar behavior in the vmware_guest_cross_vc_clone as well and have noticed that a few other modules have had or have open issues for various SSL issues.
Is this still an open issue?
From my perspective, it is still open.
The suggested fix is to use requests>=3.0, but this version is still not officially released. Latest release right now is v2.28.2 ( https://github.com/psf/requests/releases )
I really don't understand this. I'm sure I've used the module without any problems on vCenter servers with a self-signed certificate.
And, anyway, to the best of my knowledge the integration tests run with self-signed certificates and validate_certs: false
. But they don't fail.
This is really odd, I don't think I understand the problem.
Hi, I have exactly the same issue.
"msg": "Failed to connect to vCenter or ESXi API at xxx:443 due to SSL verification failure : HTTPSConnectionPool(host='xxx', port=443): Max retries exceeded with url: /api (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)')))",
other modules worked fine to the same endpoint.
Automation SDK Version: vsphere-automation-sdk-python@v8.0.1.0
I just found out, that when the variable REQUESTS_CA_BUNDLE is set, then the task is failing otherwise not. We use this variable to configure our internal CA Certificates. Can you confirm as well, that when "REQUESTS_CA_BUNDLE" is configured the task is ignoring the validate_certs: false.
Thanks, @noesberger - was having this same issue with the vmware_vm_info
module, & updating my REQUESTS_CA_BUNDLE
solved it for me.
For me, this combo works:
environment:
VMWARE_VALIDATE_CERTS: false
REQUESTS_CA_BUNDLE: ''
For me, this combo works:
environment: VMWARE_VALIDATE_CERTS: false REQUESTS_CA_BUNDLE: ''
This works (just REQUESTS_CA_BUNDLE with validate_certs: false
in my case).
This would seem to be an issue with this specific module as none of the other VMware modules that I'm using have this problem. We have REQUESTS_CA_BUNDLE set in our local environment for other ansible plays, however this should not be overriding validate_certs: false
.
SUMMARY
validate_certs: no
is ignored and throwscertificate verify failed
Other modules, like
vmware_guest
andvmware_guest_disk
seem to be unaffected.ISSUE TYPE
COMPONENT NAME
vmware_tag_manager
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Docker Container with python:3.9 based on Debian 11
STEPS TO REPRODUCE
Just add a tag to an existing VM.
EXPECTED RESULTS
Self-signed certificate will be accepted and task will proceed.
ACTUAL RESULTS
Task fails to execute due to
certificate verify failed
error.