yunionio / cloudpods

A cloud-native open-source unified multi-cloud and hybrid-cloud platform. 开源、云原生的多云管理及混合云融合平台
https://www.cloudpods.org
Apache License 2.0
2.59k stars 532 forks source link

host 和 host-deployer pod 启动失败 #5274

Closed bolemon closed 4 years ago

bolemon commented 4 years ago

容器报错如下 host [I 200227 15:42:55 hostinfo.NewHostInfo(hostinfo.go:1470)] CPU Model Intel(R) Xeon(R) Gold 5218 CPU @ 2.30GHz Microcode 0x500002c [E 200227 15:42:55 procutils.(*Command).Output(procutils.go:87)] Execute command "modprobe tun" , error: exit status 1 , output: modprobe: can't change directory to '/lib/modules': No such file or directory

[F 200227 15:42:55 hostman.(*SHostService).RunService(host_services.go:92)] Failed to activate tun/tap device

host-deployer [E 200227 15:42:22 procutils.(*Command).Output(procutils.go:87)] Execute command "rmmod nbd" , error: exit status 1 , output: .rmmod.bin: ERROR: Module nbd is not currently loaded

[E 200227 15:42:22 deployserver.(*SDeployService).PrepareEnv(deployserver.go:249)] rmmod error: .rmmod.bin: ERROR: Module nbd is not currently loaded

[E 200227 15:42:22 procutils.(Command).Output(procutils.go:87)] Execute command "modprobe nbd max_part=16" , error: exit status 1 , output: [F 200227 15:42:22 deployserver.(SDeployService).InitService(deployserver.go:293)] Failed to activate nbd device:

这个是什么原因呢

zexi commented 4 years ago

@bolemon 这个原因应该是宿主机上没有加载 nbd 模块 麻烦在宿主机上使用以下命令,看下宿主机的内核是否有 nbd 模块?

uname -a
modprobe nbd
wanyaoqi commented 4 years ago

@bolemon 应该是host版本和onecloud-operator版本不一致导致的 可以升级host和host-deployer版本来解决

# 修改host的image,使用最新的 registry.cn-beijing.aliyuncs.com/yunionio/host:latest
kubectl edit daemonset -n onecloud default-host
# 修改host-deployer的image registry.cn-beijing.aliyuncs.com/yunionio/host-deployer:latest
kubectl edit daemonset -n onecloud default-host-deployer
# 然后删除host 和host-deployer的pod
kubectl delete pod -n onecloud default-host-xxx default-host-deployer-xxx
wanyaoqi commented 4 years ago

/area host

wanyaoqi commented 4 years ago

/close

yunion-ci-robot commented 4 years ago

@wanyaoqi: Closing this issue.

In response to [this](https://github.com/yunionio/onecloud/issues/5274#issuecomment-633962291): >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.