From 6335d7d49183d716d7f4032c81f1d4138e756755 Mon Sep 17 00:00:00 2001 From: Rei Oliveira Date: Tue, 20 Feb 2024 15:57:12 -0300 Subject: [PATCH] Rehome: Increase timeout for certs to be installed This commit addresses 2 related bugs, in the sense that they are related to ansible tasks that wait for certificates to be installed. Task 'Check admin-ep-cert.pem updated' depends on cert-mon to install the certificate. Cert-mon may fail and reattempt after 10 minutes. This change increases that timeout for this task to be larger than that. I'm also decreasing the delay in a half as it is a quick stat operation, to allow it to be detected quickly in most cases where the first cert-mon attempt works. Task 'Verify if there are 250.001 (config out-of-date) alarms' is dependent on puppet to apply a config change to install the certificate and sysinv to clear the alarm. When I reproduced this issue it took 1 minute longer for the alarm to clear. This change increases the timeout of the task in about 50%. Test Plan: PASS: Rehome a subcloud with 1200 ms latency injected and 50% cap on CPU capacity. Closes-Bug: 2054462 Closes-Bug: 2054463 Change-Id: I017fab0ccb13629c63a7cd855470f0a777f06e22 Signed-off-by: Rei Oliveira --- .../src/playbooks/roles/common/update-sc-cert/tasks/main.yml | 4 ++-- .../verify-and-install-system-local-ca-certs/tasks/main.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/playbookconfig/src/playbooks/roles/common/update-sc-cert/tasks/main.yml b/playbookconfig/src/playbooks/roles/common/update-sc-cert/tasks/main.yml index 6ab618377..3ddce70cd 100644 --- a/playbookconfig/src/playbooks/roles/common/update-sc-cert/tasks/main.yml +++ b/playbookconfig/src/playbooks/roles/common/update-sc-cert/tasks/main.yml @@ -44,8 +44,8 @@ command: stat -c %Y "/etc/ssl/private/{{ sc_adminep_cert }}" register: adminep_cert_modify_time until: adminep_cert_modify_time.stdout|int > (start_time.stdout|int + 1) - retries: 12 - delay: 30 + retries: 63 + delay: 10 - name: Check haproxy service restarted shell: >- diff --git a/playbookconfig/src/playbooks/roles/common/verify-and-install-system-local-ca-certs/tasks/main.yml b/playbookconfig/src/playbooks/roles/common/verify-and-install-system-local-ca-certs/tasks/main.yml index 3f94caa2b..7c36a67b3 100644 --- a/playbookconfig/src/playbooks/roles/common/verify-and-install-system-local-ca-certs/tasks/main.yml +++ b/playbookconfig/src/playbooks/roles/common/verify-and-install-system-local-ca-certs/tasks/main.yml @@ -81,7 +81,7 @@ source /etc/platform/openrc; fm alarm-list --query alarm_id=250.001 register: alarm_subcloud - retries: 10 + retries: 15 delay: 20 until: alarm_subcloud.stdout == "" failed_when: false