简体   繁体   English

Kolla-Ansible 部署失败 - /var/run/mongodb 不是目录

[英]Kolla-Ansible Deployment fails - /var/run/mongodb is not a directory

I am trying to deploy OpenStack "Stein" with Kolla-Ansible 8.0.1 and running always in the same failure in the role mongodb :我正在尝试使用 Kolla-Ansible 8.0.1 部署 OpenStack“Stein”,并在mongodb角色中始终以相同的故障运行:

The role fails always in the same task:角色总是在同一个任务中失败:

RUNNING HANDLER [mongodb : Waiting for the mongodb startup] **********************************************
fatal: [controller2]: FAILED! => {"changed": false, "elapsed": 300, "msg": "Timeout when waiting for 192.168.11.12:27017"} 
fatal: [controller1]: FAILED! => {"changed": false, "elapsed": 300, "msg": "Timeout when waiting for 192.168.11.11:27017"}
fatal: [controller3]: FAILED! => {"changed": false, "elapsed": 300, "msg": "Timeout when waiting for 192.168.11.13:27017"}

I checked the logs of the mongodb container on the hosts where they should be running.我在应该运行它们的主机上检查了 mongodb 容器的日志。 They show all the same error in the log:他们在日志中显示所有相同的错误:

+ exec /usr/bin/mongod --unixSocketPrefix=/var/run/mongodb --config /etc/mongodb.conf run
/var/run/mongodb must be a directory

Have I missed something important in the deployment steps?我是否错过了部署步骤中的重要内容?

(Disclaimer: I have never played with either kolla, openstack or mongodb...) (免责声明:我从未玩过 kolla、openstack 或 mongodb...)

Extract from mongodb doc摘自mongodb 文档

--unixSocketPrefix <path>

    Default: /tmp

    The path for the UNIX socket. --unixSocketPrefix applies only to Unix-based systems.

    If this option has no value, the mongod process creates a socket with /tmp as a prefix.

Now, your error message:现在,您的错误消息:

/var/run/mongodb must be a directory /var/run/mongodb 必须是目录

It looks like the actual path is hard coded in a template看起来实际路径是在模板中硬编码的

So your only option would be to make sure that directory exists (with correct permissions) in the container prior to launching mongodb so that it can write its socket there.因此,您唯一的选择是在启动 mongodb 之前确保容器中存在该目录(具有正确的权限),以便它可以在那里写入其套接字。

I don't have time to look further right now, but from what I could see, it looks like you can define the image tag you want to use.我现在没有时间进一步研究,但据我所知,您似乎可以定义要使用的图像标签。 The problem might origin from an older image that does not have this directory set at build time.该问题可能源于在构建时未设置此目录的旧映像。 Worth checking...值得检查...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM