简体   繁体   中英

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 :

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. 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...)

Extract from mongodb doc

--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

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.

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...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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