f5-ansible icon indicating copy to clipboard operation
f5-ansible copied to clipboard

Timeout error when running ansible module bigip_ucs_fetch

Open y-myk opened this issue 3 years ago • 2 comments

COMPONENT NAME

bigip_ucs_fetch ansible module

Environment

ANSIBLE VERSION
ansible 2.9.2
  config file = /home/ymyk/C3509453/ansible.cfg
  configured module search path = [u'/home/ymyk/C3509453/collections/ansible_collections/f5networks/f5_modules/plugins/modules']
  ansible python module location = /home/ymyk/ansible-2.9.2/v2.9.2/lib/ansible
  executable location = /home/ymyk/ansible-2.9.2/v2.9.2/bin/ansible
  python version = 2.7.17 (default, Feb 27 2021, 15:10:58) [GCC 7.5.0]
BIGIP VERSION
Sys::Version
Main Package
  Product     BIG-IP
  Version     15.1.2.1
  Build       0.0.10
  Edition     Point Release 1
  Date        Fri Jan 15 13:43:15 PST 2021
CONFIGURATION

N/A

OS / ENVIRONMENT

N/A

SUMMARY

bigip_ucs_fetch is installed from f5_modules ansible-galaxy collection 1.8.1. The following playbook produces an error when UCS file was not pre-created on BIG-IP in advance and "create_on_missing" parameter is set to "true" in ansible playbook:


tasks:

- name: Download a new UCS

  bigip_ucs_fetch:
    provider: "{{ provider }}"
    src: cs_backup.ucs
    dest: /tmp/cs_backup.ucs
    create_on_missing: true
    async_timeout: 900

Playbook error:

ssl.SSLError: ('The read operation timed out',)

STEPS TO REPRODUCE

Run ansible playbook provided below.

---
- name: demo lab
  hosts: bigip-ve
  gather_facts: no
  connection: local
  collections:
    - f5networks.f5_modules

  vars:
    login_user: "admin"
    login_password: "admin"
    provider:
      server: "{{ ansible_host }}"
      server_port: 443
      validate_certs: no
      user: "{{ login_user }}"
      password: "{{ login_password }}"

  tasks:

    - name: Download a new UCS

      bigip_ucs_fetch:
        provider: "{{ provider }}"
        src: cs_backup.ucs
        dest: /tmp/cs_backup.ucs
        create_on_missing: true
        async_timeout: 900
EXPECTED RESULTS

UCS file gets created on BIG-IP, then fetched from BIG-IP and stored in /tmp/cs_backup.ucs on ansible host.

ACTUAL RESULTS

Playbook errors out. UCS file is not downloaded to ansible host.

Traceback (most recent call last):
  File "/var/tmp/.ansible/tmp/ansible-tmp-1619038351.7313755-251867342756120/AnsiballZ_bigip_ucs_fetch.py", line 102, in <module>
    _ansiballz_main()
  File "/var/tmp/.ansible/tmp/ansible-tmp-1619038351.7313755-251867342756120/AnsiballZ_bigip_ucs_fetch.py", line 94, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File "/var/tmp/.ansible/tmp/ansible-tmp-1619038351.7313755-251867342756120/AnsiballZ_bigip_ucs_fetch.py", line 40, in invoke_module
    runpy.run_module(mod_name='ansible_collections.f5networks.f5_modules.plugins.modules.bigip_ucs_fetch', init_globals=None, run_name='__main__', alter_sys=True)
  File "/usr/lib64/python2.7/runpy.py", line 176, in run_module
    fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 82, in _run_module_code
    mod_name, mod_fname, mod_loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/tmp/ansible_bigip_ucs_fetch_payload_Otvzug/ansible_bigip_ucs_fetch_payload.zip/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_ucs_fetch.py", line 677, in <module>
  File "/tmp/ansible_bigip_ucs_fetch_payload_Otvzug/ansible_bigip_ucs_fetch_payload.zip/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_ucs_fetch.py", line 670, in main
  File "/tmp/ansible_bigip_ucs_fetch_payload_Otvzug/ansible_bigip_ucs_fetch_payload.zip/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_ucs_fetch.py", line 275, in exec_module
  File "/tmp/ansible_bigip_ucs_fetch_payload_Otvzug/ansible_bigip_ucs_fetch_payload.zip/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_ucs_fetch.py", line 312, in exec_module
  File "/tmp/ansible_bigip_ucs_fetch_payload_Otvzug/ansible_bigip_ucs_fetch_payload.zip/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_ucs_fetch.py", line 325, in present
  File "/tmp/ansible_bigip_ucs_fetch_payload_Otvzug/ansible_bigip_ucs_fetch_payload.zip/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_ucs_fetch.py", line 382, in create
  File "/tmp/ansible_bigip_ucs_fetch_payload_Otvzug/ansible_bigip_ucs_fetch_payload.zip/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_ucs_fetch.py", line 389, in create_on_device
  File "/tmp/ansible_bigip_ucs_fetch_payload_Otvzug/ansible_bigip_ucs_fetch_payload.zip/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_ucs_fetch.py", line 443, in async_wait
  File "/tmp/ansible_bigip_ucs_fetch_payload_Otvzug/ansible_bigip_ucs_fetch_payload.zip/ansible_collections/f5networks/f5_modules/plugins/module_utils/icontrol.py", line 233, in get
  File "/tmp/ansible_bigip_ucs_fetch_payload_Otvzug/ansible_bigip_ucs_fetch_payload.zip/ansible_collections/f5networks/f5_modules/plugins/module_utils/icontrol.py", line 194, in send
  File "/tmp/ansible_bigip_ucs_fetch_payload_Otvzug/ansible_bigip_ucs_fetch_payload.zip/ansible/module_utils/urls.py", line 1294, in open
  File "/usr/lib64/python2.7/urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib64/python2.7/urllib2.py", line 431, in open
    response = self._open(req, data)
  File "/usr/lib64/python2.7/urllib2.py", line 449, in _open
    '_open', req)
  File "/usr/lib64/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/tmp/ansible_bigip_ucs_fetch_payload_Otvzug/ansible_bigip_ucs_fetch_payload.zip/ansible/module_utils/urls.py", line 467, in https_open
  File "/usr/lib64/python2.7/urllib2.py", line 1217, in do_open
    r = h.getresponse(buffering=True)
  File "/usr/lib64/python2.7/httplib.py", line 1128, in getresponse
    response.begin()
  File "/usr/lib64/python2.7/httplib.py", line 453, in begin
    version, status, reason = self._read_status()
  File "/usr/lib64/python2.7/httplib.py", line 409, in _read_status
    line = self.fp.readline(_MAXLINE + 1)
  File "/usr/lib64/python2.7/socket.py", line 476, in readline
    data = self._sock.recv(self._rbufsize)
  File "/usr/lib64/python2.7/ssl.py", line 757, in recv
    return self.read(buflen)
  File "/usr/lib64/python2.7/ssl.py", line 651, in read
    v = self._sslobj.read(len or 1024)
ssl.SSLError: ('The read operation timed out',)

y-myk avatar Apr 29 '21 14:04 y-myk

The issue is tracked internally via INFRAANO-334/BZ1015061.

y-myk avatar Apr 29 '21 14:04 y-myk

Hi there. Do you have any forecast of how this will be solved or maybe some workaround that allows us to bypass the issue?

balmasea avatar Jun 22 '21 11:06 balmasea

Hi, have you tried with the declarative collection? https://clouddocs.f5.com/products/orchestration/ansible/devel/f5_bigip/f5_bigip.html

KrithikaChidambaram avatar Nov 30 '22 17:11 KrithikaChidambaram

Hi, closing this request now. Please re-open if required or send an email to [email protected]. Thanks!

pgouband avatar Apr 04 '23 06:04 pgouband

Hello @pgouband

Is the advice going forward to just use the declarative modules? If so, at this point, are the imperative modules considered deprecated / out of support? If so, should this repository be archived and the modules removed from Ansible Galaxy?

Where does this leave the customers and users of this collection that are unable to move to the declarative modules or BIG-IP NEXT / F5OS at this time?

rgonzal1 avatar Apr 04 '23 13:04 rgonzal1

Hi @rgonzal1 the modules are not deprecated/out of support. We would like to understand your issue with more detail. Please, send an email to: [email protected]. We can ask more questions and try to find the best solution for your environment.

G-gonzalezjimenez avatar Apr 04 '23 16:04 G-gonzalezjimenez