Closed apellini closed 3 months ago
Hi @apellini,
We did a test on Velos and rSeries without any problem. It's maybe something related to your environment.
I not agree because API Auth seems working:
Correct user: {'ietf-restconf:errors': {'error': [{'error-type': 'application', 'error-tag': 'invalid-value', 'error-message': 'uri keypath not found'}]}}
Wrong user: {'ietf-restconf:errors': {'error': [{'error-type': 'protocol', 'error-tag': 'access-denied'}]}}
But seems that rSeries not support API Call.
Hi @apellini,
Unfortunately, we tried to reproduce your issue but we are not able to do it. So could be something related to the device, the device configuration or your environment. If you want to go forward, I suggest you open a ticket via https://my.f5.com
@pgouband -- I am confirming what @apellini found. This is MOST DEFINITELY a bug.
TASK [Move tenant f5-r5900-prod-a to configured state] *************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ansible.module_utils.connection.ConnectionError: {'ietf-restconf:errors': {'error': [{'error-type': 'application', 'error-tag': 'invalid-value', 'error-message': 'uri keypath not found'}]}}
When I force the collection to v1.4.0, everything works, and if I go above to v1.5.0 or v1.6.0 it blows up. We are using F5OS 1.5.0-5781.
I can also confirm that the REST API authentication is working and responding with the correct credentials and fails with the wrong credentials.
INCORRECT CREDENTIALS:
curl -k -X GET -H "Accept: application/yang-data+json" -u admin:admin https://localhost:8888/restconf//data/openconfig-platform:components/component=platform/state
{ "ietf-restconf:errors": { "error": [ { "error-type": "protocol", "error-tag": "access-denied" } ] }}
CORRECT CREDENTIALS:
curl -k -X GET -H "Accept: application/yang-data+json" -u admin:***** https://localhost:8888/restconf//data/openconfig-platform:components/component=platform/state
{ "openconfig-platform:state": {"description": "r5900", "serial-no.... } }
I am confirming what @apellini found. This is MOST DEFINITELY a bug.
TASK [Move tenant f5-r5900-prod-a to configured state] ************************* An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ansible.module_utils.connection.ConnectionError: {'ietf-restconf:errors': {'error': [{'error-type': 'application', 'error-tag': 'invalid-value', 'error-message': 'uri keypath not found'}]}}
When I force the collection to v1.4.0, everything works, and if I go above to v1.5.0 or v1.6.0 it blows up. We are using F5OS 1.5.0-5781.
I can also confirm that the REST API authentication is working and responding with the correct credentials and fails with the wrong credentials.
INCORRECT CREDENTIALS:
curl -k -X GET -H "Accept: application/yang-data+json" -u admin:admin https://localhost:8888/restconf//data/openconfig-platform:components/component=platform/state { "ietf-restconf:errors": { "error": [ { "error-type": "protocol", "error-tag": "access-denied" } ] }}
CORRECT CREDENTIALS:
curl -k -X GET -H "Accept: application/yang-data+json" -u admin:***** https://localhost:8888/restconf//data/openconfig-platform:components/component=platform/state { "openconfig-platform:state": { "description": "r5900", "serial-no.... } }
Hi My name is Marlon Frank and I am a solutions engineer at F5. I was troubleshooting this with @jewettg today. I can confirm that there is a change in the way the API is accessed from 1.4.0 to 1.5.0 on our git repository.....our tcpdump showed us that....
@apellini - what version of F5OS are you using? I have two appliances, and I debating if I should try to upgrade one of them to the latest F5OS 1.7.0 and see if the f5os_tenant call works. This would confirm if it was a change in the Ansible plugin-code .. or a change in F5OS that causes the the Ansible play to fail.
Neither (but soon) appliances are production.. but I want to ensure this is fixed before I moved forward. We are migrating from really old equipment to the new r5900s.
For now we have these F5OS versions:
Product Name: rSeries 2800 Base OS Version: 1.3.2-13054 Service Version: 1.3.2-13054
I think that I need to upgrade on what version I have to go to be compliant?
Update: I have done some test with 1.4.0 collection and it works.
To add to this issue I'm seeing a similar problem when using the f5os_tenant_image
module running F5OS version 1.5.1 on r5900.
Tested both collection versions 1.5.0 and 1.6.0 seeing the exact same result, while 1.4.0 seems to be working correctly.
I met the same issue, too. my collection version is 1.6.0, F5OS version is 1.5.1 (r4600)
Hi,
Thanks for reporting. Added to the backlog and internal tracking ID for this request is: INFRAANO-1505.
Hi,
I have a customer who experienced the same issue with: Product Name: rSeries 5900 Base OS Version: 1.5.2-21056 Service Version: 1.5.2-21056 Ansible platform: AWX 21.14 F5OS collection: 1.8.0
{
"module_stdout": "",
"module_stderr": "Traceback (most recent call last):\n File \"/home/runner/.ansible/tmp/ansible-local-20kykmwp5t/ansible-tmp-1716389616.3015165-74026497150144/AnsiballZ_f5os_device_info.py\", line 102, in <module>\n _ansiballz_main()\n File \"/home/runner/.ansible/tmp/ansible-local-20kykmwp5t/ansible-tmp-1716389616.3015165-74026497150144/AnsiballZ_f5os_device_info.py\", line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/home/runner/.ansible/tmp/ansible-local-20kykmwp5t/ansible-tmp-1716389616.3015165-74026497150144/AnsiballZ_f5os_device_info.py\", line 40, in invoke_module\n runpy.run_module(mod_name='ansible_collections.f5networks.f5os.plugins.modules.f5os_device_info', init_globals=None, run_name='__main__', alter_sys=True)\n File \"/usr/lib64/python3.6/runpy.py\", line 205, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/lib64/python3.6/runpy.py\", line 96, in _run_module_code\n mod_name, mod_spec, pkg_name, script_name)\n File \"/usr/lib64/python3.6/runpy.py\", line 85, in _run_code\n exec(code, run_globals)\n File \"/tmp/ansible_f5os_device_info_payload_4nuwpbxg/ansible_f5os_device_info_payload.zip/ansible_collections/f5networks/f5os/plugins/modules/f5os_device_info.py\", line 1523, in <module>\n File \"/tmp/ansible_f5os_device_info_payload_4nuwpbxg/ansible_f5os_device_info_payload.zip/ansible_collections/f5networks/f5os/plugins/modules/f5os_device_info.py\", line 1509, in main\n File \"/tmp/ansible_f5os_device_info_payload_4nuwpbxg/ansible_f5os_device_info_payload.zip/ansible_collections/f5networks/f5os/plugins/modules/f5os_device_info.py\", line 1408, in exec_module\n File \"/tmp/ansible_f5os_device_info_payload_4nuwpbxg/ansible_f5os_device_info_payload.zip/ansible_collections/f5networks/f5os/plugins/modules/f5os_device_info.py\", line 1442, in execute_managers\n File \"/tmp/ansible_f5os_device_info_payload_4nuwpbxg/ansible_f5os_device_info_payload.zip/ansible_collections/f5networks/f5os/plugins/modules/f5os_device_info.py\", line 937, in exec_module\n File \"/tmp/ansible_f5os_device_info_payload_4nuwpbxg/ansible_f5os_device_info_payload.zip/ansible_collections/f5networks/f5os/plugins/modules/f5os_device_info.py\", line 943, in _exec_module\n File \"/tmp/ansible_f5os_device_info_payload_4nuwpbxg/ansible_f5os_device_info_payload.zip/ansible_collections/f5networks/f5os/plugins/modules/f5os_device_info.py\", line 952, in read_facts\n File \"/tmp/ansible_f5os_device_info_payload_4nuwpbxg/ansible_f5os_device_info_payload.zip/ansible_collections/f5networks/f5os/plugins/modules/f5os_device_info.py\", line 960, in read_collection_from_device\n File \"/tmp/ansible_f5os_device_info_payload_4nuwpbxg/ansible_f5os_device_info_payload.zip/ansible_collections/f5networks/f5os/plugins/module_utils/client.py\", line 26, in wrap\n File \"/tmp/ansible_f5os_device_info_payload_4nuwpbxg/ansible_f5os_device_info_payload.zip/ansible_collections/f5networks/f5os/plugins/module_utils/client.py\", line 45, in get\n File \"/tmp/ansible_f5os_device_info_payload_4nuwpbxg/ansible_f5os_device_info_payload.zip/ansible/module_utils/connection.py\", line 185, in __rpc__\nansible.module_utils.connection.ConnectionError: {'ietf-restconf:errors': {'error': [{'error-type': 'application', 'error-tag': 'invalid-value', 'error-message': 'uri keypath not found'}]}}\n",
"exception": "Traceback (most recent call last):\n File \"/home/runner/.ansible/tmp/ansible-local-20kykmwp5t/ansible-tmp-1716389616.3015165-74026497150144/AnsiballZ_f5os_device_info.py\", line 102, in <module>\n _ansiballz_main()\n File \"/home/runner/.ansible/tmp/ansible-local-20kykmwp5t/ansible-tmp-1716389616.3015165-74026497150144/AnsiballZ_f5os_device_info.py\", line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/home/runner/.ansible/tmp/ansible-local-20kykmwp5t/ansible-tmp-1716389616.3015165-74026497150144/AnsiballZ_f5os_device_info.py\", line 40, in invoke_module\n runpy.run_module(mod_name='ansible_collections.f5networks.f5os.plugins.modules.f5os_device_info', init_globals=None, run_name='__main__', alter_sys=True)\n File \"/usr/lib64/python3.6/runpy.py\", line 205, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/lib64/python3.6/runpy.py\", line 96, in _run_module_code\n mod_name, mod_spec, pkg_name, script_name)\n File \"/usr/lib64/python3.6/runpy.py\", line 85, in _run_code\n exec(code, run_globals)\n File \"/tmp/ansible_f5os_device_info_payload_4nuwpbxg/ansible_f5os_device_info_payload.zip/ansible_collections/f5networks/f5os/plugins/modules/f5os_device_info.py\", line 1523, in <module>\n File \"/tmp/ansible_f5os_device_info_payload_4nuwpbxg/ansible_f5os_device_info_payload.zip/ansible_collections/f5networks/f5os/plugins/modules/f5os_device_info.py\", line 1509, in main\n File \"/tmp/ansible_f5os_device_info_payload_4nuwpbxg/ansible_f5os_device_info_payload.zip/ansible_collections/f5networks/f5os/plugins/modules/f5os_device_info.py\", line 1408, in exec_module\n File \"/tmp/ansible_f5os_device_info_payload_4nuwpbxg/ansible_f5os_device_info_payload.zip/ansible_collections/f5networks/f5os/plugins/modules/f5os_device_info.py\", line 1442, in execute_managers\n File \"/tmp/ansible_f5os_device_info_payload_4nuwpbxg/ansible_f5os_device_info_payload.zip/ansible_collections/f5networks/f5os/plugins/modules/f5os_device_info.py\", line 937, in exec_module\n File \"/tmp/ansible_f5os_device_info_payload_4nuwpbxg/ansible_f5os_device_info_payload.zip/ansible_collections/f5networks/f5os/plugins/modules/f5os_device_info.py\", line 943, in _exec_module\n File \"/tmp/ansible_f5os_device_info_payload_4nuwpbxg/ansible_f5os_device_info_payload.zip/ansible_collections/f5networks/f5os/plugins/modules/f5os_device_info.py\", line 952, in read_facts\n File \"/tmp/ansible_f5os_device_info_payload_4nuwpbxg/ansible_f5os_device_info_payload.zip/ansible_collections/f5networks/f5os/plugins/modules/f5os_device_info.py\", line 960, in read_collection_from_device\n File \"/tmp/ansible_f5os_device_info_payload_4nuwpbxg/ansible_f5os_device_info_payload.zip/ansible_collections/f5networks/f5os/plugins/module_utils/client.py\", line 26, in wrap\n File \"/tmp/ansible_f5os_device_info_payload_4nuwpbxg/ansible_f5os_device_info_payload.zip/ansible_collections/f5networks/f5os/plugins/module_utils/client.py\", line 45, in get\n File \"/tmp/ansible_f5os_device_info_payload_4nuwpbxg/ansible_f5os_device_info_payload.zip/ansible/module_utils/connection.py\", line 185, in __rpc__\nansible.module_utils.connection.ConnectionError: {'ietf-restconf:errors': {'error': [{'error-type': 'application', 'error-tag': 'invalid-value', 'error-message': 'uri keypath not found'}]}}\n",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1,
"ansible_facts": {
"discovered_interpreter_python": "/usr/libexec/platform-python"
},
"_ansible_no_log": false,
"changed": false
}
I had the same errors with:
Product Name: rSeries 4600 Base OS Version: 1.5.1-12283 Service Version: 1.5.1-12283 F5OS collection: 1.8.0
but after upgrading to: Product Name: rSeries 4600 Base OS Version: 1.7.0-8741 Service Version: 1.7.0-8741 F5OS collection: 1.8.0
I do not have the issue anymore.
Has this bug been solved?
Hi @jewettg @Omripresent , Issue fixed in v1.10.1 collection, please verify
COMPONENT NAME
f5networks.f5os.f5os_device_info
Environment
ansible_user: "{{ ansible_user }}" ansible_httpapi_password: "{{ ansible_password }}" ansible_network_os: f5networks.f5os.f5os ansible_httpapi_use_ssl: true ansible_httpapi_use_proxy: false ansible_httpapi_validate_certs: false ansible_httpapi_port: 8888 ansible_command_timeout: 1800 persistent_log_messages: true
ANSIBLE VERSION
F5OS VERSION
CONFIGURATION
OS / ENVIRONMENT
N/A
SUMMARY
When we try to connect to F5OS device goes in error
STEPS TO REPRODUCE
EXPECTED RESULTS
Gathering data from F5
ACTUAL RESULTS