已关闭
【26.09-rc2】crio服务stop后,日志中存在报错level=error msg="CNI plugin not ready: #145
ga_beng_cui创建于  9月2日关闭于  15 天前
ga_beng_cui
ga_beng_cui成员
9月2日 创建

【缺陷描述】:请补充详细的缺陷问题现象描述

crio服务stop后,日志中存在报错level=error msg="CNI plugin not ready:

一、缺陷信息

cri-o-1.32.13-1.oe2609

【缺陷所属的os版本】

openEuler-26.09

【内核版本】

6.6.0-163.0.0.1.oe2609

【缺陷所属软件及版本号】

cri-o-1.32.13-1.oe2609

【环境信息】

硬件信息

  • 提供跟硬件相关的信息,如架构、cpu和内存规格等
  • 虚拟机场景,额外补充宿主机os版本类型

软件信息

  • 跟缺陷所属软件相关的其它软件版本信息(如软件包构建失败由gcc引起,请填写gcc的版本号)
    cri-o-1.32.13-1.oe2609

【问题复现步骤】

  1. dnf install cri-o
  2. systemctl start crio
  3. systemctl stop crio

【实际结果】

服务stop后,日志存在报错
level=error msg="CNI plugin not ready: server shutdown before CNI plugin was ready: plugin status uninitialized"

【期望结果】

服务启动和停止都成功,且日志中无报错

【其他相关附件信息】

image.png

【缺陷详情及分析指导参考链接】

二、缺陷分析结构反馈
影响性分析说明:

缺陷严重等级:(Critical/High/Moderate/Low)

缺陷根因说明:

受影响版本排查(受影响/不受影响):
openEuler-20.03-LTS-SP4
openEuler-22.03-LTS-SP3
openEuler-22.03-LTS-SP4
openEuler-24.03-LTS
openEuler-24.03-LTS-SP1
openEuler-24.03-LTS-SP2

修复是否涉及abi变化(是/否):
openEuler-20.03-LTS-SP4
openEuler-22.03-LTS-SP3
openEuler-22.03-LTS-SP4
openEuler-24.03-LTS
openEuler-24.03-LTS-SP1
openEuler-24.03-LTS-SP2

likedislike
ga_beng_cuiga_beng_cui成员
9月2日 关联了里程碑:openEuler-26.09-DevStation-round3
openeuler-ci-botopeneuler-ci-bot成员
9月2日 将 duyiwei7w 设为负责人
openeuler-ci-botopeneuler-ci-bot成员
9月2日 修改了issue 的描述
openeuler-ci-botopeneuler-ci-bot成员
9月2日 将 ga_beng_cui 设为负责人
openeuler-ci-bot
openeuler-ci-bot成员
9月2日 评论:

以下的要求不是强制性的, 未按模板评论时对issue无任何影响
issue处理注意事项:
1. 当前issue受影响的分支提交pr时, 须在pr描述中填写当前issue编号进行关联, 否则无法关闭当前issue;
2. 模板内容需要填写完整, 无论是受影响或者不受影响都需要填写完整内容,未引入的分支不需要填写, 否则无法关闭当前issue;
3. 以下为模板中需要填写完整的内容, 请复制到评论区回复, 注: 内容的标题名称(影响性分析说明, 缺陷严重等级, 受影响版本排查(受影响/不受影响), 修复是否涉及abi变化(是/否))不能省略,省略后defect-manager将无法正常解析填写内容.
评论区可能使用到的指令说明:

指令 指令说明 使用权限
/check-issue 触发defect-manager校验 不限
/reason xxx /reason +挂起或取消条件 不限

影响性分析说明:

缺陷严重等级:(Critical/High/Moderate/Low)

缺陷根因说明:

受影响版本排查(受影响/不受影响):

  1. openEuler-20.03-LTS-SP4:
  2. openEuler-22.03-LTS-SP3:
  3. openEuler-22.03-LTS-SP4:
  4. openEuler-24.03-LTS:
  5. openEuler-24.03-LTS-SP1:
  6. openEuler-24.03-LTS-SP2:

abi变化(是/否):

  1. openEuler-20.03-LTS-SP4:
  2. openEuler-22.03-LTS-SP3:
  3. openEuler-22.03-LTS-SP4:
  4. openEuler-24.03-LTS:
  5. openEuler-24.03-LTS-SP1:
  6. openEuler-24.03-LTS-SP2:

缺陷issue处理具体操作请参考:
https://atomgit.com/openeuler/cve-manager/blob/master/cve-vulner-manager/doc/md/defect-manager-manual.md
pr关联issue具体操作请参考:
https://docs.atomgit.com/docs/help/home/org_project/pullrequests/pr-related-issue

likedislike
openeuler-ci-botopeneuler-ci-bot成员
9月2日 添加了label:sig/sig-CloudNative
openeuler-ci-botopeneuler-ci-bot成员
9月2日 添加了label:DEFECT/UNFIXED
openeuler-ci-bot
openeuler-ci-bot成员
9月2日 评论:

Welcome To openEuler Community

Hey @ga_beng_cui , thanks for your contribution to the community.

Bot Usage Manual

I'm the Bot here serving you. You can find the instructions on how to interact with me at Here . That means you can comment below every pull request or issue to trigger Bot Commands. You can self-configure the PR merge rules for this repository. For more details, please refer to Here.

Contact Guide

If you have any questions, please contact the SIG: sig-CloudNative ,
and any of the maintainers: @duguhaotian, @gaodaweiky, @jimmieme, @lu-wei-army, @weibaohui, @wonleing, @yangzhao_kl, @zhaoyifan28, @zmr_2020 ,
and any of the committers: @duyiwei7w, @jianli-97, @weixin_38854637 .

likedislike
ga_beng_cuiga_beng_cui成员
9月2日 修改标题为 “【26.09-rc2】crio服务stop后,日志中存在报错level=error msg="CNI plugin not ready:”,原标题为“【26.09-rc3】crio服务stop后,日志中存在报错level=error msg="CNI plugin not ready:”
ga_beng_cuiga_beng_cui成员
9月2日 关联了里程碑:openEuler-26.09-DevStation-round2
ga_beng_cuiga_beng_cui成员
9月2日 移除了负责人 ga_beng_cui
lijian
lijian成员
9月3日 评论:

cri-o 是面向 k8s CRI 接口设计的容器运行时,通常由 kubelet 调用,并配合 CNI 网络插件使用。仅安装和启动 cri-o、但尚未部署 k8s 网络组件时,CNI 会一直处于未初始化状态;此时停止 cri-o,日志就会打印 server shutdown before CNI plugin was ready,这是未接入 k8s/CNI 环境时的预期现象。

likedislike
ga_beng_cui
ga_beng_cui成员
28 天前 评论:

cri-o 是面向 k8s CRI 接口设计的容器运行时,通常由 kubelet 调用,并配合 CNI 网络插件使用。仅安装和启动 cri-o、但尚未部署 k8s 网络组件时,CNI 会一直处于未初始化状态;此时停止 cri-o,日志就会打印 server shutdown before CNI plugin was ready,这是未接入 k8s/CNI 环境时的预期现象。

@jianli-97

如何部署CNI环境?我看到环境中是有cni的配置的,但是服务仍然有报错
image.png

likedislike
lijian
lijian成员
25 天前 评论:

此前的分析有误,抱歉。以下是根据代码分析的结论,该现象是正常的。

调用链路如下:

  1. CNI 管理器故意先标成“未初始化”
// cnimgr.go
mgr := &CNIManager{
	plugin:    plugin,
	lastError: errors.New("plugin status uninitialized"),
}
go mgr.pollUntilReady()

创建后 lastError 先设为 plugin status uninitialized,后台每 500ms 调一次 plugin.Status(),成功后才清掉错误。

  1. Status API 据此上报 NetworkReady=false
// runtime_status.go
if err := s.config.CNIPluginReadyOrError(); err != nil {
	networkCondition.Status = false
	networkCondition.Reason = networkNotReadyReason
	networkCondition.Message = fmt.Sprintf("Network plugin returns error: %v", err)
}

所以会看到:Network plugin returns error。

  1. 健康检查在 CNI 就绪前就跑了,故意忽略 NetworkReady
// health.go
for _, c := range response.GetStatus().GetConditions() {
	if c.GetType() == "NetworkReady" {
		if !cniPluginInitialized.Load() {
			log.Warnf(ctx, "CNI plugin not yet initialized. Ignoring NetworkReady status: %v, message: %s, reason: %s", c.GetStatus(), c.GetMessage(), c.GetReason())
			continue

此时 cniPluginInitialized 仍为 false,于是打出 warning,并 跳过 NetworkReady,不把健康检查判失败。

  1. 随后异步等待 CNI,就绪后标记完成
// health.go
func (s *Server) cniPluginReadinessCheck(ctx context.Context) {
	cniInitOnce.Do(func() {
		go func() {
			if err := s.waitForCNIPlugin(ctx, ""); err != nil {
				log.Errorf(ctx, "CNI plugin not ready: %v", err)
			} else {
				log.Infof(ctx, "CNI plugin is ready")
				cniPluginInitialized.Store(true)
			}
		}()
	})
}

对应截图里的 Waiting to create → is now ready → is ready。

image.png

likedislike
ga_beng_cui
ga_beng_cui成员
21 天前 评论:

我这边环境,,服务stop后日志CNI仍然是没有no ready
image.png

likedislike
lijian
lijian成员
20 天前 评论:

我这边环境,,服务stop后日志CNI仍然是没有no ready
image.png

@ga_beng_cui

您看我的截图,我使用的也是2609 devstation iso,当时的repo源是http://121.36.84.172/dailybuild/EBS-openEuler-26.09-DevStation/openeuler-2026-09-11-02-44-55/ ,您是用的哪个呢?

likedislike
ga_beng_cui
ga_beng_cui成员
15 天前 评论:

/reason 经在 RC5 版本上验证,该问题已不复现,关闭此 issue。根因尚未明确,后续版本将持续关注,若问题重现将重新打开排查。

likedislike
ga_beng_cuiga_beng_cui成员
15 天前 issue状态由 待办的 改变为 已取消
ga_beng_cuiga_beng_cui成员
15 天前 关闭了 issue