Closed andrew80k closed 5 years ago
Hello,
The problem lies with the NITRO API implementation.
It seems that during creation of the lb vserver, when we do a POST request, the value passed for the timeout attribute is ignored and the default value is used instead.
Since there is a check at the end of the module run to verify that all arguments were processed correctly this raises the error you see.
When the playbook is run a second time, we do a PUT request to update the lb vserver attributes. It seems that in this request NITRO applies the value correctly for the timeout attribute. That is why the second run is successful.
The root cause solution would be to fix this in the NITRO API. For now I can suggest the workaround of executing the same task twice, and ignoring the specific error on the first run with:
ignore_errors: true
Thanks @giorgos-nikolopoulos. While the use of ignore_errors is an option, I'm reluctant to use it. I have thousands of lines of ansible and might use it once. The problem here is that ignore errors lets the play complete successfully but it's not idempotent. It still makes changes on the subsequent run. I prefer to just remove the timeout for this particular implementation.
Glad I could be of assistance. Cheers.
Creating a new virtual server I'm getting an odd error that I can't seem to track down.
This particular test playbook creates a set of servers, a service group, binds the servers to the service group, then creates the virtual server with the service group bound to it. This error only occurs on the initial creation run. Subsequent runs finish successfully. Second run has a single change in the vserver and any additional runs of the playbook remain unchanged.
The following is the task:
If I remove the timeout from the task it completes successfully the first time. Something strange with it, but it was repeatable so I thought I would post it so it could get a look. Let me know if you need some additional information.