Skip to content

Commit

Permalink
Fix: Reslove ingress network chaos plugin issue
Browse files Browse the repository at this point in the history
Added network_chaos to plugin step and job wait time to be based on the test duration and set the default wait_time to 30s

Signed-off-by: yogananth subramanian <[email protected]>
  • Loading branch information
yogananth-subramanian authored and chaitanyaenr committed Mar 22, 2024
1 parent 782440c commit a1b81bd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions kraken/plugins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,12 @@ def json_schema(self):
"error"
]
),
PluginStep(
network_chaos,
[
"error"
]
),
PluginStep(
pod_outage,
[
Expand Down
6 changes: 3 additions & 3 deletions kraken/plugins/network/ingress_shaping.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class NetworkScenarioConfig:
typing.Optional[int],
validation.min(1)
] = field(
default=300,
default=30,
metadata={
"name": "Wait Duration",
"description":
Expand Down Expand Up @@ -864,7 +864,7 @@ def network_chaos(cfg: NetworkScenarioConfig) -> typing.Tuple[
)
logging.info("Waiting for parallel job to finish")
start_time = int(time.time())
wait_for_job(batch_cli, job_list[:], cfg.wait_duration)
wait_for_job(batch_cli, job_list[:], cfg.test_duration+100)
end_time = int(time.time())
if publish:
cerberus.publish_kraken_status(
Expand Down Expand Up @@ -893,7 +893,7 @@ def network_chaos(cfg: NetworkScenarioConfig) -> typing.Tuple[
)
logging.info("Waiting for serial job to finish")
start_time = int(time.time())
wait_for_job(batch_cli, job_list[:], cfg.wait_duration)
wait_for_job(batch_cli, job_list[:], cfg.test_duration+100)
logging.info("Deleting jobs")
delete_jobs(cli, batch_cli, job_list[:])
job_list = []
Expand Down

0 comments on commit a1b81bd

Please sign in to comment.