Browse code

Make sure the NOVA_INSTANCES_PATH is created

Under some conditions when NOVA_STATE_PATH is set
the NOVA_INSTANCES_PATH directory under it is removed
but then not correctly recreated if the parent directory
is owned by root instead of the current user running
devstack. This change fixes that problem by creating
the NOVA_INSTANCES_PATH as root, and then chowning it
to the correct user.

Change-Id: I7fb724787b5e915bae9bd058454d2aa38991364e
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>

Doug Hellmann authored on 2013/03/26 08:34:48
Showing 1 changed files
... ...
@@ -355,7 +355,8 @@ EOF"
355 355
         # ----------------
356 356
 
357 357
         # Nova stores each instance in its own directory.
358
-        mkdir -p $NOVA_INSTANCES_PATH
358
+        sudo mkdir -p $NOVA_INSTANCES_PATH
359
+        sudo chown -R $STACK_USER $NOVA_INSTANCES_PATH
359 360
 
360 361
         # You can specify a different disk to be mounted and used for backing the
361 362
         # virtual machines.  If there is a partition labeled nova-instances we