暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

排错---EKS1.21 CNI 插件循环重启的问题排查

耶喝运维 2021-09-02
774

今天遇到了一个问题,是在EKS1.21上 aws-node(CNI)插件循环重启的问题
早上来了值班人员说昨晚12点某个EKS集群 kube-system 上有pod 在循环重启,所以简单看了一下通过运维平台查看pod日志并没有看到任何错误日志,所以查看了events,发现是pod 的两个探针(livenessProbe readinessProbe)有error,

复制

检查监控指标,发现昨天半夜十点开始有内存,cpu使用过高的情况

跟开发沟通后,他们在压测。。。。。。

然后提了一个最高等级的aws case,五分钟后通电话,采集对应的系统信息传给aws技术支持后,等待反馈,在等待的过程中浏览一下csi 的github寻找一下问题,果然找到了一些门道

https://github.com/aws/amazon-vpc-cni-k8s/issues/1425

复制

其实在之前1.16-1.19的集群中压测过无数次,并没有遇到相同的问题,在issues中提到了一个 k8s1.20 更新的内容

Exec Probe Timeout Handling
A longstanding bug regarding exec probe timeouts that may impact existing pod definitions has been fixed. Prior to this fix, the field timeoutSeconds was not respected for exec probes. Instead, probes would run indefinitely, even past their configured deadline, until a result was returned. With this change, the default value of 1 second will be applied if a value is not specified and existing pod definitions may no longer be sufficient if a probe takes longer than one second. A feature gate, called ExecProbeTimeout, has been added with this fix that enables cluster operators to revert to the previous behavior, but this will be locked and removed in subsequent releases. In order to revert to the previous behavior, cluster operators should set this feature gate to false.

Please review the updated documentation regarding configuring probes for more details.

复制

大概意思就是修复了之前版本的探针的一个bug,可以让探针可以正常工作了,所以导致了这个服务不停的在重启,其实感觉还是aws-cni 插件代码的问题

解决办法,增加了探针的超时时间,从1s变为5s

livenessProbe:
  exec:
    command:
    - /app/grpc-health-probe
    - -addr=:50051
  failureThreshold: 3
  initialDelaySeconds: 60
  periodSeconds: 10
  successThreshold: 1
  timeoutSeconds: 5
name: aws-node
ports:
- containerPort: 61678
  hostPort: 61678
  name: metrics
  protocol: TCP
readinessProbe:
  exec:
    command:
    - /app/grpc-health-probe
    - -addr=:50051
  failureThreshold: 3
  initialDelaySeconds: 1
  periodSeconds: 10
  successThreshold: 1
  timeoutSeconds: 5

复制

问题完美解决 。。


文章转载自耶喝运维,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论