chaosblade-operator icon indicating copy to clipboard operation
chaosblade-operator copied to clipboard

OpenShift 4.7 support

Open ntlzthm8 opened this issue 3 years ago • 0 comments

Issue Description

Type: bug report

Describe what happened (or what feature you want)

With OpenShift Container Platform 4.7, a docker socket will not be present on the host nodes. This means the mount docker socket option of a custom build is not guaranteed to provide an accessible docker socket for use within a custom build image.

chaosblade-tool - use hostPath volumes and mount docker.sock but docker.sock is missing in OKD 4.7

time="2021-09-07T07:29:28Z" level=info msg="start to create experiment" experiment=delay-pod-network-by-names
time="2021-09-07T07:29:28Z" level=info msg="get pods by names card-status-1-gr8qq, len is 1" experiment=delay-pod-network-by-names
time="2021-09-07T07:29:28Z" level=info msg="creating pod experiment, pod count is 1" experiment=delay-pod-network-by-names
time="2021-09-07T07:29:28Z" level=info msg="set container list: [{Id: ContainerId:cri-o://0f74 ContainerName:card-status PodName:card-status-1-gr8qq NodeName:ip-10-30-8-44.eu-west-1.compute.internal Namespace:nf-dev}]" experiment=delay-pod-network-by-names
time="2021-09-07T07:29:28Z" level=info msg="start to execute: &{Target:network Scope:pod ActionName:delay ActionFlags:map[interface:eth0 local-port:8081 names:card-status-1-gr8qq namespace:nf-dev offset:1000 time:3000] ActionPrograms:[] ActionCategories:[]}" experiment=delay-pod-network-by-names
time="2021-09-07T07:29:28Z" level=info msg="experiment identifiers: [{{ cri-o://0f74 card-status card-status-1-gr8qq ip-10-30-8-44.eu-west-1.compute.internal nf-dev} /opt/chaosblade/blade create docker network delay  --time=3000 --offset=1000 --local-port=8081 --interface=eth0 --image-repo chaosbladeio/chaosblade-tool --image-version 1.3.0 --container-id cri-o://0f74  0 chaosblade-tool-8fmjb chaosblade chaosblade-tool}]" experiment=delay-pod-network-by-names
time="2021-09-07T07:29:28Z" level=info msg="execute identifier: {ContainerObjectMeta:{Id: ContainerId:cri-o://0f74 ContainerName:card-status PodName:card-status-1-gr8qq NodeName:ip-10-30-8-44.eu-west-1.compute.internal Namespace:nf-dev} Command:/opt/chaosblade/blade create docker network delay  --time=3000 --offset=1000 --local-port=8081 --interface=eth0 --image-repo chaosbladeio/chaosblade-tool --image-version 1.3.0 --container-id cri-o://0f74 Error: Code:0 ChaosBladePodName:chaosblade-tool-8fmjb ChaosBladeNamespace:chaosblade ChaosBladeContainerName:chaosblade-tool}" experiment=delay-pod-network-by-names
time="2021-09-07T07:29:28Z" level=info msg="Exec command in pod" command="[/opt/chaosblade/blade create docker network delay  --time=3000 --offset=1000 --local-port=8081 --interface=eth0 --image-repo chaosbladeio/chaosblade-tool --image-version 1.3.0 --container-id cri-o://0f74]" container=chaosblade-tool podName=chaosblade-tool-8fmjb podNamespace=chaosblade
time="2021-09-07T07:29:29Z" level=info msg="get err message" command="[/opt/chaosblade/blade create docker network delay  --time=3000 --offset=1000 --local-port=8081 --interface=eth0 --image-repo chaosbladeio/chaosblade-tool --image-version 1.3.0 --container-id cri-o://0f74]" container=chaosblade-tool err="{\"code\":63062,\"success\":false,\"error\":\"`GetClient`: docker exec failed, err: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?\"}" out= podName=chaosblade-tool-8fmjb podNamespace=chaosblade
time="2021-09-07T07:29:29Z" level=error msg="`pods/exec`: k8s exec failed, err: {\"code\":63062,\"success\":false,\"error\":\"`GetClient`: docker exec failed, err: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?\"}\n" location="github.com/chaosblade-io/chaosblade-operator/exec/model.(*ExecCommandInPodExecutor).execCommands.func1" uid=
time="2021-09-07T07:29:29Z" level=info msg="success: false, statuses: [{Id: State:Error Code:63062 Error:`GetClient`: docker exec failed, err: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? Success:false Kind:pod Identifier:nf-dev/ip-10-30-8-44.eu-west-1.compute.internal/card-status-1-gr8qq/card-status/cri-o://0f74}]" experiment=delay-pod-network-by-names
time="2021-09-07T07:29:29Z" level=info msg="trigger update event, name: delay-pod-network-by-names"

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

Use OKD 4.7

Tell us your environment

OKD 4.7 Chaos Operator 1.3.0

chaosblade-tools is running with no error

image

ntlzthm8 avatar Sep 08 '21 10:09 ntlzthm8