-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Labels
Description
Describe the request
Ansible stops executing when it encounters a read timeout after 30 seconds, but the timeout on Prism Central is higher.
Current behaviour
Execution fails in read operation as that operation takes a lot of time some times due to slowness of PC. Error msg:
# time ansible-playbook repro.yaml
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match
'all'
[WARNING]: Collection nutanix.ncp does not support Ansible version 2.14.18
PLAY [Subnet_Info playbook] ******************************************************************************************
TASK [Create a disk for a VM] ****************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: </html>
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/root/.ansible/tmp/ansible-tmp-1761053611.7701797-32296-247726945570032/AnsiballZ_ntnx_vms_disks_v2.py\", line 107, in <module>\n _ansiballz_main()\n File \"/root/.ansible/tmp/ansible-tmp-1761053611.7701797-32296-247726945570032/AnsiballZ_ntnx_vms_disks_v2.py\", line 99, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/root/.ansible/tmp/ansible-tmp-1761053611.7701797-32296-247726945570032/AnsiballZ_ntnx_vms_disks_v2.py\", line 47, in invoke_module\n runpy.run_module(mod_name='ansible_collections.nutanix.ncp.plugins.modules.ntnx_vms_disks_v2', init_globals=dict(_module_fqn='ansible_collections.nutanix.ncp.plugins.modules.ntnx_vms_disks_v2', _modlib_path=modlib_path),\n File \"/usr/lib64/python3.9/runpy.py\", line 225, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/lib64/python3.9/runpy.py\", line 97, in _run_module_code\n _run_code(code, mod_globals, init_globals,\n File \"/usr/lib64/python3.9/runpy.py\", line 87, in _run_code\n exec(code, run_globals)\n File \"/tmp/ansible_nutanix.ncp.ntnx_vms_disks_v2_payload_wcfjtngg/ansible_nutanix.ncp.ntnx_vms_disks_v2_payload.zip/ansible_collections/nutanix/ncp/plugins/modules/ntnx_vms_disks_v2.py\", line 528, in <module>\n File \"/tmp/ansible_nutanix.ncp.ntnx_vms_disks_v2_payload_wcfjtngg/ansible_nutanix.ncp.ntnx_vms_disks_v2_payload.zip/ansible_collections/nutanix/ncp/plugins/modules/ntnx_vms_disks_v2.py\", line 524, in main\n File \"/tmp/ansible_nutanix.ncp.ntnx_vms_disks_v2_payload_wcfjtngg/ansible_nutanix.ncp.ntnx_vms_disks_v2_payload.zip/ansible_collections/nutanix/ncp/plugins/modules/ntnx_vms_disks_v2.py\", line 516, in run_module\n File \"/tmp/ansible_nutanix.ncp.ntnx_vms_disks_v2_payload_wcfjtngg/ansible_nutanix.ncp.ntnx_vms_disks_v2_payload.zip/ansible_collections/nutanix/ncp/plugins/modules/ntnx_vms_disks_v2.py\", line 370, in create_disk\n File \"/tmp/ansible_nutanix.ncp.ntnx_vms_disks_v2_payload_wcfjtngg/ansible_nutanix.ncp.ntnx_vms_disks_v2_payload.zip/ansible_collections/nutanix/ncp/plugins/module_utils/v4/prism/tasks.py\", line 66, in wait_for_completion\n File \"/usr/local/lib/python3.9/site-packages/ntnx_prism_py_client/api/tasks_api.py\", line 242, in get_task_by_id\n (data) = self.api_client._call_api(\n File \"/usr/local/lib/python3.9/site-packages/ntnx_prism_py_client/api_client.py\", line 682, in _call_api\n return self.__call_api(resource_path, method,\n File \"/usr/local/lib/python3.9/site-packages/ntnx_prism_py_client/api_client.py\", line 448, in __call_api\n response_data = self.request(\n File \"/usr/local/lib/python3.9/site-packages/ntnx_prism_py_client/api_client.py\", line 707, in request\n return self.rest_client.GET(url,\n File \"/usr/local/lib/python3.9/site-packages/ntnx_prism_py_client/rest.py\", line 320, in GET\n return self.request(\"GET\", url,\n File \"/usr/local/lib/python3.9/site-packages/ntnx_prism_py_client/rest.py\", line 314, in request\n raise ApiException(http_resp=r)\nntnx_prism_py_client.rest.ApiException2025-10-21 13:35:02,866Z ERROR [MainThread:ntnx_prism_py_client.rest:410] (504)\nReason: Gateway Time-out\nHTTP response headers: HTTPHeaderDict({'Server': 'nginx/1.20.1', 'Date': 'Tue, 21 Oct 2025 13:35:02 GMT', 'Content-Type': 'text/html', 'Content-Length': '167', 'Connection': 'keep-alive'})\nHTTP response body: <html>\r\n<head><title>504 Gateway Time-out</title></head>\r\n<body>\r\n<center><h1>504 Gateway Time-out</h1></center>\r\n<hr><center>nginx/1.20.1</center>\r\n</body>\r\n</html>\r\n\n\n: (504)\nReason: Gateway Time-out\nHTTP response headers: HTTPHeaderDict({'Server': 'nginx/1.20.1', 'Date': 'Tue, 21 Oct 2025 13:35:02 GMT', 'Content-Type': 'text/html', 'Content-Length': '167', 'Connection': 'keep-alive'})\nHTTP response body: <html>\r\n<head><title>504 Gateway Time-out</title></head>\r\n<body>\r\n<center><h1>504 Gateway Time-out</h1></center>\r\n<hr><center>nginx/1.20.1</center>\r\n</body>\r\n</html>\r\n\n\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
PLAY RECAP ***********************************************************************************************************
localhost : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
real 1m31.440s
user 0m1.971s
sys 0m0.274s
Expected behaviour
Customer can handle read timeout manually in the playbook itself to avoid failures.
Docs to refer: https://developers.nutanix.com/sdk-reference?namespace=vmm&version=v4.2&language=python
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status