Open apellini opened 9 months ago
Hi @apellini,
I tested the following playbook with version 16.1.3.2 without any issue so it's maybe something in your environment.
- hosts: all
collections:
- f5networks.f5_modules
connection: local
tasks:
- name: create new UCS in Big-IP device
f5networks.f5_modules.bigip_ucs_fetch:
provider:
server: "X.X.X.X"
user: "admin"
password: "mysecret"
server_port: 443
validate_certs: no
no_f5_teem: yes
src: "bigip16.1.3.2.ucs"
dest: "/var/tmp/bigip16.1.3.2.ucs"
async_timeout: 300
delegate_to: localhost
I have done some test with verbose:
TASK [Collect UCS] *************************************************************************************************************************************************************************************************
task path: /dsfds/NetDevOps/f5_utils/ansible/backup_f5/testing_backup.yml:150
The full traceback is:
File "/tmp/ansible_f5networks.f5_modules.bigip_ucs_fetch_payload_6__uto5p/ansible_f5networks.f5_modules.bigip_ucs_fetch_payload.zip/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_ucs_fetch.py", line 755, in main
File "/tmp/ansible_f5networks.f5_modules.bigip_ucs_fetch_payload_6__uto5p/ansible_f5networks.f5_modules.bigip_ucs_fetch_payload.zip/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_ucs_fetch.py", line 338, in exec_module
File "/tmp/ansible_f5networks.f5_modules.bigip_ucs_fetch_payload_6__uto5p/ansible_f5networks.f5_modules.bigip_ucs_fetch_payload.zip/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_ucs_fetch.py", line 375, in exec_module
File "/tmp/ansible_f5networks.f5_modules.bigip_ucs_fetch_payload_6__uto5p/ansible_f5networks.f5_modules.bigip_ucs_fetch_payload.zip/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_ucs_fetch.py", line 389, in present
File "/tmp/ansible_f5networks.f5_modules.bigip_ucs_fetch_payload_6__uto5p/ansible_f5networks.f5_modules.bigip_ucs_fetch_payload.zip/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_ucs_fetch.py", line 449, in create
File "/tmp/ansible_f5networks.f5_modules.bigip_ucs_fetch_payload_6__uto5p/ansible_f5networks.f5_modules.bigip_ucs_fetch_payload.zip/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_ucs_fetch.py", line 457, in create_on_device
File "/tmp/ansible_f5networks.f5_modules.bigip_ucs_fetch_payload_6__uto5p/ansible_f5networks.f5_modules.bigip_ucs_fetch_payload.zip/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_ucs_fetch.py", line 527, in async_wait
File "/tmp/ansible_f5networks.f5_modules.bigip_ucs_fetch_payload_6__uto5p/ansible_f5networks.f5_modules.bigip_ucs_fetch_payload.zip/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_ucs_fetch.py", line 670, in exists
File "/tmp/ansible_f5networks.f5_modules.bigip_ucs_fetch_payload_6__uto5p/ansible_f5networks.f5_modules.bigip_ucs_fetch_payload.zip/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_ucs_fetch.py", line 662, in read_current
File "/tmp/ansible_f5networks.f5_modules.bigip_ucs_fetch_payload_6__uto5p/ansible_f5networks.f5_modules.bigip_ucs_fetch_payload.zip/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_ucs_fetch.py", line 651, in read_current_from_device
fatal: [device-> localhost]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"async_timeout": 1800,
"attributes": null,
"backup": false,
"create_on_missing": true,
"dest": "tmp/device_2023121218121702402181.ucs",
"encryption_password": null,
"fail_on_missing": false,
"force": true,
"group": null,
"mode": null,
"only_create_file": false,
"owner": null,
"provider": {
"auth_provider": null,
"no_f5_teem": null,
"password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"server": "IP",
"server_port": 443,
"timeout": null,
"transport": "rest",
"user": "user",
"validate_certs": false
},
"selevel": null,
"serole": null,
"setype": null,
"seuser": null,
"src": "device_2023121218121702402181.ucs",
"unsafe_writes": false
}
},
"msg": "Expecting value: line 1 column 1 (char 0)"
}
...ignoring
What we could see that UCS is created because on next task remove it from device:
TASK [Remove UCS] **************************************************************************************************************************************************************************************************
task path: /dir/NetDevOps/f5_utils/ansible/backup_f5/testing_backup.yml:163
changed: [device -> localhost] => {
"changed": true,
"invocation": {
"module_args": {
"force": false,
"include_chassis_level_config": null,
"no_license": null,
"no_platform_check": null,
"passphrase": null,
"provider": {
"auth_provider": null,
"no_f5_teem": null,
"password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"server": "IP",
"server_port": 443,
"timeout": null,
"transport": "rest",
"user": "user",
"validate_certs": false
},
"reset_trust": null,
"state": "absent",
"ucs": "device_2023121218121702402181.ucs"
}
}
}
Hi @apellini,
Have you tested with the playbook I provided? Also are you sure dest is a full path?
Yes. I have launched two times and has worked. We have a strange behaviour with async_timeout at 300 sec, the first time has taken 294 sec and second 632 sec. I was expecting that when 300 sec is reached task gone in failed.
Also consider that we are using 1800 sec as async_timeout because it is needed from other F5.
Hi @apellini,
Async_timeout is only for ucs creation not the task. Am I understanding you are able to generate a ucs correctly?
yes but why if I put 1800 sec doesn't work?
Hi @apellini,
I did the test with 1800 and I have no issue so it's maybe something related to your environment.
But the strangest thing if I put 1800 it fails after 24 min not 30.
TASK [Collect UCS] ***** fatal: [device -> localhost]: FAILED! => {"changed": false, "msg": "Expecting value: line 1 column 1 (char 0)"} ...ignoring Wednesday 13 December 2023 13:57:56 +0100 (0:24:04.306) 0:24:33.799 ****
Hi @apellini,
Best way to go forward, will be to do a repro with your ucs configuration so you need to open a case via https://my.f5.com
COMPONENT NAME
Environment
ANSIBLE VERSION
BIGIP VERSION
CONFIGURATION
OS / ENVIRONMENT
RHEL 7.9
SUMMARY
UCS Backup not working on some device and traceback not useful to understand the issue
STEPS TO REPRODUCE
EXPECTED RESULTS
Backup performed
ACTUAL RESULTS