ansible / awx-ee

An Ansible execution environment for AWX project
https://quay.io/ansible/awx-ee
Other
132 stars 158 forks source link

Projects git sync fails #116

Closed guliaka closed 2 years ago

guliaka commented 2 years ago

Started today on all projects sync fails with error: ERROR! Unexpected Exception, this is probably a bug: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'

Full trace:

Traceback (most recent call last): File "/usr/local/bin/ansible-galaxy", line 97, in <module> mycli = getattr(import("ansible.cli.%s" % sub, fromlist=[myclass]), myclass) File "/usr/local/lib/python3.8/site-packages/ansible/cli/galaxy.py", line 24, in <module> from ansible.galaxy.api import GalaxyAPI File "/usr/local/lib/python3.8/site-packages/ansible/galaxy/api.py", line 28, in <module> from ansible.module_utils.urls import open_url, prepare_multipart File "/usr/local/lib/python3.8/site-packages/ansible/module_utils/urls.py", line 115, in <module> from urllib3.contrib.pyopenssl import PyOpenSSLContext File "/usr/lib/python3.8/site-packages/urllib3/contrib/pyopenssl.py", line 46, in <module> import OpenSSL.SSL File "/usr/local/lib/python3.8/site-packages/OpenSSL/init.py", line 8, in <module> from OpenSSL import crypto, SSL File "/usr/local/lib/python3.8/site-packages/OpenSSL/crypto.py", line 1517, in <module> class X509StoreFlags(object): File "/usr/local/lib/python3.8/site-packages/OpenSSL/crypto.py", line 1537, in X509StoreFlags CB_ISSUER_CHECK = _lib.X509_V_FLAG_CB_ISSUER_CHECK AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'

guliaka commented 2 years ago

I guess it fails in same spot as #115 and #112

fegmorte commented 2 years ago

@guliaka If you use awx-operator, you can change the awx-ee version under AWX Administration menu --> Execution environment and replace quay.io/ansible/awx-ee:latest by quay.io/ansible/awx-ee:0.6.0. That works for me as a workaround.

guliaka commented 2 years ago

@fegmorte Did not work for me:

Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/ansible_runner/main.py", line 861, in main res = run(run_options) File "/usr/local/lib/python3.8/site-packages/ansible_runner/interface.py", line 257, in run r.run() File "/usr/local/lib/python3.8/site-packages/ansible_runner/streaming.py", line 128, in run r = ansible_runner.interface.run(self.kwargs) File "/usr/local/lib/python3.8/site-packages/ansible_runner/interface.py", line 256, in run r = init_runner(kwargs) File "/usr/local/lib/python3.8/site-packages/ansible_runner/interface.py", line 118, in init_runner rc = RunnerConfig(kwargs) File "/usr/local/lib/python3.8/site-packages/ansible_runner/config/runner.py", line 78, in init super(RunnerConfig, self).init(private_data_dir, **kwargs) TypeError: init() got an unexpected keyword argument 'suppress_env_files'

This can be caused if the version of ansible-runner in your execution environment is out of date.

fegmorte commented 2 years ago

@guliaka finally the latest version works again for me. Do you try it again ? A build happens every 12h.

eselvam commented 2 years ago

Yes. we also got same error: awx AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK

as we used custom Ee to over come this. shall we know when we can expect AWX EE to be patched to fix this?

fegmorte commented 2 years ago

@eselvam it seems the issue comes from cryptography 37.0.0 Not Compatible with pyOpenSSL

I retried with the latest build and it works again for me

guliaka commented 2 years ago

Latest build seems work. Pulling it to my local registry and pinning it in my config for now.