Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Devstack Keystone and Placement won't start after reboot

Hello All, I'm having trouble with an OpenStack installation using DevStack. After a reboot keystone and placement services cannot start due to missing /var/run/uwsgi/ folder where it can create socket files. I created a fix script that I can run after a reboot, however, I'm hoping someone has a more permanent fix, and that this might help the developers.

#!/usr/bin/env bash

sudo mkdir /var/run/uwsgi/
sudo chown stack /var/run/uwsgi/

sudo systemctl start devstack@keystone.service
sudo systemctl start devstack@placement-api.service

Further details of my testing and findings below

I followed the directions at to install Devstack's on a brand new clean Ubuntu 16.04 Xenial mini install just today.

After installation I can successfully access Horizon and can confirm all devstack@ services are running, however, after a reboot devstack@keystone.service and devstack@placement-api.service do not start.

I found that the issue is they cannot create the uwsgi socket as the /var/run/uwsgi folder is missing.

May 06 13:12:02 openstack-001 devstack@keystone.service[3113]: bind(): No such file or directory [core/socket.c line 230]
May 06 13:12:02 openstack-001 systemd[1]: devstack@keystone.service: Main process exited, code=exited, status=1/FAILURE
May 06 13:12:02 openstack-001 systemd[1]: Failed to start Devstack devstack@keystone.service.
-- Subject: Unit devstack@keystone.service has failed
-- Defined-By: systemd
-- Support:
-- Unit devstack@keystone.service has failed.
-- The result is failed.

It appears that in Ubuntu the /var/run is linked to /run, and /run is a tmpfs. So on reboot anything created there is destroyed.

$  ls -ld /var/run
lrwxrwxrwx 1 root root 4 May  6 11:00 /var/run -> /run
$ ls -ld /run
drwxr-xr-x 28 root root 940 May  6 13:10 /run
$ df -h
Filesystem                           Size  Used Avail Use% Mounted on
udev                                  16G     0   16G   0% /dev
**tmpfs                                3.2G   18M  3.2G   1% /run**
/dev/mapper/openstack--001--vg-root   61G  3.3G   54G   6% /
tmpfs                                 16G     0   16G   0% /dev/shm
tmpfs                                5.0M     0  5.0M   0% /run/lock
tmpfs                                 16G     0   16G   0% /sys/fs/cgroup
/dev/nvme0n1p1                       472M   55M  393M  13% /boot
/dev/mapper/openstack--001--vg-opt   378G  1.1G  357G   1% /opt
tmpfs                                3.2G     0  3.2G   0% /run/user/1000

I do not know if the service attempts to create the /var/run/uwsgi and fails or not...does anyone else have this problem and have a more permanent fix?