From dbc26dada095f1b0bd6faae548c55542ef2c20bf Mon Sep 17 00:00:00 2001 From: Xin Wang Date: Mon, 27 May 2019 18:11:23 +0800 Subject: [PATCH] [fdb] Improve robustness of checking PTF PID after config reload In case the config reload operation takes longer than the PTF script's running time, checking PTF script PID after config reload may fail. This change is to improve the robustness of checking PTF script PID after config reload. Signed-off-by: Xin Wang --- ansible/roles/test/tasks/fdb.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ansible/roles/test/tasks/fdb.yml b/ansible/roles/test/tasks/fdb.yml index 6d12a223319..0e76537e85e 100644 --- a/ansible/roles/test/tasks/fdb.yml +++ b/ansible/roles/test/tasks/fdb.yml @@ -127,10 +127,12 @@ command: "pgrep -f '/usr/bin/python /usr/bin/ptf'" register: ptf_script_pid delegate_to: "{{ ptf_host }}" + ignore_errors: yes - name: Wait until the PTF script completed execution shell: "tail --pid={{ ptf_script_pid.stdout }} -f /dev/null" delegate_to: "{{ ptf_host }}" + when: ptf_script_pid.rc == 0 - name: Wait some extra time to ensure that all FDB entries are in DB pause: seconds=10