Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: Compatability issues with RHEL 8 targets after update to SemaphoreUI version 2.11.2 - Problem could be related to ansible version in Semaphore #2684

Open
dwedia opened this issue Jan 9, 2025 · 4 comments
Assignees
Milestone

Comments

@dwedia
Copy link

dwedia commented Jan 9, 2025

Issue

After updating SemaphoreUI from V2.10.43 to V2.11.2. I can no longer run ansible playbooks against RHEL 8 targets.

The error I get is this:

fatal: [extest0078.it.rm.dk]: FAILED! => {"ansible_facts": {}, "changed": false, "failed_modules": {"ansible.legacy.setup": {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python3"}, "exception": "Traceback (most recent call last):\r\n  File \"/home/ansibletest/.ansible/tmp/ansible-tmp-1736414213.090755-84-188723330247733/AnsiballZ_setup.py\", line 107, in <module>\r\n    _ansiballz_main()\r\n  File \"/home/ansibletest/.ansible/tmp/ansible-tmp-1736414213.090755-84-188723330247733/AnsiballZ_setup.py\", line 99, in _ansiballz_main\r\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n  File \"/home/ansibletest/.ansible/tmp/ansible-tmp-1736414213.090755-84-188723330247733/AnsiballZ_setup.py\", line 44, in invoke_module\r\n    from ansible.module_utils import basic\r\n  File \"<frozen importlib._bootstrap>\", line 971, in _find_and_load\r\n  File \"<frozen importlib._bootstrap>\", line 951, in _find_and_load_unlocked\r\n  File \"<frozen importlib._bootstrap>\", line 894, in _find_spec\r\n  File \"<frozen importlib._bootstrap_external>\", line 1157, in find_spec\r\n  File \"<frozen importlib._bootstrap_external>\", line 1131, in _get_spec\r\n  File \"<frozen importlib._bootstrap_external>\", line 1112, in _legacy_get_spec\r\n  File \"<frozen importlib._bootstrap>\", line 441, in spec_from_loader\r\n  File \"<frozen importlib._bootstrap_external>\", line 544, in spec_from_file_location\r\n  File \"/tmp/ansible_ansible.legacy.setup_payload_6k7io3wb/ansible_ansible.legacy.setup_payload.zip/ansible/module_utils/basic.py\", line 5\r\nSyntaxError: future feature annotations is not defined\r\n", "failed": true, "module_stderr": "Shared connection to extest0078.it.rm.dk closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n  File \"/home/ansibletest/.ansible/tmp/ansible-tmp-1736414213.090755-84-188723330247733/AnsiballZ_setup.py\", line 107, in <module>\r\n    _ansiballz_main()\r\n  File \"/home/ansibletest/.ansible/tmp/ansible-tmp-1736414213.090755-84-188723330247733/AnsiballZ_setup.py\", line 99, in _ansiballz_main\r\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n  File \"/home/ansibletest/.ansible/tmp/ansible-tmp-1736414213.090755-84-188723330247733/AnsiballZ_setup.py\", line 44, in invoke_module\r\n    from ansible.module_utils import basic\r\n  File \"<frozen importlib._bootstrap>\", line 971, in _find_and_load\r\n  File \"<frozen importlib._bootstrap>\", line 951, in _find_and_load_unlocked\r\n  File \"<frozen importlib._bootstrap>\", line 894, in _find_spec\r\n  File \"<frozen importlib._bootstrap_external>\", line 1157, in find_spec\r\n  File \"<frozen importlib._bootstrap_external>\", line 1131, in _get_spec\r\n  File \"<frozen importlib._bootstrap_external>\", line 1112, in _legacy_get_spec\r\n  File \"<frozen importlib._bootstrap>\", line 441, in spec_from_loader\r\n  File \"<frozen importlib._bootstrap_external>\", line 544, in spec_from_file_location\r\n  File \"/tmp/ansible_ansible.legacy.setup_payload_6k7io3wb/ansible_ansible.legacy.setup_payload.zip/ansible/module_utils/basic.py\", line 5\r\nSyntaxError: future feature annotations is not defined\r\n", "msg": "MODULE FAILURE: No start of json char found\nSee stdout/stderr for the exact error", "rc": 1}}, "msg": "The following modules failed to execute: ansible.legacy.setup\n"}

Impact

Ansible (task execution), Docker

Installation method

Docker

Database

Postgres

Browser

Firefox

Semaphore Version

v2.11.2-0e9490c-1735214878

Ansible Version

ansible [core 2.18.1]
  config file = /tmp/semaphore/repository_1_117/ansible.cfg
  configured module search path = ['/tmp/semaphore/repository_1_117/library']
  ansible python module location = /opt/semaphore/apps/ansible/11.1.0/venv/lib/python3.11/site-packages/ansible
  ansible collection location = /tmp/semaphore/repository_1_117/collections
  executable location = /opt/semaphore/apps/ansible/11.1.0/venv/bin/ansible
  python version = 3.11.11 (main, Dec  6 2024, 11:15:21) [GCC 13.2.1 20231014] (/opt/semaphore/apps/ansible/11.1.0/venv/bin/python3)
  jinja version = 3.1.5
  libyaml = True

Logs & errors

fatal: [extest0078.it.rm.dk]: FAILED! => {"ansible_facts": {}, "changed": false, "failed_modules": {"ansible.legacy.setup": {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python3"}, "exception": "Traceback (most recent call last):\r\n File "/home/ansibletest/.ansible/tmp/ansible-tmp-1736414213.090755-84-188723330247733/AnsiballZ_setup.py", line 107, in \r\n _ansiballz_main()\r\n File "/home/ansibletest/.ansible/tmp/ansible-tmp-1736414213.090755-84-188723330247733/AnsiballZ_setup.py", line 99, in _ansiballz_main\r\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n File "/home/ansibletest/.ansible/tmp/ansible-tmp-1736414213.090755-84-188723330247733/AnsiballZ_setup.py", line 44, in invoke_module\r\n from ansible.module_utils import basic\r\n File "", line 971, in _find_and_load\r\n File "", line 951, in _find_and_load_unlocked\r\n File "", line 894, in _find_spec\r\n File "", line 1157, in find_spec\r\n File "", line 1131, in _get_spec\r\n File "", line 1112, in _legacy_get_spec\r\n File "", line 441, in spec_from_loader\r\n File "", line 544, in spec_from_file_location\r\n File "/tmp/ansible_ansible.legacy.setup_payload_6k7io3wb/ansible_ansible.legacy.setup_payload.zip/ansible/module_utils/basic.py", line 5\r\nSyntaxError: future feature annotations is not defined\r\n", "failed": true, "module_stderr": "Shared connection to extest0078.it.rm.dk closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n File "/home/ansibletest/.ansible/tmp/ansible-tmp-1736414213.090755-84-188723330247733/AnsiballZ_setup.py", line 107, in \r\n _ansiballz_main()\r\n File "/home/ansibletest/.ansible/tmp/ansible-tmp-1736414213.090755-84-188723330247733/AnsiballZ_setup.py", line 99, in _ansiballz_main\r\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n File "/home/ansibletest/.ansible/tmp/ansible-tmp-1736414213.090755-84-188723330247733/AnsiballZ_setup.py", line 44, in invoke_module\r\n from ansible.module_utils import basic\r\n File "", line 971, in _find_and_load\r\n File "", line 951, in _find_and_load_unlocked\r\n File "", line 894, in _find_spec\r\n File "", line 1157, in find_spec\r\n File "", line 1131, in _get_spec\r\n File "", line 1112, in _legacy_get_spec\r\n File "", line 441, in spec_from_loader\r\n File "", line 544, in spec_from_file_location\r\n File "/tmp/ansible_ansible.legacy.setup_payload_6k7io3wb/ansible_ansible.legacy.setup_payload.zip/ansible/module_utils/basic.py", line 5\r\nSyntaxError: future feature annotations is not defined\r\n", "msg": "MODULE FAILURE: No start of json char found\nSee stdout/stderr for the exact error", "rc": 1}}, "msg": "The following modules failed to execute: ansible.legacy.setup\n"}

Manual installation - system information

No response

Configuration

config.json

{
 	"mysql": {
 		"host": "",
 		"user": "",
 		"pass": "",
 		"name": "",
 		"options": null
 	},
 	"bolt": {
 		"host": "",
 		"user": "",
 		"pass": "",
 		"name": "",
 		"options": null
 	},
 	"postgres": {
 		"host": "postgres:5432",
 		"user": "<---OMMITED--->",
 		"pass": "<---OMMITED--->",
 		"name": "semaphore",
 		"options": {
 			"sslmode": "disable"
 		}
 	},
 	"dialect": "postgres",
 	"port": "",
 	"interface": "",
 	"tmp_path": "/tmp/semaphore",
 	"ssh_config_path": "",
 	"git_client": "",
 	"web_host": "",
 	"cookie_hash": "<---OMMITED--->",
 	"cookie_encryption": "<---OMMITED--->",
 	"access_key_encryption": "<---OMMITED--->",
 	"email_alert": false,
 	"email_sender": "",
 	"email_host": "",
 	"email_port": "",

Additional information

This leads me to believe that it might be a problem with the ansible version in Semaphore, no longer supporting the Python version in RHEL8, which is Python 3.6.8.

Would it be possible to release a version of SemaphoreUI that still supports RHEL 8, or will i effectively be "locked" to SemaphoreUI V2.10.43 untill I no longer have any RHEL 8 systems in my invironment?

@PopC0rnwalk
Copy link

Take a look to #2682, you can create a custom image to downgrade the ansible version to 2.16 to continue targeting RHEL8 based devices.

There is also a comment frombbaassssiiee https://github.com/semaphoreui/semaphore/issues/2682#issuecomment-2578519411 to use collections and requirenments, I have not checked that yet since I target different OSs in the same playbook..

@fiftin fiftin added the bug label Jan 10, 2025
@fiftin fiftin self-assigned this Jan 10, 2025
@sycofly
Copy link

sycofly commented Jan 15, 2025

what python version are on the target RHEL8 servers?
I'm using v2.10.35 but it failed against RHEL8 python3.6 servers which worked for months
I upgraded target RHEL8 python from 3.6 to 3.8 and now operational again

@fiftin fiftin added this to Bugfixing Jan 15, 2025
@fiftin fiftin added this to the 2.11 milestone Jan 15, 2025
@dwedia
Copy link
Author

dwedia commented Jan 24, 2025

what python version are on the target RHEL8 servers? I'm using v2.10.35 but it failed against RHEL8 python3.6 servers which worked for months I upgraded target RHEL8 python from 3.6 to 3.8 and now operational again

On RHEL 7.6 - 7.9 the Python version is 2.7.5

On RHEL 8.7 - 8.10 the python version is 3.6.8

On RHEL 9.4 the Python version is 3.9.18

On RHEL 9.5 the Python version is 3.9.21

We run all these RHEL versions in our environment, and expect to run Ansible against them all. Preferably in SemaphoreUI.

I know we could perhaps just upgrade the python version on some of them, but we really do not want to do that...

@fiftin
Copy link
Collaborator

fiftin commented Jan 24, 2025

Hi @dwedia I understand this. I thinking what to do with this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

4 participants