Skip to content

Commit

Permalink
Fixing BMO for CNV
Browse files Browse the repository at this point in the history
CNV w/ OpenShift 4.15 was broken. This should fix it.

Signed-off-by: Joe Talerico <[email protected]>
  • Loading branch information
Joe Talerico authored and dry923 committed Mar 12, 2024
1 parent 081359d commit 576ee97
Show file tree
Hide file tree
Showing 20 changed files with 47 additions and 44 deletions.
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
FROM quay.io/operator-framework/ansible-operator:v1.9.0
FROM quay.io/operator-framework/ansible-operator:v1.32.0
USER root

COPY requirements.yml ${HOME}/requirements.yml
RUN python3 -m pip install jmespath
RUN ansible-galaxy collection install community.general
RUN ansible-galaxy collection list
RUN ansible-galaxy collection install -r ${HOME}/requirements.yml \
&& chmod -R ug+rwx ${HOME}/.ansible

Expand Down
2 changes: 1 addition & 1 deletion playbooks/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
when: workload.args.drop_cache_kernel is defined

- name: Capture operator information
k8s_facts:
k8s_info:
kind: Pod
api_version: v1
namespace: "{{ operator_namespace }}"
Expand Down
4 changes: 2 additions & 2 deletions requirements.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
collections:
- name: community.kubernetes
version: "1.2.1"
version: "2.0.1"
- name: operator_sdk.util
version: "0.2.0"
version: "0.5.0"
10 changes: 5 additions & 5 deletions roles/backpack/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
when: benchmark_state.resources[0].status.state is not defined

- name: Get benchmark state
k8s_facts:
k8s_info:
api_version: ripsaw.cloudbulldozer.io/v1alpha1
kind: Benchmark
name: "{{ ansible_operator_meta.name }}"
namespace: "{{ operator_namespace }}"
register: benchmark_state

- name: Get DaemonSet state
k8s_facts:
k8s_info:
api_version: apps/v1
kind: DaemonSet
name: "backpack-{{ trunc_uuid }}"
Expand All @@ -36,7 +36,7 @@
definition: "{{ lookup('template', 'backpack.yml') | from_yaml }}"

- name: Get DaemonSet Status
k8s_facts:
k8s_info:
api_version: apps/v1
kind: DaemonSet
name: "backpack-{{ trunc_uuid }}"
Expand All @@ -52,7 +52,7 @@
- block:

- name: Get initial pod list
k8s_facts:
k8s_info:
kind: Pod
namespace: "{{ operator_namespace }}"
label_selectors:
Expand Down Expand Up @@ -82,7 +82,7 @@
when: workload.name != "backpack"

- name: Get benchmark state
k8s_facts:
k8s_info:
api_version: ripsaw.cloudbulldozer.io/v1alpha1
kind: Benchmark
name: "{{ ansible_operator_meta.name }}"
Expand Down
2 changes: 1 addition & 1 deletion roles/common/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# common tasks across multiple roles go here
- block:
- name: Get Network Policy
k8s_facts:
k8s_info:
kind: NetworkPolicy
api_version: networking.k8s.io/v1
namespace: '{{ operator_namespace }}'
Expand Down
2 changes: 1 addition & 1 deletion roles/fio_distributed/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@

- block:
- name: wait for db creation job to finish
k8s_facts:
k8s_info:
kind: Job
api_version: batch/v1
name: 'fio-prefill-{{ trunc_uuid }}'
Expand Down
2 changes: 1 addition & 1 deletion roles/hammerdb/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@
- block:
- block:
- name: wait for db creation job to finish
k8s_facts:
k8s_info:
kind: Job
api_version: batch/v1
name: '{{ ansible_operator_meta.name }}-creator-{{ trunc_uuid }}'
Expand Down
2 changes: 1 addition & 1 deletion roles/kernel_cache_drop/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
shell: "python3 /opt/ansible/roles/kernel_cache_drop/wait_for_daemonset.py 30 {{ operator_namespace }} kernel-cache-dropper"

- name: get kernel cache dropper pods
k8s_facts:
k8s_info:
kind: Pod
label_selectors:
- name = kernel-cache-dropper
Expand Down
14 changes: 7 additions & 7 deletions roles/nighthawk/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
- block:

- name: Get server pods
k8s_facts:
k8s_info:
kind: Pod
api_version: v1
namespace: '{{ operator_namespace }}'
Expand All @@ -46,7 +46,7 @@
- block:

- name: Get server pod info
k8s_facts:
k8s_info:
kind: Pod
api_version: v1
namespace: '{{ operator_namespace }}'
Expand All @@ -55,7 +55,7 @@
register: server_pods

- name: Get route info
k8s_facts:
k8s_info:
kind: Route
api_version: route.openshift.io/v1
namespace: '{{ operator_namespace }}'
Expand Down Expand Up @@ -86,7 +86,7 @@

- block:
- name: Get client pod status
k8s_facts:
k8s_info:
kind: Pod
api_version: v1
namespace: '{{ operator_namespace }}'
Expand Down Expand Up @@ -129,7 +129,7 @@
- block:
- block:
- name: Waiting for pods to complete....
k8s_facts:
k8s_info:
kind: pod
api_version: v1
namespace: '{{ operator_namespace }}'
Expand Down Expand Up @@ -157,7 +157,7 @@

- block:
- name: Get Server Jobs
k8s_facts:
k8s_info:
kind: Job
api_version: v1
namespace: '{{ operator_namespace }}'
Expand All @@ -166,7 +166,7 @@
register: server_jobs

- name: Get Server Pods
k8s_facts:
k8s_info:
kind: Pod
api_version: v1
namespace: '{{ operator_namespace }}'
Expand Down
2 changes: 1 addition & 1 deletion roles/pgbench/tasks/run_workload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
command: "redis-cli set pgb_start true"

- name: Check for pods to complete
k8s_facts:
k8s_info:
kind: pod
api_version: v1
namespace: '{{ operator_namespace }}'
Expand Down
6 changes: 3 additions & 3 deletions roles/testpmd/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
- block:

- name: Wait for pods to be running....
k8s_facts:
k8s_info:
kind: Pod
api_version: v1
namespace: '{{ operator_namespace }}'
Expand Down Expand Up @@ -65,7 +65,7 @@

- block:
- name: Get TestPMD pod info
k8s_facts:
k8s_info:
kind: Pod
api_version: v1
namespace: '{{ operator_namespace }}'
Expand All @@ -89,7 +89,7 @@
- block:

- name: Wait for pods to be running....
k8s_facts:
k8s_info:
kind: Pod
api_version: v1
namespace: '{{ operator_namespace }}'
Expand Down
4 changes: 2 additions & 2 deletions roles/uperf-scale/tasks/cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
### <POD> kind
# Cleanup servers, but leave clients around mostly for further examining of results.
- name: Get Server Jobs
k8s_facts:
k8s_info:
kind: Job
api_version: v1
namespace: '{{ operator_namespace }}'
Expand All @@ -13,7 +13,7 @@
register: server_jobs

- name: Get Server Pods
k8s_facts:
k8s_info:
kind: Pod
api_version: v1
namespace: '{{ operator_namespace }}'
Expand Down
2 changes: 1 addition & 1 deletion roles/uperf-scale/tasks/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
num_server_pods: "{{ (node_hi_idx|int+1) * (pod_hi_idx|int+1) }}"

- name: Capture ServiceIP
k8s_facts:
k8s_info:
kind: Service
api_version: v1
namespace: '{{ operator_namespace }}'
Expand Down
2 changes: 1 addition & 1 deletion roles/uperf-scale/tasks/start_client.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---

- name: Get pod info
k8s_facts:
k8s_info:
kind: Pod
api_version: v1
namespace: '{{ operator_namespace }}'
Expand Down
2 changes: 1 addition & 1 deletion roles/uperf-scale/tasks/start_server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
# to derive its affinity according the 'colocate' variable
#
- name: Wait for pods to be running....
k8s_facts:
k8s_info:
kind: Pod
api_version: v1
namespace: '{{ operator_namespace }}'
Expand Down
2 changes: 1 addition & 1 deletion roles/uperf-scale/tasks/wait_client_done.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- block:
### <POD> kind
- name: Waiting for pods to complete....
k8s_facts:
k8s_info:
kind: pod
api_version: v1
namespace: '{{ operator_namespace }}'
Expand Down
2 changes: 1 addition & 1 deletion roles/uperf-scale/tasks/wait_client_ready.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
### <POD> kind

- name: Get client pod status
k8s_facts:
k8s_info:
kind: Pod
api_version: v1
namespace: '{{ operator_namespace }}'
Expand Down
2 changes: 1 addition & 1 deletion roles/uperf-scale/tasks/wait_server_ready.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
### <POD> kind

- name: Get server pods
k8s_facts:
k8s_info:
kind: Pod
api_version: v1
namespace: '{{ operator_namespace }}'
Expand Down
20 changes: 10 additions & 10 deletions roles/uperf/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---

- name: Capture ServiceIP
k8s_facts:
k8s_info:
kind: Service
api_version: v1
namespace: '{{ operator_namespace }}'
Expand Down Expand Up @@ -62,7 +62,7 @@
- block:

- name: Get server pods
k8s_facts:
k8s_info:
kind: Pod
api_version: v1
namespace: '{{ operator_namespace }}'
Expand All @@ -83,7 +83,7 @@
- block:

- name: Wait for vms to be running....
k8s_facts:
k8s_info:
kind: VirtualMachineInstance
api_version: kubevirt.io/v1alpha3
namespace: '{{ operator_namespace }}'
Expand All @@ -108,7 +108,7 @@
- block:

- name: Get pod info
k8s_facts:
k8s_info:
kind: Pod
api_version: v1
namespace: '{{ operator_namespace }}'
Expand Down Expand Up @@ -153,7 +153,7 @@
- block:

- name: Wait for vms to be running....
k8s_facts:
k8s_info:
kind: VirtualMachineInstance
api_version: kubevirt.io/v1alpha3
namespace: '{{ operator_namespace }}'
Expand Down Expand Up @@ -187,7 +187,7 @@

- block:
- name: Get client pod status
k8s_facts:
k8s_info:
kind: Pod
api_version: v1
namespace: '{{ operator_namespace }}'
Expand Down Expand Up @@ -218,7 +218,7 @@
command: "redis-cli set complete-{{ trunc_uuid }} false"

- name: Get client vm status
k8s_facts:
k8s_info:
kind: VirtualMachineInstance
api_version: kubevirt.io/v1alpha3
namespace: '{{ operator_namespace }}'
Expand Down Expand Up @@ -253,7 +253,7 @@
- block:
- block:
- name: Waiting for pods to complete....
k8s_facts:
k8s_info:
kind: pod
api_version: v1
namespace: '{{ operator_namespace }}'
Expand Down Expand Up @@ -295,7 +295,7 @@

- block:
- name: Get Server Jobs
k8s_facts:
k8s_info:
kind: Job
api_version: v1
namespace: '{{ operator_namespace }}'
Expand All @@ -304,7 +304,7 @@
register: server_jobs

- name: Get Server Pods
k8s_facts:
k8s_info:
kind: Pod
api_version: v1
namespace: '{{ operator_namespace }}'
Expand Down
4 changes: 2 additions & 2 deletions roles/ycsb/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
ycsb_workload_load: "workloada"

- name: Wait for Load Job to Succeed...
k8s_facts:
k8s_info:
kind: Job
api_version: batch/v1
name: 'ycsb-data-load-job-{{ ycsb_workload_load }}-{{ trunc_uuid }}'
Expand Down Expand Up @@ -108,7 +108,7 @@
ycsb_workload: "{{ workload_args.workloads[wrkload.stdout|int] }}"

- name: Wait for YCSB Workload Job to Succeed...
k8s_facts:
k8s_info:
kind: Job
api_version: batch/v1
name: 'ycsb-bench-job-{{ ycsb_workload }}-{{ trunc_uuid }}'
Expand Down

0 comments on commit 576ee97

Please sign in to comment.