imrajdas / litmus

Litmus is a toolset to do chaos engineering in a kubernetes native way. Litmus provides chaos CRDs for Cloud-Native developers and SREs to inject, orchestrate and monitor chaos to find weaknesses in Kubernetes deployments. Community notes is at https://hackmd.io/a4Zu_sH4TZGeih-xCimi3Q
https://litmuschaos.io
Apache License 2.0
1 stars 0 forks source link

k8s Probe not starting up #40 #43

Open imrajdas opened 1 year ago

imrajdas commented 1 year ago

What happened: I'm just trying to run a vanilla k8sProbe. I've done the simplest tests possible (checking for the presence/absence of a pod etc.), as well as just tried the "create" k8sProbe from the example docs. Please see error logs & yaml logs below:

CHAOSENGINE TEMPLATE apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: namespace: {{inputs.parameters.chaos_namespace}} generateName: pod-cpu-engine- labels: executionId: {{inputs.parameters.execution_id}} spec: appinfo: appns: {{inputs.parameters.app_namespace}} applabel: {{inputs.parameters.target_label}} appkind: {{inputs.parameters.app_kind}} engineState: active chaosServiceAccount: {{inputs.parameters.chaos_service_account}} components: runner: nodeSelector: agentpool: compute experiments:

I just want to get a k8sProbe working without failure. As from the logs, the chaosengine is able to correctly see the small-interactive-ads-1 pod from the logs below. But then, the k8sProbe within the chaosengine is unable to recognize the same pod.

time="2023-04-06T16:06:33Z" level=info msg="[Status]: The status of Pods are as follows" Status=Running Pod=small-interactive-ads-1 time="2023-04-06T16:06:37Z" level=info msg="[Info]: The chaos tunables are:" CPU Core=0 CPU Load Percentage=10 Sequence=parallel PodsAffectedPerc=100 time="2023-04-06T16:06:37Z" level=info msg="[Chaos]:Number of pods targeted: 1" time="2023-04-06T16:06:37Z" level=info msg="Target pods list for chaos, [small-interactive-ads-1]" Where can this issue be corrected? (optional)

How to reproduce it (as minimally and precisely as possible): Run above chaos engine (but entire litmus setup will change the actual scenario).

Anything else we need to know?:

imrajdas commented 1 year ago

The issue seems to be with the k8sProbe not recognizing the pod even though it is present and running. This could be due to incorrect input parameters or a bug in the k8sProbe implementation.

As a user, you can try the following solutions:

  1. Double check the input parameters for the k8sProbe and ensure that they are correct.
  2. Try running the k8sProbe manually outside of the chaosengine to see if it works correctly.
  3. Check if there are any known issues or bugs with the k8sProbe implementation and report them to the Litmus team on their GitHub issues page.

Additionally, you can refer to the Litmus documentation for more information on troubleshooting issues with their tools.