Skip to content

Commit

Permalink
[cherrypick for 2.3.0] (#467)
Browse files Browse the repository at this point in the history
* corrected spelling for received (#463)

Signed-off-by: neelanjan00 <neelanjan@chaosnative.com>

* fix(helper): removing job-name label from the helper pod (#466)

Signed-off-by: shubham chaudhary <shubham@chaosnative.com>

* fix(image-tag): updating harden-alpine image tag

Signed-off-by: shubham chaudhary <shubham@chaosnative.com>

Co-authored-by: Neelanjan Manna <neelanjan@chaosnative.com>
  • Loading branch information
Shubham Chaudhary and Neelanjan Manna authored Nov 15, 2021
1 parent 68f942b commit c4fb546
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ RUN apk --update add \
# Packaging stage
# Image source: https://github.com/litmuschaos/test-tools/blob/master/custom/hardened-alpine/experiment/Dockerfile
# The base image is non-root (have litmus user) with default litmus directory.
FROM litmuschaos/experiment-alpine
FROM litmuschaos/experiment-alpine:2.3.0

LABEL maintainer="LitmusChaos"

Expand Down
8 changes: 4 additions & 4 deletions chaoslib/litmus/pod-fio-stress/lib/pod-fio-stress.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func experimentExecution(experimentsDetails *experimentTypes.ExperimentDetails,

// injectChaosInSerialMode stressed the storage of all target application in serial mode (one by one)
func injectChaosInSerialMode(experimentsDetails *experimentTypes.ExperimentDetails, targetPodList corev1.PodList, clients clients.ClientSets, resultDetails *types.ResultDetails, eventsDetails *types.EventDetails, chaosDetails *types.ChaosDetails) error {
// creating err channel to recieve the error from the go routine
// creating err channel to receive the error from the go routine
stressErr := make(chan error)

// run the probes during chaos
Expand Down Expand Up @@ -128,7 +128,7 @@ func injectChaosInSerialMode(experimentsDetails *experimentTypes.ExperimentDetai
endTime = time.After(timeDelay)
select {
case err := <-stressErr:
// skipping the execution, if recieved any error other than 137, while executing stress command and marked result as fail
// skipping the execution, if received any error other than 137, while executing stress command and marked result as fail
// it will ignore the error code 137(oom kill), it will skip further execution and marked the result as pass
// oom kill occurs if stor to be stressed exceed than the resource limit for the target container
if err != nil {
Expand Down Expand Up @@ -160,7 +160,7 @@ func injectChaosInSerialMode(experimentsDetails *experimentTypes.ExperimentDetai

// injectChaosInParallelMode stressed the storage of all target application in parallel mode (all at once)
func injectChaosInParallelMode(experimentsDetails *experimentTypes.ExperimentDetails, targetPodList corev1.PodList, clients clients.ClientSets, resultDetails *types.ResultDetails, eventsDetails *types.EventDetails, chaosDetails *types.ChaosDetails) error {
// creating err channel to recieve the error from the go routine
// creating err channel to receive the error from the go routine
stressErr := make(chan error)

// run the probes during chaos
Expand Down Expand Up @@ -200,7 +200,7 @@ loop:
endTime = time.After(timeDelay)
select {
case err := <-stressErr:
// skipping the execution, if recieved any error other than 137, while executing stress command and marked result as fail
// skipping the execution, if received any error other than 137, while executing stress command and marked result as fail
// it will ignore the error code 137(oom kill), it will skip further execution and marked the result as pass
// oom kill occurs if stor to be stressed exceed than the resource limit for the target container
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions pkg/utils/common/pods.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ func SetHelperData(chaosDetails *types.ChaosDetails, clients clients.ClientSets)
// Get Labels
labels := pod.ObjectMeta.Labels
delete(labels, "controller-uid")
delete(labels, "job-name")
chaosDetails.Labels = labels

// Get Resource Requirements
Expand Down

0 comments on commit c4fb546

Please sign in to comment.