Open itaytalmi opened 2 years ago
We don't use AD user auth yet, but I had a look at the code and it seems only the vmware.ansible_for_nsxt.nsxt_rest module should have timeout issues. Most, if not all, other module use the policy_communicator.py which has a timeout=300 setting hardcoded.
So you have 3 options;
1) use the generic ansible uri module instead, There you can specify the timeout (our approach).
2) edit the vmware.ansible_for_nsxt.nsxt_rest module to add a timeout. A simple timeout=
Note: default ansible uri timeout is 30s according to -> https://docs.ansible.com/ansible/latest/collections/ansible/builtin/uri_module.html#parameter-timeout
Note2: If you're on 3.1.0 or 3.1.1 -> https://kb.vmware.com/s/article/82331
Describe the bug
We have a new environment on AVS (Azure VMware Solution), utilizing the managed NSX-T, vSphere, etc. We've connected NSX-T to Active Directory because we must use AD users in this environment, and noticed that when using AD users to authenticate to NSX-T, the request may take a few seconds. The Ansible module for NSX-T does not allow to customize the timeout (it defaults to 10 seconds, just like the ansible.builtin.uri module). When using the local admin user for NSX-T authentication, timeout doesn't occur and everything works.
I suppose this issue occurs due to some latency between NSX-T and Active Directory.
It would be really nice if there was a timeout parameter on all Ansible modules, to support such environments...
Reproduction steps
Not sure it's reproducible due to the latency issue I mentioned.
This issue occurs in any REST request using an AD user.
For example, the following task:
Results in:
Expected behavior
It would be great if we could increase the default timeout on all modules.
Additional context
No response