Closed aknot242 closed 3 years ago
As I believe that the Ansible module cannot address changing the internal BIG-IP timeout value, I recommended using iControlREST asynchronous API transactions to accomplish the UCS archive.
Please test with either Ansible development version or ansible 2.9 and report back @aknot242
Yes, this is also occurring on 2.9.0rc1.
Tentatively accepted: FMFA-409
Will be evaluated during development work
Looks like this is BIG-IP ID797721 and not a bug on ansible. Try this on BIG-IP version 15.1.0 which I believed was already fixed.
In 15.1.0, it appears that the BIG-IP REST API timeouts can be prevented by heeding the guidance in the release notes. However, The bigip_ucs_fetch Ansible module still appears to be timing out while waiting for the response. The provider timeout property appears to be 120 seconds, and can supposedly be overridden, but it does not appear that bigip_ucs_fetch is making use of the overridden timeout value. Here's the full exception:
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: socket.timeout: The read operation timed out fatal: [mybigip.example.com -> localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/Users/user/.ansible/tmp/ansible-tmp-1579649776.13241-134533244415436/AnsiballZ_bigip_ucs_fetch.py\", line 102, in <module>\n _ansiballz_main()\n File \"/Users/user/.ansible/tmp/ansible-tmp-1579649776.13241-134533244415436/AnsiballZ_bigip_ucs_fetch.py\", line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/Users/user/.ansible/tmp/ansible-tmp-1579649776.13241-134533244415436/AnsiballZ_bigip_ucs_fetch.py\", line 40, in invoke_module\n runpy.run_module(mod_name='ansible.modules.network.f5.bigip_ucs_fetch', init_globals=None, run_name='__main__', alter_sys=True)\n File \"/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py\", line 205, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py\", line 96, in _run_module_code\n mod_name, mod_spec, pkg_name, script_name)\n File \"/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py\", line 85, in _run_code\n exec(code, run_globals)\n File \"/var/folders/yz/r44jvm3925l65zm1d81_gf51vz0hk7/T/ansible_bigip_ucs_fetch_payload_py_5yp3m/ansible_bigip_ucs_fetch_payload.zip/ansible/modules/network/f5/bigip_ucs_fetch.py\", line 612, in <module>\n File \"/var/folders/yz/r44jvm3925l65zm1d81_gf51vz0hk7/T/ansible_bigip_ucs_fetch_payload_py_5yp3m/ansible_bigip_ucs_fetch_payload.zip/ansible/modules/network/f5/bigip_ucs_fetch.py\", line 605, in main\n File \"/var/folders/yz/r44jvm3925l65zm1d81_gf51vz0hk7/T/ansible_bigip_ucs_fetch_payload_py_5yp3m/ansible_bigip_ucs_fetch_payload.zip/ansible/modules/network/f5/bigip_ucs_fetch.py\", line 265, in exec_module\n File \"/var/folders/yz/r44jvm3925l65zm1d81_gf51vz0hk7/T/ansible_bigip_ucs_fetch_payload_py_5yp3m/ansible_bigip_ucs_fetch_payload.zip/ansible/modules/network/f5/bigip_ucs_fetch.py\", line 300, in exec_module\n File \"/var/folders/yz/r44jvm3925l65zm1d81_gf51vz0hk7/T/ansible_bigip_ucs_fetch_payload_py_5yp3m/ansible_bigip_ucs_fetch_payload.zip/ansible/modules/network/f5/bigip_ucs_fetch.py\", line 312, in present\n File \"/var/folders/yz/r44jvm3925l65zm1d81_gf51vz0hk7/T/ansible_bigip_ucs_fetch_payload_py_5yp3m/ansible_bigip_ucs_fetch_payload.zip/ansible/modules/network/f5/bigip_ucs_fetch.py\", line 369, in create\n File \"/var/folders/yz/r44jvm3925l65zm1d81_gf51vz0hk7/T/ansible_bigip_ucs_fetch_payload_py_5yp3m/ansible_bigip_ucs_fetch_payload.zip/ansible/modules/network/f5/bigip_ucs_fetch.py\", line 390, in create_on_device\n File \"/var/folders/yz/r44jvm3925l65zm1d81_gf51vz0hk7/T/ansible_bigip_ucs_fetch_payload_py_5yp3m/ansible_bigip_ucs_fetch_payload.zip/ansible/module_utils/network/f5/icontrol.py\", line 238, in post\n File \"/var/folders/yz/r44jvm3925l65zm1d81_gf51vz0hk7/T/ansible_bigip_ucs_fetch_payload_py_5yp3m/ansible_bigip_ucs_fetch_payload.zip/ansible/module_utils/network/f5/icontrol.py\", line 193, in send\n File \"/var/folders/yz/r44jvm3925l65zm1d81_gf51vz0hk7/T/ansible_bigip_ucs_fetch_payload_py_5yp3m/ansible_bigip_ucs_fetch_payload.zip/ansible/module_utils/urls.py\", line 1294, in open\n File \"/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py\", line 222, in urlopen\n return opener.open(url, data, timeout)\n File \"/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py\", line 525, in open\n response = self._open(req, data)\n File \"/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py\", line 543, in _open\n '_open', req)\n File \"/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py\", line 503, in _call_chain\n result = func(*args)\n File \"/var/folders/yz/r44jvm3925l65zm1d81_gf51vz0hk7/T/ansible_bigip_ucs_fetch_payload_py_5yp3m/ansible_bigip_ucs_fetch_payload.zip/ansible/module_utils/urls.py\", line 467, in https_open\n File \"/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py\", line 1320, in do_open\n r = h.getresponse()\n File \"/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py\", line 1344, in getresponse\n response.begin()\n File \"/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py\", line 306, in begin\n version, status, reason = self._read_status()\n File \"/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py\", line 267, in _read_status\n line = str(self.fp.readline(_MAXLINE + 1), \"iso-8859-1\")\n File \"/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socket.py\", line 589, in readinto\n return self._sock.recv_into(b)\n File \"/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py\", line 1071, in recv_into\n return self.read(nbytes, buffer)\n File \"/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py\", line 929, in read\n return self._sslobj.read(len, buffer)\nsocket.timeout: The read operation timed out\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
Pending REST API endpoint to update timeout.
Hi, sorry, Is this fixed now and how/what version of Ansible or Ansible components was it fixed-in? I have the same problem.
The interesting thing about it my set up is it almost always times out first time but succeeds on second pass, so its like the UCS is still generating (and causing the delays) but when you run the UCS fetch the second time, the file has generated and now ready to be picked up without the need to generate again.
The commit mentioned above will be in the next release.
ISSUE TYPE
COMPONENT NAME
bigip_ucs_fetch
ANSIBLE VERSION
PYTHON VERSION
BIGIP VERSION
CONFIGURATION
deprecation_warnings = False retry_files_enabled = False host_key_checking=False
OS / ENVIRONMENT
N/A
SUMMARY
STEPS TO REPRODUCE
EXPECTED RESULTS
A backup is created
ACTUAL RESULTS
No UCS is created, and failure occurs at around 65 seconds. Presumably this is the point at which the restjavad call times out. If this is the case, issue reproduction may not be possible on a BIG-IP with a smaller backup workload, or a platform with greater control plane resources.
The following is the restjavad log entry at the time of the failure: