chaosblade-io / chaosblade-operator

chaosblade operator for kubernetes experiments
Apache License 2.0
160 stars 100 forks source link

Why there not exists "/opt/chaosblade/bin/chaos_changedns"? #126

Open penghuazhou opened 2 years ago

penghuazhou commented 2 years ago

Type: bug report

Describe what happened (or what feature you want)

Why there not exists "/opt/chaosblade/bin/chaos_changedns"? I only install chaosblade-operator use "helm install chaos-mesh chaos-mesh/chaos-mesh -n=chaos-testing --set chaosDaemon.runtime=containerd --set chaosDaemon.socketPath=/run/containerd/containerd.sock"

"resStatuses": [
                    {
                        "code": 63063,
                        "error": "`/bin/sh -c /opt/chaosblade/bin/chaos_changedns --start --domain reviews:9080 --ip 10.0.0.1 --debug=false`: cmd exec failed, err: /bin/sh: 1: /opt/chaosblade/bin/chaos_changedns: not found\n exit status 127",
                        "identifier": "default/cn-shenzhen.10.150.41.8/productpage-v1-fccd8478f-qdxj8/productpage/0dda5ef9e1d7b5f44dbf66ec601e618bc25f723e58abd20088d06eecda9e2e9b/containerd",
                        "kind": "container",
                        "state": "Error",
                        "success": false
                    }
                ],
                "scope": "container",
                "state": "Error",
                "success": false,
                "target": "network"
            }

Describe what you expected to happen

execute success

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

apiVersion: chaosblade.io/v1alpha1
kind: ChaosBlade
metadata:
  name: tamper-container-dns-by-id11
spec:
  experiments:
    - scope: container
      target: network
      action: dns
      desc: "tamper container dns by id"
      matchers:
        - name: container-ids
          value:
            - "0dda5ef9e1d7b5f44dbf66ec601e618bc25f723e58abd20088d06eecda9e2e9b"
        - name: domain
          value: ["reviews:9080"]
        - name: ip
          value: ["10.0.0.1"]
          # pod names
        - name: names
          value: ["productpage-v1-fccd8478f-qdxj8"]
          # or use pod labels

What version of Kubernetes are you using?

1.20.4-aliyun.1

What version of Chaos Mesh are you using?

Controller manager Version: version.Info{GitVersion:"v2.1.1", GitCommit:"4ebd7a21520305bd0cf38e228f84ebc639aab994", BuildDate:"2021-12-10T10:27:29Z", GoVersion:"go1.16.7", Compiler:"gc", Platform:"linux/amd64"}

cadabrum commented 2 years ago

Same problem for сhaos operator v1.4.0 (not sure why chaos mesh is mentioned in original description) after executing the tamper dns experiment on the pod level scope.

"action": "dns",
                "error": "see resStatus for the error details",
                "resStatuses": [
                    {
                        "code": 63063,
                        "error": "`/bin/sh -c /opt/chaosblade/bin/chaos_changedns --start --domain ya.ru --ip 10.0.0.1 --debug=false`: cmd exec failed, err: /bin/sh: 1: /opt/chaosblade/bin/chaos_changedns: not found\n exit status 127",
root@my_pod:/opt/chaosblade/bin# ls
chaos_os  chaos_tcnetwork

If the same experiment is ran on the node level everything works as expected.