rubrik-modules-for-ansible icon indicating copy to clipboard operation
rubrik-modules-for-ansible copied to clipboard

Timeout for "rubrik_assign_sla"

Open stephaniemurovec opened this issue 2 years ago • 1 comments

Expected Behavior We use Rubrik Modules for Ansible "rubrik_assign_sla" and sometimes, we have a timeout problem (default timeout 30 sec). We tried to increase timeout to 120 seconds. For example, we use "rubrik_assign_sla" : name: Assign VM to a SLA rubrik_assign_sla: object_name: "{{ vm_name }}" sla_name: "{{ sla_name }}" provider: "{{ credentials }}" timeout: 120 We expect that the module waits 120 seconds before failing but the module always fails if it takes more than 30 seconds. Current Behavior This new timeout doesn't seem to be taken into account. After 30 seconds, if there is no response, we receive this error : "msg": "The Rubrik cluster did not respond to the API request in the allotted amount of time. To fix this issue, increase the timeout value." The SLA is being assigned correctly despite the ansible command failing. How can we really increase default timeout? Thank you very much for help.

Verbose logs are :
TASK [rub : Assign VM to a SLA] ************************************************
task path: /usr/share/ansible/roles/rub/tasks/rub_assign_vm_to_sla.yml:2
Tuesday 22 March 2022 13:32:47 +0000 (0:00:00.071) 0:00:03.269 *********
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: awx
<127.0.0.1> EXEC /bin/sh -c 'echo ~awx && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /var/lib/awx/.ansible/tmp `"&& mkdir /var/lib/awx/.ansible/tmp/ansible-tmp-1647955968.0-212-97124443009941 && echo ansible-tmp-1647955968.0-212-97124443009941="` echo /var/lib/awx/.ansible/tmp/ansible-tmp-1647955968.0-212-97124443009941 `" ) && sleep 0'
Using module file /usr/share/ansible/plugins/modules/rubrik_assign_sla.py
<127.0.0.1> PUT /var/lib/awx/.ansible/tmp/ansible-local-3sGVPiP/tmpos9Nqd TO /var/lib/awx/.ansible/tmp/ansible-tmp-1647955968.0-212-97124443009941/AnsiballZ_rubrik_assign_sla.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /var/lib/awx/.ansible/tmp/ansible-tmp-1647955968.0-212-97124443009941/ /var/lib/awx/.ansible/tmp/ansible-tmp-1647955968.0-212-97124443009941/AnsiballZ_rubrik_assign_sla.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python /var/lib/awx/.ansible/tmp/ansible-tmp-1647955968.0-212-97124443009941/AnsiballZ_rubrik_assign_sla.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /var/lib/awx/.ansible/tmp/ansible-tmp-1647955968.0-212-97124443009941/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
WARNING: The below traceback may *not* be related to the actual failure.
File "/tmp/ansible_rubrik_assign_sla_payload_UokOS7/__main__.py", line 182, in main
timeout)
File "/var/lib/awx/venv/ansible/lib/python2.7/site-packages/rubrik_cdm/data_management.py", line 681, in assign_sla
return self.post("internal", "/sla_domain/{}/assign".format(sla_id), config, timeout)
File "/var/lib/awx/venv/ansible/lib/python2.7/site-packages/rubrik_cdm/api.py", line 256, in post
authentication=authentication)
File "/var/lib/awx/venv/ansible/lib/python2.7/site-packages/rubrik_cdm/api.py", line 160, in _common_api
"The Rubrik cluster did not respond to the API request in the allotted amount of time. To fix this issue, increase the timeout value.")
fatal: [localhost]: FAILED! => {
"changed": false,
"invocation": …

After 30 seconds, "rub_assign_vm_to_sla.yml" fails but on the Rubrik Appliance, SLA is well assigned on the VM.

stephaniemurovec avatar Mar 28 '22 08:03 stephaniemurovec