Force variable type;Ensure minimum default value for storage_benchmark;Fix type mismatch
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Danny Bessems 2023-03-09 09:59:45 +01:00
parent f47777763a
commit 230dc5e0cd
20 changed files with 27 additions and 24 deletions

View File

@ -133,7 +133,7 @@
- api_readycheck.json.status is defined - api_readycheck.json.status is defined
- api_readycheck.json.status == 'ok' - api_readycheck.json.status == 'ok'
retries: "{{ playbook.retries }}" retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark * playbook.delay.long) | int }}" delay: "{{ (storage_benchmark | int) * (playbook.delay.long | int) }}"
module_defaults: module_defaults:
ansible.builtin.uri: ansible.builtin.uri:

View File

@ -19,7 +19,7 @@
- api_readycheck.json.status is defined - api_readycheck.json.status is defined
- api_readycheck.json.status == 'pass' - api_readycheck.json.status == 'pass'
retries: "{{ playbook.retries }}" retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark * playbook.delay.long) | int }}" delay: "{{ (storage_benchmark | int) * (playbook.delay.long | int) }}"
- name: Configure additional SSH ingress - name: Configure additional SSH ingress
ansible.builtin.template: ansible.builtin.template:

View File

@ -18,7 +18,7 @@
until: until:
- api_readycheck.json.Version is defined - api_readycheck.json.Version is defined
retries: "{{ playbook.retries }}" retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark * playbook.delay.long) | int }}" delay: "{{ (storage_benchmark | int) * (playbook.delay.long | int) }}"
- name: Generate argo-cd API token - name: Generate argo-cd API token
ansible.builtin.uri: ansible.builtin.uri:

View File

@ -40,7 +40,7 @@
register: api_readycheck register: api_readycheck
until: api_readycheck.json.apiVersion is defined until: api_readycheck.json.apiVersion is defined
retries: "{{ playbook.retries }}" retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark * playbook.delay.medium) | int }}" delay: "{{ (storage_benchmark | int) * (playbook.delay.medium | int) }}"
- name: Install kubectl tab-completion - name: Install kubectl tab-completion
ansible.builtin.shell: ansible.builtin.shell:
@ -77,4 +77,4 @@
until: until:
- k8snode_patch.result.metadata.labels['ova.airgappedk8s/moref_id'] is defined - k8snode_patch.result.metadata.labels['ova.airgappedk8s/moref_id'] is defined
retries: "{{ playbook.retries }}" retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark * playbook.delay.medium) | int }}" delay: "{{ (storage_benchmark | int) * (playbook.delay.medium | int) }}"

View File

@ -19,7 +19,7 @@
- api_readycheck.json.status is defined - api_readycheck.json.status is defined
- api_readycheck.json.status == 'healthy' - api_readycheck.json.status == 'healthy'
retries: "{{ playbook.retries }}" retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark * playbook.delay.long) | int }}" delay: "{{ (storage_benchmark | int) * (playbook.delay.long | int) }}"
- name: Push images to registry - name: Push images to registry
ansible.builtin.shell: ansible.builtin.shell:
@ -40,7 +40,7 @@
loop_control: loop_control:
label: "{{ item | basename }}" label: "{{ item | basename }}"
retries: "{{ playbook.retries }}" retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark * playbook.delay.short) | int }}" delay: "{{ ((storage_benchmark | float) * playbook.delay.short) | int }}"
until: push_result is not failed until: push_result is not failed
module_defaults: module_defaults:

View File

@ -17,7 +17,7 @@
until: until:
- api_readycheck is not failed - api_readycheck is not failed
retries: "{{ playbook.retries }}" retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark * playbook.delay.long) | int }}" delay: "{{ (storage_benchmark | int) * (playbook.delay.long | int) }}"
module_defaults: module_defaults:
ansible.builtin.uri: ansible.builtin.uri:

View File

@ -150,7 +150,7 @@
register: certificate_subject register: certificate_subject
until: certificate_subject is not failed until: certificate_subject is not failed
retries: "{{ playbook.retries }}" retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark * playbook.delay.medium) | int }}" delay: "{{ (storage_benchmark | int) * (playbook.delay.medium | int) }}"
- name: Apply workload cluster manifest - name: Apply workload cluster manifest
kubernetes.core.k8s: kubernetes.core.k8s:
definition: >- definition: >-
@ -168,7 +168,7 @@
register: cluster_readycheck register: cluster_readycheck
until: cluster_readycheck is succeeded until: cluster_readycheck is succeeded
retries: "{{ playbook.retries }}" retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark * playbook.delay.long) | int }}" delay: "{{ (storage_benchmark | int) * (playbook.delay.long | int) }}"
- name: Initialize tempfile - name: Initialize tempfile
ansible.builtin.tempfile: ansible.builtin.tempfile:

View File

@ -26,7 +26,7 @@
- name: Calculate crude storage benchmark - name: Calculate crude storage benchmark
ansible.builtin.set_fact: ansible.builtin.set_fact:
storage_benchmark: "{{ (end_time | int - start_time | int) }}" storage_benchmark: "{{ [storage_benchmark, (end_time | int - start_time | int)] | max }}"
- debug: - debug:
var: storage_benchmark var: storage_benchmark

View File

@ -8,5 +8,5 @@
label: "{{ item | basename }}" label: "{{ item | basename }}"
# Probably should add a task before that ensures K3s node is fully initialized before starting imports; currently K3s goes away briefly during this loop # Probably should add a task before that ensures K3s node is fully initialized before starting imports; currently K3s goes away briefly during this loop
retries: "{{ playbook.retries }}" retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark * playbook.delay.short) | int }}" delay: "{{ ((storage_benchmark | float) * playbook.delay.short) | int }}"
until: import_result is not failed until: import_result is not failed

View File

@ -5,7 +5,7 @@
schema: vsphere schema: vsphere
register: vcenter_info register: vcenter_info
retries: "{{ playbook.retries }}" retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark * playbook.delay.short) | int }}" delay: "{{ ((storage_benchmark | float) * playbook.delay.short) | int }}"
until: vcenter_info is not failed until: vcenter_info is not failed
module_defaults: module_defaults:

View File

@ -5,3 +5,6 @@ playbook:
long: 2 long: 2
medium: 1 medium: 1
short: 0.5 short: 0.5
# This default value is updated during the playbook, based on an I/O intensive operation
storage_benchmark: 30

View File

@ -24,7 +24,7 @@
- nodedrain_results is not failed - nodedrain_results is not failed
- (nodedrain_results.stdout_lines | last) is match('node/.* drained') - (nodedrain_results.stdout_lines | last) is match('node/.* drained')
retries: "{{ playbook.retries }}" retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark * playbook.delay.short) | int }}" delay: "{{ ((storage_benchmark | float) * playbook.delay.short) | int }}"
- name: Delete node - name: Delete node
kubernetes.core.k8s: kubernetes.core.k8s:

View File

@ -43,7 +43,7 @@
- api_readycheck.json.status is defined - api_readycheck.json.status is defined
- api_readycheck.json.status == 'ok' - api_readycheck.json.status == 'ok'
retries: "{{ playbook.retries }}" retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark * playbook.delay.long) | int }}" delay: "{{ (storage_benchmark | int) * (playbook.delay.long | int) }}"
module_defaults: module_defaults:
ansible.builtin.uri: ansible.builtin.uri:

View File

@ -19,7 +19,7 @@
loop_control: loop_control:
label: "{{ item | basename }}" label: "{{ item | basename }}"
retries: "{{ playbook.retries }}" retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark * playbook.delay.short) | int }}" delay: "{{ ((storage_benchmark | float) * playbook.delay.short) | int }}"
until: push_result is not failed until: push_result is not failed
- name: Get all stored container images (=artifacts) - name: Get all stored container images (=artifacts)

View File

@ -18,7 +18,7 @@
- api_readycheck.json.status is defined - api_readycheck.json.status is defined
- api_readycheck.json.status == 'pass' - api_readycheck.json.status == 'pass'
retries: "{{ playbook.retries }}" retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark * playbook.delay.long) | int }}" delay: "{{ (storage_benchmark | int) * (playbook.delay.long | int) }}"
module_defaults: module_defaults:
ansible.builtin.uri: ansible.builtin.uri:

View File

@ -17,7 +17,7 @@
until: until:
- api_readycheck.json.Version is defined - api_readycheck.json.Version is defined
retries: "{{ playbook.retries }}" retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark * playbook.delay.long) | int }}" delay: "{{ (storage_benchmark | int) * (playbook.delay.long | int) }}"
module_defaults: module_defaults:
ansible.builtin.uri: ansible.builtin.uri:

View File

@ -40,7 +40,7 @@
register: api_readycheck register: api_readycheck
until: api_readycheck.json.apiVersion is defined until: api_readycheck.json.apiVersion is defined
retries: "{{ playbook.retries }}" retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark * playbook.delay.medium) | int }}" delay: "{{ (storage_benchmark | int) * (playbook.delay.medium | int) }}"
- name: Install kubectl tab-completion - name: Install kubectl tab-completion
ansible.builtin.shell: ansible.builtin.shell:
@ -77,4 +77,4 @@
until: until:
- k8snode_patch.result.metadata.labels['ova.airgappedk8s/moref_id'] is defined - k8snode_patch.result.metadata.labels['ova.airgappedk8s/moref_id'] is defined
retries: "{{ playbook.retries }}" retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark * playbook.delay.medium) | int }}" delay: "{{ (storage_benchmark | int) * (playbook.delay.medium | int) }}"

View File

@ -18,7 +18,7 @@
- api_readycheck.json.status is defined - api_readycheck.json.status is defined
- api_readycheck.json.status == 'healthy' - api_readycheck.json.status == 'healthy'
retries: "{{ playbook.retries }}" retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark * playbook.delay.long) | int }}" delay: "{{ (storage_benchmark | int) * (playbook.delay.long | int) }}"
module_defaults: module_defaults:
ansible.builtin.uri: ansible.builtin.uri:

View File

@ -25,7 +25,7 @@
- (volume_details.json | json_query('data[? state==`attached`].robustness') | unique | length) == 1 - (volume_details.json | json_query('data[? state==`attached`].robustness') | unique | length) == 1
- (volume_details.json | json_query('data[? state==`attached`].robustness') | first) == "healthy" - (volume_details.json | json_query('data[? state==`attached`].robustness') | first) == "healthy"
retries: "{{ ( playbook.retries * 2) | int }}" retries: "{{ ( playbook.retries * 2) | int }}"
delay: "{{ (storage_benchmark * playbook.delay.long) | int }}" delay: "{{ (storage_benchmark | int) * (playbook.delay.long | int) }}"
- name: Upgrade longhorn chart - name: Upgrade longhorn chart
kubernetes.core.helm: kubernetes.core.helm:
@ -44,7 +44,7 @@
until: until:
- api_readycheck is not failed - api_readycheck is not failed
retries: "{{ playbook.retries }}" retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark * playbook.delay.long) | int }}" delay: "{{ (storage_benchmark | int) * (playbook.delay.long | int) }}"
module_defaults: module_defaults:
ansible.builtin.uri: ansible.builtin.uri:

View File

@ -8,4 +8,4 @@
until: until:
- api_readycheck.json.apiVersion is defined - api_readycheck.json.apiVersion is defined
retries: "{{ playbook.retries }}" retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark * playbook.delay.medium) | int }}" delay: "{{ (storage_benchmark | int) * (playbook.delay.medium | int) }}"