Repository navigation
Open
Description
Issue Description
Type: bug report
Describe what happened (or what feature you want)
create cpu fullload to k8s pod
Describe what you expected to happen
create cpu fullload success
How to reproduce it (as minimally and precisely as possible)
./blade create k8s pod-cpu load --names etcd-0 --namespace default
{"code":54000,"success":false,"error":"add process to cgroups V2 failed, write /host-sys/fs/cgroup/cgroup.procs: no such file or directory","result":{"uid":"037fdc19967aa684","success":false,"error":"add process to cgroups V2 failed, write /host-sys/fs/cgroup/cgroup.procs: no such file or directory","statuses":[{"state":"Error","error":"add process to cgroups V2 failed, write /host-sys/fs/cgroup/cgroup.procs: no such file or directory","success":false,"kind":"pod","identifier":"default/pekphis562303/etcd-0/etcd/66c9bbe20a40/docker"}]}}
kubectl logs -f chaosblade-operator-6fd88cdf54-m94rc -n chaosblade
time="2026-01-12T06:30:20Z" level=info msg="trigger create event, name: 037fdc19967aa684"
time="2026-01-12T06:30:20Z" level=debug msg="creating obj: &{TypeMeta:{Kind: APIVersion:} ObjectMeta:{Name:037fdc19967aa684 GenerateName: Namespace: SelfLink: UID:64426b6e-8153-475c-9de2-22fefbc7e293 ResourceVersion:208188 Generation:1 CreationTimestamp:2026-01-12 06:30:20 +0000 UTC DeletionTimestamp:<nil> DeletionGracePeriodSeconds:<nil> Labels:map[] Annotations:map[] OwnerReferences:[] Finalizers:[] ClusterName: ManagedFields:[{Manager:blade Operation:Update APIVersion:chaosblade.io/v1alpha1 Time:2026-01-12 06:30:20 +0000 UTC FieldsType:FieldsV1 FieldsV1:{\"f:spec\":{\".\":{},\"f:experiments\":{}}}}]} Spec:{Experiments:[{Scope:pod Target:cpu Action:fullload Desc:created by blade command Matchers:[{Name:endpoint Value:[]} {Name:names Value:[etcd-0]} {Name:cgroup-root Value:[/host-sys/fs/cgroup]} {Name:chaosblade-download-url Value:[]} {Name:cpu-list Value:[]} {Name:chaosblade-deploy-mode Value:[]} {Name:evict-group Value:[]} {Name:evict-percent Value:[]} {Name:namespace Value:[default]} {Name:cpu-index Value:[]} {Name:climb-time Value:[]} {Name:cpu-count Value:[]} {Name:cpu-percent Value:[]} {Name:evict-count Value:[]} {Name:labels Value:[]} {Name:timeout Value:[]} {Name:chaosblade-path Value:[]} {Name:uid Value:[]}]}]} Status:{Phase: ExpStatuses:[]}}"
time="2026-01-12T06:30:20Z" level=info msg="trigger update event, name: 037fdc19967aa684"
W0112 06:30:20.310145 1 warnings.go:70] metadata.finalizers: "finalizer.chaosblade.io": prefer a domain-qualified finalizer name to avoid accidental conflicts with other finalizer writers
time="2026-01-12T06:30:20Z" level=debug msg="updating oldObj: &{TypeMeta:{Kind: APIVersion:} ObjectMeta:{Name:037fdc19967aa684 GenerateName: Namespace: SelfLink: UID:64426b6e-8153-475c-9de2-22fefbc7e293 ResourceVersion:208188 Generation:1 CreationTimestamp:2026-01-12 06:30:20 +0000 UTC DeletionTimestamp:<nil> DeletionGracePeriodSeconds:<nil> Labels:map[] Annotations:map[] OwnerReferences:[] Finalizers:[] ClusterName: ManagedFields:[{Manager:blade Operation:Update APIVersion:chaosblade.io/v1alpha1 Time:2026-01-12 06:30:20 +0000 UTC FieldsType:FieldsV1 FieldsV1:{\"f:spec\":{\".\":{},\"f:experiments\":{}}}}]} Spec:{Experiments:[{Scope:pod Target:cpu Action:fullload Desc:created by blade command Matchers:[{Name:endpoint Value:[]} {Name:names Value:[etcd-0]} {Name:cgroup-root Value:[/host-sys/fs/cgroup]} {Name:chaosblade-download-url Value:[]} {Name:cpu-list Value:[]} {Name:chaosblade-deploy-mode Value:[]} {Name:evict-group Value:[]} {Name:evict-percent Value:[]} {Name:namespace Value:[default]} {Name:cpu-index Value:[]} {Name:climb-time Value:[]} {Name:cpu-count Value:[]} {Name:cpu-percent Value:[]} {Name:evict-count Value:[]} {Name:labels Value:[]} {Name:timeout Value:[]} {Name:chaosblade-path Value:[]} {Name:uid Value:[]}]}]} Status:{Phase: ExpStatuses:[]}}"
time="2026-01-12T06:30:20Z" level=debug msg="updating newObj: &{TypeMeta:{Kind: APIVersion:} ObjectMeta:{Name:037fdc19967aa684 GenerateName: Namespace: SelfLink: UID:64426b6e-8153-475c-9de2-22fefbc7e293 ResourceVersion:208189 Generation:1 CreationTimestamp:2026-01-12 06:30:20 +0000 UTC DeletionTimestamp:<nil> DeletionGracePeriodSeconds:<nil> Labels:map[] Annotations:map[] OwnerReferences:[] Finalizers:[finalizer.chaosblade.io] ClusterName: ManagedFields:[{Manager:blade Operation:Update APIVersion:chaosblade.io/v1alpha1 Time:2026-01-12 06:30:20 +0000 UTC FieldsType:FieldsV1 FieldsV1:{\"f:spec\":{\".\":{},\"f:experiments\":{}}}} {Manager:chaosblade-operator Operation:Update APIVersion:chaosblade.io/v1alpha1 Time:2026-01-12 06:30:20 +0000 UTC FieldsType:FieldsV1 FieldsV1:{\"f:metadata\":{\"f:finalizers\":{\".\":{},\"v:\\\"finalizer.chaosblade.io\\\"\":{}}}}}]} Spec:{Experiments:[{Scope:pod Target:cpu Action:fullload Desc:created by blade command Matchers:[{Name:endpoint Value:[]} {Name:names Value:[etcd-0]} {Name:cgroup-root Value:[/host-sys/fs/cgroup]} {Name:chaosblade-download-url Value:[]} {Name:cpu-list Value:[]} {Name:chaosblade-deploy-mode Value:[]} {Name:evict-group Value:[]} {Name:evict-percent Value:[]} {Name:namespace Value:[default]} {Name:cpu-index Value:[]} {Name:climb-time Value:[]} {Name:cpu-count Value:[]} {Name:cpu-percent Value:[]} {Name:evict-count Value:[]} {Name:labels Value:[]} {Name:timeout Value:[]} {Name:chaosblade-path Value:[]} {Name:uid Value:[]}]}]} Status:{Phase: ExpStatuses:[]}}"
time="2026-01-12T06:30:20Z" level=info msg="trigger update event, name: 037fdc19967aa684"
time="2026-01-12T06:30:20Z" level=debug msg="updating oldObj: &{TypeMeta:{Kind: APIVersion:} ObjectMeta:{Name:037fdc19967aa684 GenerateName: Namespace: SelfLink: UID:64426b6e-8153-475c-9de2-22fefbc7e293 ResourceVersion:208189 Generation:1 CreationTimestamp:2026-01-12 06:30:20 +0000 UTC DeletionTimestamp:<nil> DeletionGracePeriodSeconds:<nil> Labels:map[] Annotations:map[] OwnerReferences:[] Finalizers:[finalizer.chaosblade.io] ClusterName: ManagedFields:[{Manager:blade Operation:Update APIVersion:chaosblade.io/v1alpha1 Time:2026-01-12 06:30:20 +0000 UTC FieldsType:FieldsV1 FieldsV1:{\"f:spec\":{\".\":{},\"f:experiments\":{}}}} {Manager:chaosblade-operator Operation:Update APIVersion:chaosblade.io/v1alpha1 Time:2026-01-12 06:30:20 +0000 UTC FieldsType:FieldsV1 FieldsV1:{\"f:metadata\":{\"f:finalizers\":{\".\":{},\"v:\\\"finalizer.chaosblade.io\\\"\":{}}}}}]} Spec:{Experiments:[{Scope:pod Target:cpu Action:fullload Desc:created by blade command Matchers:[{Name:endpoint Value:[]} {Name:names Value:[etcd-0]} {Name:cgroup-root Value:[/host-sys/fs/cgroup]} {Name:chaosblade-download-url Value:[]} {Name:cpu-list Value:[]} {Name:chaosblade-deploy-mode Value:[]} {Name:evict-group Value:[]} {Name:evict-percent Value:[]} {Name:namespace Value:[default]} {Name:cpu-index Value:[]} {Name:climb-time Value:[]} {Name:cpu-count Value:[]} {Name:cpu-percent Value:[]} {Name:evict-count Value:[]} {Name:labels Value:[]} {Name:timeout Value:[]} {Name:chaosblade-path Value:[]} {Name:uid Value:[]}]}]} Status:{Phase: ExpStatuses:[]}}"
time="2026-01-12T06:30:20Z" level=debug msg="updating newObj: &{TypeMeta:{Kind: APIVersion:} ObjectMeta:{Name:037fdc19967aa684 GenerateName: Namespace: SelfLink: UID:64426b6e-8153-475c-9de2-22fefbc7e293 ResourceVersion:208190 Generation:1 CreationTimestamp:2026-01-12 06:30:20 +0000 UTC DeletionTimestamp:<nil> DeletionGracePeriodSeconds:<nil> Labels:map[] Annotations:map[] OwnerReferences:[] Finalizers:[finalizer.chaosblade.io] ClusterName: ManagedFields:[{Manager:blade Operation:Update APIVersion:chaosblade.io/v1alpha1 Time:2026-01-12 06:30:20 +0000 UTC FieldsType:FieldsV1 FieldsV1:{\"f:spec\":{\".\":{},\"f:experiments\":{}}}} {Manager:chaosblade-operator Operation:Update APIVersion:chaosblade.io/v1alpha1 Time:2026-01-12 06:30:20 +0000 UTC FieldsType:FieldsV1 FieldsV1:{\"f:metadata\":{\"f:finalizers\":{\".\":{},\"v:\\\"finalizer.chaosblade.io\\\"\":{}}}}} {Manager:chaosblade-operator Operation:Update APIVersion:chaosblade.io/v1alpha1 Time:2026-01-12 06:30:20 +0000 UTC FieldsType:FieldsV1 FieldsV1:{\"f:status\":{\".\":{},\"f:expStatuses\":{},\"f:phase\":{}}}}]} Spec:{Experiments:[{Scope:pod Target:cpu Action:fullload Desc:created by blade command Matchers:[{Name:endpoint Value:[]} {Name:names Value:[etcd-0]} {Name:cgroup-root Value:[/host-sys/fs/cgroup]} {Name:chaosblade-download-url Value:[]} {Name:cpu-list Value:[]} {Name:chaosblade-deploy-mode Value:[]} {Name:evict-group Value:[]} {Name:evict-percent Value:[]} {Name:namespace Value:[default]} {Name:cpu-index Value:[]} {Name:climb-time Value:[]} {Name:cpu-count Value:[]} {Name:cpu-percent Value:[]} {Name:evict-count Value:[]} {Name:labels Value:[]} {Name:timeout Value:[]} {Name:chaosblade-path Value:[]} {Name:uid Value:[]}]}]} Status:{Phase:Initialized ExpStatuses:[]}}"
time="2026-01-12T06:30:20Z" level=info msg="start to create experiment" experiment=037fdc19967aa684
time="2026-01-12T06:30:20Z" level=debug msg="namespace: default, labels: , names: etcd-0" experiment=037fdc19967aa684
time="2026-01-12T06:30:20Z" level=info msg="get pods by names etcd-0, len is 1" experiment=037fdc19967aa684
time="2026-01-12T06:30:20Z" level=info msg="creating pod experiment, pod count is 1" experiment=037fdc19967aa684
time="2026-01-12T06:30:20Z" level=info msg="set container list: [{Id: ContainerRuntime:docker ContainerId:66c9bbe20a40 ContainerName:etcd PodName:etcd-0 NodeName:pekphis562303 Namespace:default}]" experiment=037fdc19967aa684
time="2026-01-12T06:30:20Z" level=info msg="start to execute: &{Target:cpu Scope:pod ActionName:fullload ActionFlags:map[cgroup-root:/host-sys/fs/cgroup chaosblade-deploy-mode: chaosblade-download-url: chaosblade-path: climb-time: cpu-count: cpu-index: cpu-list: cpu-percent: endpoint: evict-count: evict-group: evict-percent: labels: names:etcd-0 namespace:default timeout: uid:] ActionPrograms:[] ActionCategories:[] ActionProcessHang:false}" experiment=037fdc19967aa684
time="2026-01-12T06:30:20Z" level=info msg="experiment identifiers: [{{ docker 66c9bbe20a40 etcd etcd-0 pekphis562303 default} /opt/chaosblade/blade create cri cpu fullload --cgroup-root=/host-sys/fs/cgroup --container-id 66c9bbe20a40 --container-runtime docker 0 chaosblade-tool-8wn88 chaosblade chaosblade-tool}]" experiment=037fdc19967aa684
time="2026-01-12T06:30:20Z" level=info msg="execute identifier: {ContainerObjectMeta:{Id: ContainerRuntime:docker ContainerId:66c9bbe20a40 ContainerName:etcd PodName:etcd-0 NodeName:pekphis562303 Namespace:default} Command:/opt/chaosblade/blade create cri cpu fullload --cgroup-root=/host-sys/fs/cgroup --container-id 66c9bbe20a40 --container-runtime docker Error: Code:0 ChaosBladePodName:chaosblade-tool-8wn88 ChaosBladeNamespace:chaosblade ChaosBladeContainerName:chaosblade-tool}" experiment=037fdc19967aa684
time="2026-01-12T06:30:20Z" level=info msg="Exec command in pod" command="[/opt/chaosblade/blade create cri cpu fullload --cgroup-root=/host-sys/fs/cgroup --container-id 66c9bbe20a40 --container-runtime docker]" container=chaosblade-tool podName=chaosblade-tool-8wn88 podNamespace=chaosblade
time="2026-01-12T06:30:21Z" level=info msg="get err message" command="[/opt/chaosblade/blade create cri cpu fullload --cgroup-root=/host-sys/fs/cgroup --container-id 66c9bbe20a40 --container-runtime docker]" container=chaosblade-tool err="{\"code\":63063,\"success\":false,\"error\":\"add process to cgroups V2 failed, write /host-sys/fs/cgroup/cgroup.procs: no such file or directory\"}" out= podName=chaosblade-tool-8wn88 podNamespace=chaosblade
time="2026-01-12T06:30:21Z" level=error msg="`pods/exec`: k8s exec failed, err: {\"code\":63063,\"success\":false,\"error\":\"add process to cgroups V2 failed, write /host-sys/fs/cgroup/cgroup.procs: no such file or directory\"}\n" location=github.com/chaosblade-io/chaosblade-operator/exec/model.execCommands.func1 uid=
time="2026-01-12T06:30:21Z" level=info msg="success: false, statuses: [{Id: State:Error Code:63063 Error:add process to cgroups V2 failed, write /host-sys/fs/cgroup/cgroup.procs: no such file or directory Success:false Kind:pod Identifier:default/pekphis562303/etcd-0/etcd/66c9bbe20a40/docker}]" experiment=037fdc19967aa684
W0112 06:30:21.547492 1 warnings.go:70] unknown field "status.expStatuses[0].resStatuses[0].code"
time="2026-01-12T06:30:21Z" level=info msg="trigger update event, name: 037fdc19967aa684"
time="2026-01-12T06:30:21Z" level=debug msg="updating oldObj: &{TypeMeta:{Kind: APIVersion:} ObjectMeta:{Name:037fdc19967aa684 GenerateName: Namespace: SelfLink: UID:64426b6e-8153-475c-9de2-22fefbc7e293 ResourceVersion:208190 Generation:1 CreationTimestamp:2026-01-12 06:30:20 +0000 UTC DeletionTimestamp:<nil> DeletionGracePeriodSeconds:<nil> Labels:map[] Annotations:map[] OwnerReferences:[] Finalizers:[finalizer.chaosblade.io] ClusterName: ManagedFields:[{Manager:blade Operation:Update APIVersion:chaosblade.io/v1alpha1 Time:2026-01-12 06:30:20 +0000 UTC FieldsType:FieldsV1 FieldsV1:{\"f:spec\":{\".\":{},\"f:experiments\":{}}}} {Manager:chaosblade-operator Operation:Update APIVersion:chaosblade.io/v1alpha1 Time:2026-01-12 06:30:20 +0000 UTC FieldsType:FieldsV1 FieldsV1:{\"f:metadata\":{\"f:finalizers\":{\".\":{},\"v:\\\"finalizer.chaosblade.io\\\"\":{}}}}} {Manager:chaosblade-operator Operation:Update APIVersion:chaosblade.io/v1alpha1 Time:2026-01-12 06:30:20 +0000 UTC FieldsType:FieldsV1 FieldsV1:{\"f:status\":{\".\":{},\"f:expStatuses\":{},\"f:phase\":{}}}}]} Spec:{Experiments:[{Scope:pod Target:cpu Action:fullload Desc:created by blade command Matchers:[{Name:endpoint Value:[]} {Name:names Value:[etcd-0]} {Name:cgroup-root Value:[/host-sys/fs/cgroup]} {Name:chaosblade-download-url Value:[]} {Name:cpu-list Value:[]} {Name:chaosblade-deploy-mode Value:[]} {Name:evict-group Value:[]} {Name:evict-percent Value:[]} {Name:namespace Value:[default]} {Name:cpu-index Value:[]} {Name:climb-time Value:[]} {Name:cpu-count Value:[]} {Name:cpu-percent Value:[]} {Name:evict-count Value:[]} {Name:labels Value:[]} {Name:timeout Value:[]} {Name:chaosblade-path Value:[]} {Name:uid Value:[]}]}]} Status:{Phase:Initialized ExpStatuses:[]}}"
time="2026-01-12T06:30:21Z" level=debug msg="updating newObj: &{TypeMeta:{Kind: APIVersion:} ObjectMeta:{Name:037fdc19967aa684 GenerateName: Namespace: SelfLink: UID:64426b6e-8153-475c-9de2-22fefbc7e293 ResourceVersion:208195 Generation:1 CreationTimestamp:2026-01-12 06:30:20 +0000 UTC DeletionTimestamp:<nil> DeletionGracePeriodSeconds:<nil> Labels:map[] Annotations:map[] OwnerReferences:[] Finalizers:[finalizer.chaosblade.io] ClusterName: ManagedFields:[{Manager:blade Operation:Update APIVersion:chaosblade.io/v1alpha1 Time:2026-01-12 06:30:20 +0000 UTC FieldsType:FieldsV1 FieldsV1:{\"f:spec\":{\".\":{},\"f:experiments\":{}}}} {Manager:chaosblade-operator Operation:Update APIVersion:chaosblade.io/v1alpha1 Time:2026-01-12 06:30:20 +0000 UTC FieldsType:FieldsV1 FieldsV1:{\"f:metadata\":{\"f:finalizers\":{\".\":{},\"v:\\\"finalizer.chaosblade.io\\\"\":{}}}}} {Manager:chaosblade-operator Operation:Update APIVersion:chaosblade.io/v1alpha1 Time:2026-01-12 06:30:21 +0000 UTC FieldsType:FieldsV1 FieldsV1:{\"f:status\":{\".\":{},\"f:expStatuses\":{},\"f:phase\":{}}}}]} Spec:{Experiments:[{Scope:pod Target:cpu Action:fullload Desc:created by blade command Matchers:[{Name:endpoint Value:[]} {Name:names Value:[etcd-0]} {Name:cgroup-root Value:[/host-sys/fs/cgroup]} {Name:chaosblade-download-url Value:[]} {Name:cpu-list Value:[]} {Name:chaosblade-deploy-mode Value:[]} {Name:evict-group Value:[]} {Name:evict-percent Value:[]} {Name:namespace Value:[default]} {Name:cpu-index Value:[]} {Name:climb-time Value:[]} {Name:cpu-count Value:[]} {Name:cpu-percent Value:[]} {Name:evict-count Value:[]} {Name:labels Value:[]} {Name:timeout Value:[]} {Name:chaosblade-path Value:[]} {Name:uid Value:[]}]}]} Status:{Phase:Error ExpStatuses:[{Scope:pod Target:cpu Action:fullload Success:false State:Error Error:see resStatus for the error details ResStatuses:[{Id: State:Error Code:0 Error:add process to cgroups V2 failed, write /host-sys/fs/cgroup/cgroup.procs: no such file or directory Success:false Kind:pod Identifier:default/pekphis562303/etcd-0/etcd/66c9bbe20a40/docker}]}]}}"
kubectl exec -it chaosblade-tool-8wn88 -n chaosblade bash
cat logs/chaosblade.log
time="2026-01-12 06:30:21.13654668 UTC" level=warning msg="cgroup path does not exist: /kubepods-burstable.slice/kubepods-burstable-poda91e6913_ec33_478f_a1b7_7e06fd239097.slice/docker-66c9bbe20a402b7742ca1fed0ee197080326ccb06aa70b65e004c57e93651f94.scope, trying to create" location="/home/runner/go/pkg/mod/github.com/chaosblade-io/chaosblade-exec-cri@v1.8.0/exec/executor_common_linux.go:192" uid=e13234197d0b2c89
time="2026-01-12 06:30:21.136713711 UTC" level=warning msg="NewManager failed with path /../../../kubepods-burstable.slice/kubepods-burstable-poda91e6913_ec33_478f_a1b7_7e06fd239097.slice/docker-66c9bbe20a402b7742ca1fed0ee197080326ccb06aa70b65e004c57e93651f94.scope, trying root path as fallback" location="/home/runner/go/pkg/mod/github.com/chaosblade-io/chaosblade-exec-cri@v1.8.0/exec/executor_common_linux.go:219" uid=e13234197d0b2c89
time="2026-01-12 06:30:21.136738937 UTC" level=info msg="Successfully created cgroup manager with root path as fallback" location="/home/runner/go/pkg/mod/github.com/chaosblade-io/chaosblade-exec-cri@v1.8.0/exec/executor_common_linux.go:224" uid=e13234197d0b2c89Tell us your environment
cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.5 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.5 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
docker info | grep Cgroup
Cgroup Driver: systemd
Cgroup Version: 2
stat -fc %T /sys/fs/cgroup/
cgroup2fs
find /sys/fs/cgroup -name "cgroup.controllers"
/sys/fs/cgroup/cgroup.controllers
blade version
ChaosBlade Version Information:
==============================
Version: 1.8.0
Git Tag: v1.8.0
Git Commit: 7dd785f
Git Branch: HEAD
Build Time: Mon Oct 20 03:37:24 UTC 2025
Release: Yes (Production)
==============================
kubectl version
Client Version: version.Info{Major:"1", Minor:"26", GitVersion:"v1.26.3", GitCommit:"9e644106593f3f4aa98f8a84b23db5fa378900bd", GitTreeState:"clean", BuildDate:"2023-03-15T13:40:17Z", GoVersion:"go1.19.7", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v4.5.7
Server Version: version.Info{Major:"1", Minor:"31", GitVersion:"v1.31.4", GitCommit:"a78aa47129b8539636eb86a9d00e31b2720fe06b", GitTreeState:"clean", BuildDate:"2024-12-10T11:37:27Z", GoVersion:"go1.22.9", Compiler:"gc", Platform:"linux/amd64"}
WARNING: version difference between client (1.26) and server (1.31) exceeds the supported minor version skew of +/-1
Anything else we need to know?
if i create cpu fillload to container directly on host, appears finish with success...
./blade create cri cpu fullload --cgroup-root=/sys/fs/cgroup --container-id 66c9bbe20a40 --container-runtime docker --debug
{"code":200,"success":true,"result":"0ea6d5973167e691"}Metadata
Metadata
Assignees
Labels
No labels
Activity
xcaspar commentedon Jan 12, 2026
The issue might be due to a missing
/procdirectory mapping. If thechaosblade-toolPod doesn't mount/procon the host machine, it can't find the corresponding cgroup path using the container ID. You can modify thechaosblade-tool daemonsetas follows:The above is a speculation based on the error message. Please provide feedback on the modified execution result.
Yotainming commentedon Jan 12, 2026
error message still the same:
./blade create k8s pod-cpu load --names etcd-0 --namespace default --kubeconfig=/data/jenkins/workspace/DSTest/latest/DataSystemTest/conf/config {"code":54000,"success":false,"error":"add process to cgroups V2 failed, write /host-sys/fs/cgroup/cgroup.procs: no such file or directory","result":{"uid":"48359faaaa4e1b89","success":false,"error":"add process to cgroups V2 failed, write /host-sys/fs/cgroup/cgroup.procs: no such file or directory","statuses":[{"state":"Error","error":"add process to cgroups V2 failed, write /host-sys/fs/cgroup/cgroup.procs: no such file or directory","success":false,"kind":"pod","identifier":"default/pekphis562303/etcd-0/etcd/66c9bbe20a40/docker"}]}} kubectl describe pod chaosblade-tool-p4gnf -n chaosblade bash ... Mounts: /etc/containerd from containerd-etc (rw) /etc/docker from docker-etc (rw) /etc/hosts from hosts (rw) /host-proc from proc (ro) /host-sys from sys (rw) /opt/chaosblade/chaosblade.dat from chaosblade-db-volume (rw) /run/containerd from containerd (rw) /var/lib/containerd from containerd-lib (rw) /var/lib/docker from docker-lib (rw) /var/log/audit from audit (rw) /var/run/docker.sock from docker-socket (rw) /var/run/netns from netns (rw) /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-twf5h (ro) Conditions: Type Status PodReadyToStartContainers True Initialized True Ready True ContainersReady True PodScheduled True Volumes: docker-socket: Type: HostPath (bare host directory volume) Path: /var/run/docker.sock HostPathType: chaosblade-db-volume: Type: HostPath (bare host directory volume) Path: /var/run/chaosblade.dat HostPathType: FileOrCreate hosts: Type: HostPath (bare host directory volume) Path: /etc/hosts HostPathType: docker-lib: Type: HostPath (bare host directory volume) Path: /var/lib/docker HostPathType: docker-etc: Type: HostPath (bare host directory volume) Path: /etc/docker HostPathType: audit: Type: HostPath (bare host directory volume) Path: /var/log/audit HostPathType: containerd: Type: HostPath (bare host directory volume) Path: /run/containerd HostPathType: containerd-lib: Type: HostPath (bare host directory volume) Path: /var/lib/containerd HostPathType: containerd-etc: Type: HostPath (bare host directory volume) Path: /etc/containerd HostPathType: netns: Type: HostPath (bare host directory volume) Path: /var/run/netns HostPathType: sys: Type: HostPath (bare host directory volume) Path: /sys HostPathType: proc: Type: HostPath (bare host directory volume) Path: /proc HostPathType: ...i also check difference between container and host in log:
code at https://github.com/chaosblade-io/chaosblade-exec-cri/blob/main/exec/executor_common_linux.go#L205, maybe we need to deal with difference between container and host env?
oss-sentinel-ai commentedon Jun 4, 2026
Issue Evaluation
Category:
type/bug| Status: Needs Investigation | Severity: MediumThe issue reports that
pod-cpu loadfails on K8s pods with error:write /host-sys/fs/cgroup/cgroup.procs: no such file or directory. This occurs when using ChaosBlade with cgroups V2 (unified hierarchy).Analysis:
/host-sys/fs/cgroup/cgroup.procsat the root cgroup level, which doesn't exist in cgroups V2 unified hierarchycgroup.procs- processes must be in leaf cgroups/sys/fs/cgroup/<container-cgroup-path>/cgroup.procs/procwas attempted but did not resolve the issueLikely Root Cause: The cgroup path resolution in
chaosblade-exec-osdoes not correctly handle cgroups V2 when:.slicehierarchy)To fully diagnose, please provide:
cat /proc/1/cgroupinside the target podmount | grep cgroupon the nodeAutomated evaluation by oss-taishan-ai - ChaosBlade Community Bot
oss-sentinel-ai commentedon Jun 8, 2026
Code-Level Analysis
I have analyzed the cgroup v2 handling in the codebase.
Root Cause
The error
write /host-sys/fs/cgroup/cgroup.procs: no such file or directoryoccurs during CPU fullload experiment on a cgroup v2 node.From the operator logs, the CR matchers show:
The
chaosblade-toolDaemonSet (fromdeploy/helm/chaosblade-operator/templates/daemonset.yaml) mounts:So
/host-sys/fs/cgroupmaps to the host's/sys/fs/cgroup.Why It Fails on cgroup v2
On cgroup v2 systems, the unified hierarchy at
/sys/fs/cgrouphas a different structure than cgroup v1:Root
cgroup.procsmay not be writable: In many cgroup v2 configurations (especially withsystemdas the init system), the root cgroup'scgroup.procsis managed by systemd and writing to it directly fails.Process must be in a child cgroup: cgroup v2 requires processes to be in a proper child cgroup, not the root. The code needs to create/find a child cgroup (e.g.,
/sys/fs/cgroup/chaosblade/) and write the PID there.The
cgroup-rootpath: The default/host-sys/fs/cgrouppoints to the root of the cgroup v2 hierarchy. The code should instead use a child cgroup path like/host-sys/fs/cgroup/chaosbladeor the cgroup of the target container.Fix
Option A: Use the target container's cgroup
Instead of writing to the root
cgroup.procs, the code should detect the target container's cgroup path and use that:Option B: Create a dedicated chaosblade cgroup
Option C: Auto-detect cgroup version and adjust behavior
The
chaosblade-exec-oscode already has cgroup v2 detection inpkg/automaxprocs/cgroups/. The CPU experiment should use this detection to determine the correct cgroup path:Workaround
For users hitting this issue:
stat -fc %T /sys/fs/cgroupshould returncgroup2fspod-networkexperiments).woyaonidish commentedon Jun 8, 2026
/approve