Skip to main content
Version: 2.7.0

ChaosResult


ChaosResult resource holds the results of a ChaosExperiment with a namespace scope. It is created or updated at runtime by the experiment itself. It holds important information like the ChaosEngine reference, Experiment State, Verdict of the experiment (on completion), salient application/result attributes. It is also a source for metrics collection. It is updated/patched with the status of the experiment run. It is not removed as part of the default cleanup procedures to allow for extended reference.

Prerequisites​

To understand the concept of ChaosResult, make sure you have good knowledge of the ChaosEngine CR and Chaos Workflow.

ChaosResult Spec​

This section describes the fields/details provided by the ChaosResult spec.

Component Details​

Field.spec.engine
DescriptionFlag to hold the ChaosEngine name for the experiment
TypeOptional
Rangen/a (type: string)
NotesThe .spec.engine holds the engine name for the current course of the experiment.
Field.spec.experiment
DescriptionFlag to hold the ChaosExperiment name which induces chaos.
TypeOptional
Rangen/a (type: string)
NotesThe .spec.experiment holds the ChaosExperiment name for the current course of the experiment.

Status Details​

Field.status.experimentStatus.failstep
DescriptionFlag to show the failure step of the ChaosExperiment
TypeMandatory
Rangen/a(type: string)
NotesThe .status.experimentStatus.failstep Show the step at which the experiment failed. It helps in faster debugging of failures in the experiment execution.
Field.status.experimentStatus.phase
DescriptionFlag to show the current phase of the experiment
TypeMandatory
RangeAwaited,Running,Completed,Aborted (type: string)
NotesThe .status.experimentStatus.phase shows the current phase in which the experiment is. It gets updated as the experiment proceeds.If the experiment is aborted then the status will be Aborted.
Field.status.experimentStatus.probesuccesspercentage
DescriptionFlag to show the probe success percentage
TypeMandatory
Range1 to 100 (type: int)
NotesThe .status.experimentStatus.probesuccesspercentage shows the probe success percentage which is a ratio of successful checks v/s total probes.
Field.status.experimentStatus.verdict
DescriptionFlag to show the verdict of the experiment.
TypeMandatory
RangeAwaited,Pass,Fail,Stopped (type: string)
NotesThe .status.experimentStatus.verdict shows the verdict of the experiment. It is Awaited when the experiment is in progress and ends up with Pass or Fail according to the experiment result.
Field.status.history.passedRuns
DescriptionIt contains cumulative passed run count
TypeMandatory
Range ANY NON NEGATIVE INTEGER
NotesThe .status.history.passedRuns contains cumulative passed run counts for a specific ChaosResult.
Field.status.history.failedRuns
DescriptionIt contains cumulative failed run count
TypeMandatory
Range ANY NON NEGATIVE INTEGER
NotesThe .status.history.failedRuns contains cumulative failed run counts for a specific ChaosResult.
Field.status.history.stoppedRuns
DescriptionIt contains cumulative stopped run count
TypeMandatory
Range ANY NON NEGATIVE INTEGER
NotesThe .status.history.stoppedRuns contains cumulative stopped run counts for a specific ChaosResult.

Probe Details​

Field.status.probestatus.name
DescriptionFlag to show the name of probe used in the experiment
TypeMandatory
Rangen/a n/a (type: string)
NotesThe .status.probestatus.name shows the name of the probe used in the experiment.
Field.status.probestatus.status.continuous
DescriptionFlag to show the result of probe in continuous mode
TypeOptional
RangeAwaited,Passed,Better Luck Next Time (type: string)
NotesThe .status.probestatus.status.continuous helps to get the result of the probe in the continuous mode. The httpProbe is better used in the Continuous mode.
Field.status.probestatus.status.postchaos
DescriptionFlag to show the probe result post chaos
TypeOptional
RangeAwaited,Passed,Better Luck Next Time (type:map[string]string)
NotesThe .status.probestatus.status.postchaos shows the result of probe setup in EOT mode executed at the End of Test as a post-chaos check.
Field.status.probestatus.status.prechaos
DescriptionFlag to show the probe result pre chaos
RangeAwaited,Passed,Better Luck Next Time (type:string)
NotesThe .status.probestatus.status.prechaos shows the result of probe setup in SOT mode executed at the Start of Test as a pre-chaos check.
Field.status.probestatus.type
DescriptionFlag to show the type of probe used
RangeHTTPProbe,K8sProbe,CmdProbe(type:string)
NotesThe .status.probestatus.type shows the type of probe used.

Summary​

Just like the ChaosExperiment CR and ChaosEngine CR, ChaosResult is a Custom Resource provided by Litmus. ChaosResult resource holds the results of a ChaosExperiment. It comprises of some important information related to the experiment execution like Experiment Details, Verdict, Phase, ProbeSuccessPercentage etc. It is updated/patched with every experiment run. It can also be used as a source for matrics collection.

Learn More​