Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create pod network delay failed #235

Closed
JackGzj opened this issue Nov 17, 2019 · 3 comments
Closed

create pod network delay failed #235

JackGzj opened this issue Nov 17, 2019 · 3 comments
Assignees
Labels
chaosblade-operator chaosblade-operator project type/bug Something isn't working
Milestone

Comments

@JackGzj
Copy link

JackGzj commented Nov 17, 2019

Issue Description

Bug report

Describe what happened (or what feature you want)

I installed helm and ChaosBlade Operator. Then I checked it works on "create k8s node-cpu" experiment. But when I tried "create k8s pod-network delay" experiment using the follow yaml, and the kubectl apply -f command,

apiVersion: chaosblade.io/v1alpha1
kind: ChaosBlade
metadata:
  name: delay-pod-network-by-names
spec:
  experiments:
  - scope: pod
    target: network
    action: delay
    desc: "delay pod network by names"
    matchers:
    - name: names
      value: ["nginx-thrift-6fdc688bd8-kwbds"]
    - name: namespace
      value: ["social-network"]
    - name: local-port
      value: ["8080"]
    - name: interface
      value: ["eth0"]
    - name: time
      value: ["3000"]
    - name: offset
      value: ["1000"]

I got the following result (a part of the whole result) when using kubectl get blade delay-pod-network-by-names -o json command.

{
    "status": {
        "expStatuses": [
            {
                "action": "delay",
                "error": "see resStatus for the error details",
                "resStatuses": [
                    {
                        "error": "ifconfig: SIOCSIFTXQLEN: No such device\n exit status 1 exit status 1",
                        "kind": "pod",
                        "name": "chaosblade-tool-9462j",
                        "nodeName": "192.168.199.159",
                        "state": "Error",
                        "success": false,
                        "uid": "1ddf1541-a8e4-41ed-bfe6-1d06ece92e0f"
                    }
                ],
                "scope": "pod",
                "state": "Error",
                "success": false,
                "target": "network"
            }
        ],
        "phase": "Error"
    }
}

The network info for the pod is as following:

root@v1-161:~# kubectl exec -it nginx-thrift-6fdc688bd8-kwbds -n social-network /bin/bash
root@nginx-thrift-6fdc688bd8-kwbds:/# ifconfig
eth0      Link encap:Ethernet  HWaddr 4a:8e:ea:49:4f:89  
          inet addr:172.20.1.33  Bcast:0.0.0.0  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1450  Metric:1
          RX packets:1794 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1302 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:385200 (385.2 KB)  TX bytes:146768 (146.7 KB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

root@nginx-thrift-6fdc688bd8-kwbds:/#

However, when I tried the "create k8s container-network delay" experiment for the same pod (the pod has only one container), it was success.
This problem aslo exist on the other pod.

Describe what you expected to happen

It is expected to inject network delay successfully.

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

  1. Create the yaml file as mentioned above.
  2. use kubectl create -f xxx.yaml to create the experiment.
  3. use kubectl get blade delay-pod-network-by-names -o json to see the result.

Tell us your environment

root@v1-161:~# docker -v
Docker version 18.09.6, build 481bc77
root@v1-161:~# kubectl version
Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.0", GitCommit:"e8462b5b5dc2584fdcd18e6bcfe9f1e4d970a529", GitTreeState:"clean", BuildDate:"2019-06-19T16:40:16Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.0", GitCommit:"e8462b5b5dc2584fdcd18e6bcfe9f1e4d970a529", GitTreeState:"clean", BuildDate:"2019-06-19T16:32:14Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}
root@v1-161:~# helm version
Client: &version.Version{SemVer:"v2.14.1", GitCommit:"5270352a09c7e8b6e8c9593002a73535276507c0", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.14.1", GitCommit:"5270352a09c7e8b6e8c9593002a73535276507c0", GitTreeState:"clean"}

chaosblade version

operator image: registry.cn-hangzhou.aliyuncs.com/chaosblade/chaosblade-operator:0.0.1
chaosblade-tool image: registry.cn-hangzhou.aliyuncs.com/chaosblade/chaosblade-tool:0.4.0

Anything else we need to know?

@jianxingzhe
Copy link

jianxingzhe commented Nov 19, 2019

related ot #232.
it's a bug of operator. in "create k8s pod-network delay" case, the operator find the containerId from the chaosblade-tool-9462j,rather than you assigned.

@xcaspar
Copy link
Member

xcaspar commented Nov 20, 2019

#232

@JackGzj
Copy link
Author

JackGzj commented Nov 26, 2019

Thank you and hope it to be fixed soon.

@JackGzj JackGzj closed this as completed Nov 26, 2019
@xcaspar xcaspar self-assigned this Feb 18, 2020
@xcaspar xcaspar added type/bug Something isn't working chaosblade-operator chaosblade-operator project labels Feb 18, 2020
@xcaspar xcaspar added this to the 0.4.0 milestone Feb 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chaosblade-operator chaosblade-operator project type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants