-
Notifications
You must be signed in to change notification settings - Fork 102
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
chaosblade-operator1.7.2 pod cpu故障注入失败 #234
Comments
pod 注入cpu负载本质就是对容器注入cpu负载,这没啥问题。 |
您好 我对pod注入cpu故障, cpu-percent是60%, pod的cpu limit是1000m, 正常来说 应该把容器cpu打满60%, 但是事实上打了100%, 我加log的 时候发现untime.NumCpu()获取的宿主机的核数,不是容器的核数,go.uber.org/automaxprocs/maxprocs 没生效 我把uber的方法显示在代码调用了一下,结果发现报错了,我理解是因为这个报错导致的cpu获取有问题, 报错信息如下 |
并不正确,automaxprocs/maxprocs 获取的是 daemonset pod 的 CPU 数量,详情可以看这个 issue:chaosblade-io/chaosblade#1079 |
描述: operator1.7.2注入pod的cpu故障的时候, 直接会把该pod下的容器cpu直接打满
debug发现获取runtime.NumCpu()获取的是宿主机的核数不是容器的cpu核数
yaml文件:
apiVersion: chaosblade.io/v1alpha1
kind: ChaosBlade
metadata:
name: cpu-pod-6
spec:
experiments:
target: cpu
action: fullload
desc: "increase pod cpu load by names"
matchers:
value:
value:
value:
value:
The text was updated successfully, but these errors were encountered: