CiscoDevNet / FMCAnsible

GNU General Public License v3.0
21 stars 25 forks source link

HTTPS Request Timeout Issue #18

Closed trevoramaco closed 1 year ago

trevoramaco commented 1 year ago

Hello,

When attempting to run the "createUpgrade" Ansible task to initiate a FTD software upgrade, I ran into the error seen below:

Screenshot 2022-12-19 at 3 44 19 PM

After some testing, I determined this is because the software upgrade POST request is time intensive and takes about 30 seconds on average in Postman, but the timeout is hardcoded to 10 in the client.py file, "_send_request" method:

Screenshot 2022-12-19 at 3 45 56 PM

After changing the 'timeout' value, my task succeed. Is it possible to parameterize this value? Or perhaps there's a way to pass in a timeout parameter I didn't see? Thank you

boomsfib commented 1 year ago

I am also getting this same error. I ran into this while doing a bulk creation of network objects using the below task. List contained about 77 objects. All the objects were created, but the task still failed. Changing the timeout value as @trevoramaco suggested fixed the issue for me as well and my task succeeded.

    - name: Create Multiple Objects in FMC
      cisco.fmcansible.fmc_configuration:
        operation: createMultipleNetworkObject
        path_params:
          domainUUID: "{{ domain[0].uuid }}"
        query_params:
          bulk: true
        data: "{{ wifi_mgmt_networks }}"

msg: 'Server returned an error trying to execute createMultipleNetworkObject operation. Status code: 500. Server response: The read operation timed out'

jeroenwittock commented 1 year ago

Closing this, fix will go into version 1.0, planned to be released this month.