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

socket_path must be a value #7

Open
benomary opened this issue Jun 6, 2024 · 4 comments
Open

socket_path must be a value #7

benomary opened this issue Jun 6, 2024 · 4 comments

Comments

@benomary
Copy link

benomary commented Jun 6, 2024

COMPONENT NAME

f5networks.f5os.f5os_config_backup

Environment

ANSIBLE VERSION
ansible 6.7.0
ansible-core 2.13.13
F5OS VERSION
1.7.0-8741
CONFIGURATION
[defaults]
interpreter_python = /usr/bin/env python
forks = 10
host_key_checking = False
gathering = smart
error_on_undefined_vars = True
callbacks_enabled = timer, profile_roles, profile_tasks
retry_files_enabled = False
timeout = 120
OS / ENVIRONMENT
RHEL 7.9
SUMMARY

I m trying to play with this f5os module to backup and export my host configuration. I had an issue using API call and I saw that it was prefered to used ansible.
https://community.f5.com/discussions/technicalforum/f5os-api-for-downloading-files-not-working-as-expected/315598

So when I run my playbook i have error saying : socket_path must be a value

STEPS TO REPRODUCE
- name: Create backup config and import it to remote server
  vars:
    ansible_host: "{{ f5_backup_host }}"
    ansible_httpapi_password: "{{ f5_backup_password }}"
    ansible_httpapi_port: "8888" #i also tried 443
    ansible_network_os: f5networks.f5_bigip.bigip
    ansible_httpapi_use_ssl: yes
    ansible_httpapi_validate_certs: "{{ f5_backup_validate_certs }}"
  f5networks.f5os.f5os_config_backup:
    name: test_backup.xml
    state: absent
EXPECTED RESULTS

To delete test_backup.xml from f5os host

ACTUAL RESULTS
The full traceback is:
Traceback (most recent call last):
  File "/home/user/.ansible/tmp/ansible-tmp-1717688947.7444158-34053-207442020276603/AnsiballZ_f5os_config_backup.py", line 107, in <module>
    _ansiballz_main()
  File "/home/user/.ansible/tmp/ansible-tmp-1717688947.7444158-34053-207442020276603/AnsiballZ_f5os_config_backup.py", line 99, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File "/home/user/.ansible/tmp/ansible-tmp-1717688947.7444158-34053-207442020276603/AnsiballZ_f5os_config_backup.py", line 47, in invoke_module
    runpy.run_module(mod_name='ansible_collections.f5networks.f5os.plugins.modules.f5os_config_backup', init_globals=dict(_module_fqn='ansible_collections.f5networks.f5os.plugins.modules.f5os_config_backup', _modlib_path=modlib_path),
  File "/opt/rh/rh-python38/root/usr/lib64/python3.8/runpy.py", line 207, in run_module
    return _run_module_code(code, init_globals, run_name, mod_spec)
  File "/opt/rh/rh-python38/root/usr/lib64/python3.8/runpy.py", line 97, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "/opt/rh/rh-python38/root/usr/lib64/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/tmp/ansible_f5networks.f5os.f5os_config_backup_payload_vbowxqpd/ansible_f5networks.f5os.f5os_config_backup_payload.zip/ansible_collections/f5networks/f5os/plugins/modules/f5os_config_backup.py", line 441, in <module>
  File "/tmp/ansible_f5networks.f5os.f5os_config_backup_payload_vbowxqpd/ansible_f5networks.f5os.f5os_config_backup_payload.zip/ansible_collections/f5networks/f5os/plugins/modules/f5os_config_backup.py", line 433, in main
  File "/tmp/ansible_f5networks.f5os.f5os_config_backup_payload_vbowxqpd/ansible_f5networks.f5os.f5os_config_backup_payload.zip/ansible/module_utils/connection.py", line 124, in __init__
AssertionError: socket_path must be a value
@benomary benomary added the bug Something isn't working label Jun 6, 2024
@wojtek0806
Copy link
Contributor

Hello, looks like you are using old version of python and unsupported version of ansible, please upgrade to at least ansible core 2.14:
https://github.com/F5Networks/f5-ansible-f5os?tab=readme-ov-file#requirements

Also you need at least python 3.9 as well:
https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#ansible-core-support-matrix

While 3.9 is the minimal version I would recommend to go to version 3.11 of python in your environment.

@pgouband pgouband removed the bug Something isn't working label Aug 26, 2024
@benomary
Copy link
Author

benomary commented Aug 29, 2024

Now I m trying with ansible-core 2.15.7 and python 3.9 and i still get the same error message : socket_path must be a value.
I will try with 3.11 but at the moment 3.9 is the max i can reach

@benomary
Copy link
Author

Found, you should add

ansible_connection: httpapi
ansible_network_os: f5networks.f5os.f5os

Maybe you should fix your README and replace this line
ansible_network_os: f5networks.f5_bigip.bigip
by
ansible_network_os: f5networks.f5os.f5os

@pgouband
Copy link

Hi

Thanks for reporting it.
Documentation will be updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants