chaos-mesh: specify a pod which is not existed, will get a confusing experiment status

Bug Report

What version of Kubernetes are you using?

1.16.6

What version of Chaos Mesh are you using?

2.2.0

What did you do?

specify a pod which is not existed, like

apiVersion: chaos-mesh.org/v1alpha1
kind: PodChaos
metadata:
  finalizers:
  - chaos-mesh/records
  namespace: chaos-testing
spec:
  action: pod-kill
  gracePeriod: 0
  mode: fixed
  selector:
    namespaces:
    - chaos-testing
    pods:
      bar:
      - foo
  value: "2"

in this case, there is no pod called foo in bar namespace in k8s cluster.

What did you expect to see? some error message which tell me, the pod is not found, and the selecting failed.

What did you see instead? I get a confusing status:

status:
  conditions:
  - reason: ""
    status: "False"
    type: Selected
  - reason: ""
    status: "True"
    type: AllInjected
  - reason: ""
    status: "True"
    type: AllRecovered
  - reason: ""
    status: "False"
    type: Paused
  experiment:
    desiredPhase: Run

Output of chaosctl

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 15 (15 by maintainers)

Most upvoted comments

looks like the reason field in the condition will always be empty? I think put some details in it would be a good idea 😆

WDYT? @STRRL @YangKeao