def wait_for_task(self, path, interval, period):
for x in range(0, period):
task = self._check_task_on_device(path)
if task['code'] != 200:
if task['message'] not in ['in progress', 'pending']:
raise F5ModuleError(task['message'])
if task['message'] not in ['in progress', 'pending']:
return task
time.sleep(interval)
raise F5ModuleError(
"Module timeout reached, state change is unknown, "
"please increase the timeout parameter for long lived actions."
)
STEPS TO REPRODUCE
Try creating 150 FAST applications using a loop multiple times and eventually the API will return a pending state at some point. This will lead to an immediate failure of the task.
EXPECTED RESULTS
The module waits for configured timeout (or default timeout of 300 seconds) in the hope that the pending state resolves.
COMPONENT NAME
bigip_fast_application
version2.1.0
.Environment
ANSIBLE VERSION
BIGIP VERSION
CONFIGURATION
OS / ENVIRONMENT
SUMMARY
When the iControl REST API returns a pending state for the task, the module will return an error.
Relevant code:
https://github.com/F5Networks/f5-ansible-bigip/blob/df5d60134cd8f280eb1ed78182b44b28f744f9be/ansible_collections/f5networks/f5_bigip/plugins/modules/bigip_fast_application.py#L395-L407
Possible solution:
STEPS TO REPRODUCE
Try creating 150 FAST applications using a loop multiple times and eventually the API will return a pending state at some point. This will lead to an immediate failure of the task.
EXPECTED RESULTS
The module waits for configured
timeout
(or default timeout of 300 seconds) in the hope that thepending
state resolves.ACTUAL RESULTS
The module fails.