Devstack Keystone and Placement won't start after reboot [closed]

asked 2017-05-06 12:40:44 -0500

crlorentzen gravatar image

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?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by crlorentzen
close date 2017-05-09 14:18:14.895114



DevStack is not made for rebooting. If you need to run it on a platform that you want to switch off, run it in a VM whose state you save before shutting down.

Bernd Bausch gravatar imageBernd Bausch ( 2017-05-06 17:14:54 -0500 )edit

3 answers

Sort by » oldest newest most voted

answered 2017-05-08 07:29:53 -0500

AmirV gravatar image

Hi. If you restart OS with Devstack, you need to reinstall Devstack.

edit flag offensive delete link more

answered 2017-05-09 09:32:21 -0500

While this is not an answer I wanted to comment I think this is a new issue and I to am now experiencing this same problem where after a reboot keystone fails to start. I have been using Devstack for 2 years now and have never had to reinstall Devstack after a reboot of my server. I currently see this issue on all 3 of my Ubuntu 16x and RHEL-7.3 physical server

after stacking keystone is running:L

sudo systemctl status devstack@keystone devstack@keystone.service - Devstack devstack@keystone.service Loaded: loaded (/etc/systemd/system/devstack@keystone...; enabled; vendor preset: enabled) Active: active (running) since Tue 2017-05-09 08:27:58 EDT; 1h 1min ago Main PID: 5095 (uwsgi)

one can also restart keystone without issue but if you reboot your server keystone will not start

edit flag offensive delete link more

answered 2017-05-09 14:16:35 -0500

crlorentzen gravatar image

It would be good to have that documented on the install guidance pages...answer accepted will change to a different install method.

edit flag offensive delete link more


While I agree that it should be made clearer that devstack is not for beginners and not ideal for evaluating OpenStack, the web page says "It is used interactively as a development environment and as the basis for much of the OpenStack project’s functional testing" (my bolding).

Bernd Bausch gravatar imageBernd Bausch ( 2017-05-09 23:20:32 -0500 )edit

I'm experienced the same problem, does anyone have a solution ?

quocnam gravatar imagequocnam ( 2017-05-23 14:00:45 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools


Asked: 2017-05-06 12:40:44 -0500

Seen: 1,770 times

Last updated: May 09 '17