Skip to content

Commit 0484493

Browse files
sathlanopenshift-merge-bot[bot]
authored andcommitted
Add configuration variables for control plane testing during update.
Add a number of variables to control various aspects of the control plane testing. Using those new varibles we can configure control plane testing settings from the job definition. Increased the default time we wait for the last vm to be created and destroyed as 5 minutes (the previous timeout) was slightly too short. It's now 7 minutes. Closes: https://issues.redhat.com/browse/OSPRH-12349
1 parent a86d3fe commit 0484493

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

roles/update/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ Role to run update
1212
* `cifmw_update_ping_loss_second` : (Integer) Number of seconds that the ping test is allowed to fail. Default to `0`. Note that 1 packet loss is always accepted to avoid false positive.
1313
* `cifmw_update_ping_loss_percent` : (Integer) Maximum percentage of ping loss accepted. Default to `0`. Only relevant when `cifmw_update_ping_loss_second` is not 0.
1414
* `cifmw_update_control_plane_check`: (Boolean) Activate a continuous control plane testing. Default to `False`
15+
* `cifmw_update_ctl_plane_max_cons_fail`: (Integer) For continuous control plane testing, maximum number of consecutive failures allowed. Default to 2.
16+
* `cifmw_update_ctl_plane_max_fail`: (Integer) For continuous control plane testing, maximum number of failures allowed. Default to 3.
17+
* `cifmw_update_ctl_plane_max_tries`: (Integer) For continuous control plane testing, number of retries allowed to stop and destroy the last vm created. Each retry is 5 seconds apart. Default to 84, so 7 minutes.
1518
* `cifmw_update_openstackclient_pod_timeout`: (Integer) Maximum number of seconds to wait for the openstackclient Pod to be available during control plane testing, as it is being restarted during update. Default to `10` seconds.
1619

1720
## Examples

roles/update/defaults/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,6 @@ cifmw_update_ping_loss_percent: 0
4747
# Control plane Testing
4848
cifmw_update_control_plane_check: false
4949
cifmw_update_openstackclient_pod_timeout: 10 # in seconds.
50+
cifmw_update_ctl_plane_max_cons_fail: 2
51+
cifmw_update_ctl_plane_max_fail: 3
52+
cifmw_update_ctl_plane_max_tries: 84

roles/update/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,5 @@
7272
when:
7373
- cifmw_update_control_plane_check | bool
7474
- not cifmw_update_run_dryrun | bool
75-
ansible.builtin.shell: |
75+
ansible.builtin.command: |
7676
{{ cifmw_update_artifacts_basedir }}/control_plane_test_stop.sh

roles/update/templates/control_plane_test_stop.sh.j2

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
# Get the pid, kill it and wait for the end of the last run.
55
set -eu
66

7-
MAX_CONS_FAIL=${1:-2}
8-
MAX_FAIL=${2:-3}
7+
MAX_CONS_FAIL=${1:-{{ cifmw_update_ctl_plane_max_cons_fail }}}
8+
MAX_FAIL=${2:-{{ cifmw_update_ctl_plane_max_fail }}}
99
BASE_DIR="${3:-{{ cifmw_update_artifacts_basedir }}}"
10-
STOP_MAX_TRIES=${4:-60} # 5 seconds x MAX_TRIES = 5 min by default
10+
STOP_MAX_TRIES=${4:-{{ cifmw_update_ctl_plane_max_tries }}} # times 5 seconds
1111

1212
pid_file="${BASE_DIR}/control-plane-test.pid"
1313

0 commit comments

Comments
 (0)