本文介绍了OKD 3.11安装失败. “网络插件尚未准备好:cni config未初始化"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

OKD 3.11安装失败未出现控制平面吊舱"

OKD 3.11 Installation failed "Control plane pods didn't come up"

环境

  • CentOS Linux版本7.6.1810(核心)
  • 可用2.6.16
  • OKD 3.11
  • Docker版本1.13.1,内部版本b2f74b2/1.13.1

可用的库存文件

    ##Open shift master nodes
# Create an OSEv3 group that contains the masters, nodes, and etcd groups
[OSEv3:children]
masters
nodes
etcd
# host group for masters
[masters]
SBSTJVMLX605 openshift_ip=192.168.62.95
# host group for etcd
[etcd]
SBSTJVMLX605 openshift_ip=192.168.62.95
# host group for nodes, includes region info
[nodes]
SBSTJVMLX605 openshift_node_group_name='node-config-master-infra' openshift_schedulable=true openshift_ip=192.168.62.95
[OSEv3:vars]
openshift_deployment_type=origin
#openshift_release="3.11"
openshift_disable_check=disk_availability,docker_storage,package_version,memory_availability
openshift_enable_docker_excluder=false
debug_level=4

ansible错误

Failure summary:
  1. Hosts:    SBSTJVMLX605
     Play:     Configure masters
     Task:     Report control plane errors
     Message:  Control plane pods didn't come up

来自日志ctl的错误

31207 kubelet.go:2101] Container runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized

origin-node[31207]: W0418 10:26:47.866972   31207 docker_service.go:545] Hairpin mode set to "promiscuous-bridge" but kubenet is not enabled, falling back to "hairpin-veth"
Apr 18 10:26:47 SBSTJVMLX605.SUNTECSBS.COM origin-node[31207]: I0418 10:26:47.866991   31207 docker_service.go:238] Hairpin mode set to "hairpin-veth"
Apr 18 10:26:47 SBSTJVMLX605.SUNTECSBS.COM origin-node[31207]: W0418 10:26:47.867101   31207 cni.go:172] Unable to update cni config: No networks found in /etc/cni/net.d
Apr 18 10:26:47 SBSTJVMLX605.SUNTECSBS.COM origin-node[31207]: W0418 10:26:47.870697   31207 cni.go:172] Unable to update cni config: No networks found in /etc/cni/net.d
Apr 18 10:26:47 SBSTJVMLX605.SUNTECSBS.COM origin-node[31207]: I0418 10:26:47.870720   31207 plugins.go:159] Loaded network plugin "cni"
Apr 18 10:26:47 SBSTJVMLX605.SUNTECSBS.COM origin-node[31207]: I0418 10:26:47.870745   31207 docker_service.go:253] Docker cri networking managed by cni
Apr 18 10:26:47 SBSTJVMLX605.SUNTECSBS.COM origin-node[31207]: I0418 10:26:47.883666   31207 docker_service.go:258] Docker Info: &{ID:BHX3:QGBT:WAEZ:TNJL:PCFX:4S6K:CEV6:QMMQ:NELX:RCXS:EXOE:AXYY Containers:0 ContainersRunning:0 ContainersPaused:0 ContainersStopped:0 Images:5 Driver:overlay2 DriverStatus:[[Backing Filesystem xfs] [Supports d_type true] [Native Overlay Diff true]] SystemStatus:[] Plugins:{Volume:[local] Network:[bridge host macvlan null overlay] Authorization:[] Log:[]} MemoryLimit:true SwapLimit:true KernelMemory:true CPUCfsPeriod:true CPUCfsQuota:true CPUShares:true CPUSet:true IPv4Forwarding:true BridgeNfIptables:false BridgeNfIP6tables:false Debug:false NFd:16 OomKillDisable:true NGoroutines:23 SystemTime:2019-04-18T10:26:47.873639519+05:30 LoggingDriver:json-file CgroupDriver:systemd NEventsListener:0 KernelVersion:3.10.0-957.el7.x86_64 OperatingSystem:CentOS Linux 7 (Core) OSType:linux Architecture:x86_64 IndexServerAddress:https://index.docker.io/v1/ RegistryConfig:0xc4208af5e0 NCPU:4 MemTotal:8370298880 GenericResources:[] DockerRootDir:/var/lib/docker HTTPProxy:http://sbstjsvfw01:8080/ HTTPSProxy:http://sbstjsvfw01:8080/ NoProxy: 192.168.62.95, localhost,.cluster.local,.svc,127.0.0.1,169.254.169.254,172.30.0.1,192.168.62.95,sbstjvmlx605.suntecsbs.com Name:SBSTJVMLX605.SUNTECSBS.COM Labels:[] ExperimentalBuild:false ServerVersion:1.13.1 ClusterStore: ClusterAdvertise: Runtimes:map[docker-runc:{Path:/usr/libexec/docker/docker-runc-current Args:[]} runc:{Path:docker-runc Args:[]}] DefaultRuntime:docker-runc Swarm:{NodeID: NodeAddr: LocalNodeState:inactive ControlAvailable:false Error: RemoteManagers:[] Nodes:0 Managers:0 Cluster:0xc420c46dc0} LiveRestoreEnabled:false Isolation: InitBinary:/usr/libexec/docker/docker-init-current ContainerdCommit:{ID: Expected:aa8187dbd3b7ad67d8e5e3a15115d3eef43a7ed1} RuncCommit:{ID:df5c38a9167e87f53a9894d77c0950e178a745e7 Expected:9df8b306d01f59d3a8029be411de015b7304dd8f} InitCommit:{ID:fec3683b971d9c3ef73f284f176672c44b448662 Expected:949e6facb77383876aeff8a6944dde66b3089574} SecurityOptions:[name=seccomp,profile=/etc/docker/seccomp.json name=selinux]}
Apr 18 10:26:47 SBSTJVMLX605.SUNTECSBS.COM origin-node[31207]: I0418 10:26:47.883740   31207 docker_service.go:271] Setting cgroupDriver to systemd
Apr 18 10:26:47 SBSTJVMLX605.SUNTECSBS.COM origin-node[31207]: I0418 10:26:47.883810   31207 kubelet.go:628] Starting the GRPC server for the docker CRI shim.
Apr 18 10:26:47 SBSTJVMLX605.SUNTECSBS.COM origin-node[31207]: I0418 10:26:47.883872   31207 docker_server.go:59] Start dockershim grpc server
Apr 18 10:26:47 SBSTJVMLX605.SUNTECSBS.COM origin-node[31207]: W0418 10:26:47.883909   31207 util_unix.go:75] Using "/var/run/dockershim.sock" as endpoint is deprecated, please consider using full url format "unix:///var/run/dockershim.sock".
Apr 18 10:26:47 SBSTJVMLX605.SUNTECSBS.COM origin-node[31207]: I0418 10:26:47.890481   31207 oom_linux.go:65] attempting to set "/proc/19601/oom_score_adj" to "-999"
Apr 18 10:26:47 SBSTJVMLX605.SUNTECSBS.COM origin-node[31207]: I0418 10:26:47.890657   31207 oom_linux.go:65] attempting to set "/proc/19610/oom_score_adj" to "-999"
Apr 18 10:26:47 SBSTJVMLX605.SUNTECSBS.COM origin-node[31207]: I0418 10:26:47.900614   31207 remote_runtime.go:43] Connecting to runtime service /var/run/dockershim.sock
Apr 18 10:26:47 SBSTJVMLX605.SUNTECSBS.COM origin-node[31207]: W0418 10:26:47.900638   31207 util_unix.go:75] Using "/var/run/dockershim.sock" as endpoint is deprecated, please consider using full url format "unix:///var/run/dockershim.sock".
Apr 18 10:26:47 SBSTJVMLX605.SUNTECSBS.COM origin-node[31207]: I0418 10:26:47.900715   31207 remote_image.go:40] Connecting to image service /var/run/dockershim.sock
Apr 18 10:26:47 SBSTJVMLX605.SUNTECSBS.COM origin-node[31207]: W0418 10:26:47.900728   31207 util_unix.go:75] Using "/var/run/dockershim.sock" as endpoint is deprecated, please consider using full url format "unix:///var/run/dockershim.sock".
Apr 18 10:26:47 SBSTJVMLX605.SUNTECSBS.COM origin-node[31207]: I0418 10:26:47.900860   31207 plugins.go:56] Registering credential provider: .dockercfg
Apr 18 10:26:47 SBSTJVMLX605.SUNTECSBS.COM origin-node[31207]: I0418 10:26:47.902596   31207 kuberuntime_manager.go:186] Container runtime docker initialized, version: 1.13.1, apiVersion: 1.26.0

在8443端口主控api上,很多连接也被拒绝.

Also a lot of connect refused on 8443 port master api.

有人碰到类似的东西吗?我在3.9上有一个正在运行的群集,并且工作正常.卸载3.9

Did some one came across some thing similar. I have a running cluster on 3.9 and was working properly. I tried this as a fresh installation after uninstalling 3.9

推荐答案

Oof可以解决问题!

Oof could get the thing up !!

  1. Unable to update cni config: No networks found in /etc/cni/net.d.网络插件尚未准备就绪,可能是因为此原因. @ capt2101akash也指出了这一点.

  1. Unable to update cni config: No networks found in /etc/cni/net.d. The network plugin was not ready perhaps because of this. This was the thing @capt2101akash pointed also.

从下面的邮件列表中获得解决方案的解决方法

Got a work around solution from the below mailing list

参考解决方案

基本上创建了一个包含内容的文件/etc/cni/net.d/80-openshift-network.conf

Basically created a file /etc/cni/net.d/80-openshift-network.conf with content

{ "cniVersion":"0.2.0", "name":"openshift-sdn", "type":"openshift-sdn" }

{ "cniVersion": "0.2.0", "name": "openshift-sdn", "type": "openshift-sdn" }

再次没有出现,Ansible脚本向我展示了同样的老故事控制平面未出现"

Again it was not coming up, Ansible scripts showed me the same old story "Control planes not up"

这次主日志/usr/local/bin/master-logs api api显示的是/etc/origin/master/master.env中找不到的命令.推测库存文件中有问题.代理的条目有一个附加的\,而在某些空间没有代理.

This time master logs /usr/local/bin/master-logs api api was showing a command not found in /etc/origin/master/master.env . Guessed a problem in inventory file.The entry for proxy had an additional \ and no proxy some spaces.

整理清单文件.

已重新部署,它已启动并且可以访问.

Redeployed and it is up and accessible.

这是一种解决方法,如果我进入真正的原因,将其发布.

This was a workaround, would post it if i get into the real cause.

这篇关于OKD 3.11安装失败. “网络插件尚未准备好:cni config未初始化"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-01 11:19