From 8db7727d47def6ea294dc7894f77493b8bfc6ed6 Mon Sep 17 00:00:00 2001 From: amyangfei Date: Fri, 1 Jul 2022 18:44:14 +0800 Subject: [PATCH 1/3] chaos(engine): add time shift chaos test --- .github/workflows/dataflow_engine_chaos.yaml | 1 + .../chaos/manifests/time-shift-dataflow.yaml | 24 +++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 engine/chaos/manifests/time-shift-dataflow.yaml diff --git a/.github/workflows/dataflow_engine_chaos.yaml b/.github/workflows/dataflow_engine_chaos.yaml index b395788adbd..035e2ccfe53 100644 --- a/.github/workflows/dataflow_engine_chaos.yaml +++ b/.github/workflows/dataflow_engine_chaos.yaml @@ -31,6 +31,7 @@ jobs: "pod-kill-dataflow", "network-partition-dataflow", "network-emulation-dataflow", + "time-shift-dataflow", ] # Steps represent a sequence of tasks that will be executed as part of the job diff --git a/engine/chaos/manifests/time-shift-dataflow.yaml b/engine/chaos/manifests/time-shift-dataflow.yaml new file mode 100644 index 00000000000..e5ff22abb16 --- /dev/null +++ b/engine/chaos/manifests/time-shift-dataflow.yaml @@ -0,0 +1,24 @@ +apiVersion: chaos-mesh.org/v1alpha1 +kind: TimeChaos +metadata: + name: time-shift-dataflow + labels: + app: time-shift-dataflow +spec: + mode: one + duration: "30s" + selector: + pods: + default: # default namespace + - server-master-0 + - server-master-1 + - server-master-2 + - executor-0 + - executor-1 + - executor-2 + - executor-3 + timeOffset: '-10m' + clockIds: + - CLOCK_REALTIME + scheduler: + cron: "@every 2m" From 778bf36fb0167d5a4db2bb1a506ce8fceac40a32 Mon Sep 17 00:00:00 2001 From: amyangfei Date: Mon, 4 Jul 2022 11:30:48 +0800 Subject: [PATCH 2/3] change mode to random-max-percent --- engine/chaos/manifests/time-shift-dataflow.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engine/chaos/manifests/time-shift-dataflow.yaml b/engine/chaos/manifests/time-shift-dataflow.yaml index e5ff22abb16..db1b967796f 100644 --- a/engine/chaos/manifests/time-shift-dataflow.yaml +++ b/engine/chaos/manifests/time-shift-dataflow.yaml @@ -5,7 +5,8 @@ metadata: labels: app: time-shift-dataflow spec: - mode: one + mode: random-max-percent + value: 60 duration: "30s" selector: pods: From 2d0667bc98c1c225b06a5d40d7bd8239fe221e1b Mon Sep 17 00:00:00 2001 From: amyangfei Date: Mon, 4 Jul 2022 12:03:46 +0800 Subject: [PATCH 3/3] use fixed mode --- engine/chaos/manifests/time-shift-dataflow.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/chaos/manifests/time-shift-dataflow.yaml b/engine/chaos/manifests/time-shift-dataflow.yaml index db1b967796f..d589377404a 100644 --- a/engine/chaos/manifests/time-shift-dataflow.yaml +++ b/engine/chaos/manifests/time-shift-dataflow.yaml @@ -5,8 +5,8 @@ metadata: labels: app: time-shift-dataflow spec: - mode: random-max-percent - value: 60 + mode: fixed + value: 5 duration: "30s" selector: pods: