litmuschaos / litmus

Litmus helps SREs and developers practice chaos engineering in a Cloud-native way. Chaos experiments are published at the ChaosHub (https://hub.litmuschaos.io). Community notes is at https://hackmd.io/a4Zu_sH4TZGeih-xCimi3Q
https://litmuschaos.io
Apache License 2.0
4.43k stars 693 forks source link

CoreDNS Pod Delete TC fails during no internet testing. #3567

Open tanmaypandey7 opened 2 years ago

tanmaypandey7 commented 2 years ago

What happened: I am trying to run CoreDNS Pod Delete for K8s 1.22 using Litmus operator version 1.13.8. When i am running the test without internet, the test case fails, because it tries to pull openebs/tests-custom-client:latest for the pod liveness-app which has ImagePullPolicy set to Always. image

What you expected to happen: CoreDNS pod delete should run fine when I am not using internet.

Where can this issue be corrected? (optional)

From this PR i can see that I need to make a change here - experiments/coredns/pod_delete/liveness-app.j2, but I am unable to find this path in the current repo.

How to reproduce it (as minimally and precisely as possible):

  1. Use a k8s 1.22 cluster with internet off
  2. Try to run the CoreDNS pod delete experiment
  3. Run kubectl describe pod liveness-app to see the error.
avaakash commented 2 years ago

Hi, @tanmaypandey7, the directory structure has been changed for experiments, and the file you are looking for is now available in the litmus-ansible repository, attaching the link to the file. Ref: https://github.com/litmuschaos/litmus-ansible/blob/master/experiments/coredns/pod_delete/liveness-app.j2

You can raise a PR with a fix for this, thank you for raising this issue.

tanmaypandey7 commented 1 year ago

Hi @avaakash, i was going through the code and i see that CoreDNS is still available in litmus 2.14, but the experiment seems to be missing in the 2.14 documentation as checked from the source code in release page of 2.14. So, is it possible to run coreDNS using litmus 2.14?

ksatchit commented 1 year ago

Hi @tanmaypandey7 the experiment has been removed from the public chaoshub, as the same impact can be achieved using a combination of the pod-delete chaos experiment + the probes. The probes allow you to validate any custom condition via declarative definition on the ChaosEngine manifest, rather than having to burn the validation in - into the experiment binary itself.

The coredns experiment mainly focused on deleting the coredns pods, and performed a few additional validations to gauge the impact of chaos. Like I said, this can now be achieved via pod-delete + probes combination in the experiment manifest.