Skip to content

Commit

Permalink
Hog scenario porting from arcaflow to native (#748)
Browse files Browse the repository at this point in the history
* added new native hog scenario

* removed arcaflow dependency + legacy hog scenarios

* config update

* changed hog configuration structure + added average samples

* fix on cpu count

* removes tripledes warning

* changed selector format

* changed selector syntax

* number of nodes option

* documentation

* functional tests

* exception handling on hog deployment thread

Signed-off-by: Paige Patton <[email protected]>
  • Loading branch information
tsebastiani authored and paigerube14 committed Jan 31, 2025
1 parent 64cfd2c commit 82b4cea
Show file tree
Hide file tree
Showing 52 changed files with 588 additions and 1,313 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ jobs:
echo "test_namespace" >> ./CI/tests/functional_tests
echo "test_net_chaos" >> ./CI/tests/functional_tests
echo "test_time" >> ./CI/tests/functional_tests
echo "test_arca_cpu_hog" >> ./CI/tests/functional_tests
echo "test_arca_memory_hog" >> ./CI/tests/functional_tests
echo "test_arca_io_hog" >> ./CI/tests/functional_tests
echo "test_cpu_hog" >> ./CI/tests/functional_tests
echo "test_memory_hog" >> ./CI/tests/functional_tests
echo "test_io_hog" >> ./CI/tests/functional_tests
# Push on main only steps + all other functional to collect coverage
Expand All @@ -113,9 +113,9 @@ jobs:
echo "test_namespace" >> ./CI/tests/functional_tests
echo "test_net_chaos" >> ./CI/tests/functional_tests
echo "test_time" >> ./CI/tests/functional_tests
echo "test_arca_cpu_hog" >> ./CI/tests/functional_tests
echo "test_arca_memory_hog" >> ./CI/tests/functional_tests
echo "test_arca_io_hog" >> ./CI/tests/functional_tests
echo "test_cpu_hog" >> ./CI/tests/functional_tests
echo "test_memory_hog" >> ./CI/tests/functional_tests
echo "test_io_hog" >> ./CI/tests/functional_tests
# Final common steps
- name: Run Functional tests
Expand Down
19 changes: 0 additions & 19 deletions CI/tests/test_arca_cpu_hog.sh

This file was deleted.

19 changes: 0 additions & 19 deletions CI/tests/test_arca_io_hog.sh

This file was deleted.

19 changes: 0 additions & 19 deletions CI/tests/test_arca_memory_hog.sh

This file was deleted.

20 changes: 20 additions & 0 deletions CI/tests/test_cpu_hog.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
set -xeEo pipefail

source CI/tests/common.sh

trap error ERR
trap finish EXIT


function functional_test_cpu_hog {
yq -i '.node_selector="kubernetes.io/hostname=kind-worker2"' scenarios/kube/cpu-hog.yml

export scenario_type="hog_scenarios"
export scenario_file="scenarios/kube/cpu-hog.yml"
export post_config=""
envsubst < CI/config/common_test_config.yaml > CI/config/cpu_hog.yaml
python3 -m coverage run -a run_kraken.py -c CI/config/cpu_hog.yaml
echo "CPU Hog: Success"
}

functional_test_cpu_hog
19 changes: 19 additions & 0 deletions CI/tests/test_io_hog.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
set -xeEo pipefail

source CI/tests/common.sh

trap error ERR
trap finish EXIT


function functional_test_io_hog {
yq -i '.node_selector="kubernetes.io/hostname=kind-worker2"' scenarios/kube/io-hog.yml
export scenario_type="hog_scenarios"
export scenario_file="scenarios/kube/io-hog.yml"
export post_config=""
envsubst < CI/config/common_test_config.yaml > CI/config/io_hog.yaml
python3 -m coverage run -a run_kraken.py -c CI/config/io_hog.yaml
echo "IO Hog: Success"
}

functional_test_io_hog
19 changes: 19 additions & 0 deletions CI/tests/test_memory_hog.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
set -xeEo pipefail

source CI/tests/common.sh

trap error ERR
trap finish EXIT


function functional_test_memory_hog {
yq -i '.node_selector="kubernetes.io/hostname=kind-worker2"' scenarios/kube/memory-hog.yml
export scenario_type="hog_scenarios"
export scenario_file="scenarios/kube/memory-hog.yml"
export post_config=""
envsubst < CI/config/common_test_config.yaml > CI/config/memory_hog.yaml
python3 -m coverage run -a run_kraken.py -c CI/config/memory_hog.yaml
echo "Memory Hog: Success"
}

functional_test_memory_hog
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Scenario type | Kubernetes
[Container Scenarios](docs/container_scenarios.md) | :heavy_check_mark: |
[Node Scenarios](docs/node_scenarios.md) | :heavy_check_mark: |
[Time Scenarios](docs/time_scenarios.md) | :heavy_check_mark: |
[Hog Scenarios: CPU, Memory](docs/arcaflow_scenarios.md) | :heavy_check_mark: |
[Hog Scenarios: CPU, Memory](docs/hog_scenarios.md) | :heavy_check_mark: |
[Cluster Shut Down Scenarios](docs/cluster_shut_down_scenarios.md) | :heavy_check_mark: |
[Service Disruption Scenarios](docs/service_disruption_scenarios.md.md) | :heavy_check_mark: |
[Zone Outage Scenarios](docs/zone_outage.md) | :heavy_check_mark: |
Expand Down
7 changes: 3 additions & 4 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ kraken:
chaos_scenarios:
# List of policies/chaos scenarios to load
- hog_scenarios:
- scenarios/kube/cpu-hog/input.yaml
- scenarios/kube/memory-hog/input.yaml
- scenarios/kube/io-hog/input.yaml
- scenarios/kube/io-hog/input.yaml
- scenarios/kube/cpu-hog.yml
- scenarios/kube/memory-hog.yml
- scenarios/kube/io-hog.yml
- application_outages_scenarios:
- scenarios/openshift/app_outage.yaml
- container_scenarios: # List of chaos pod scenarios to load
Expand Down
70 changes: 0 additions & 70 deletions docs/arcaflow_scenarios.md

This file was deleted.

19 changes: 0 additions & 19 deletions docs/arcaflow_scenarios/cpu_hog.md

This file was deleted.

21 changes: 0 additions & 21 deletions docs/arcaflow_scenarios/io_hog.md

This file was deleted.

18 changes: 0 additions & 18 deletions docs/arcaflow_scenarios/memory_hog.md

This file was deleted.

Loading

0 comments on commit 82b4cea

Please sign in to comment.