summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2015-03-17 14:55:04 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2015-04-07 10:08:32 +0000
commit0ddc52044c83ceddd847ef5e2a2bde4dc29a9062 (patch)
tree6256feb43837e9c7183a4eabf3fec41ddbd8ee9e
parentd9c0006164b89cdc720d6d82b2f436d74be7ef23 (diff)
downloaddefinitions-0ddc52044c83ceddd847ef5e2a2bde4dc29a9062.tar.gz
neutron.configure: Ensure /var/run is a symlink to /run
If /var/run is a directory that is not emptied every boot, then it will contain references to stale network namespaces, which do not work when neutron tries to create networks. If it is flushed appropriately then neutron will create the namespaces when it needs to.
-rw-r--r--openstack-neutron.configure9
1 files changed, 9 insertions, 0 deletions
diff --git a/openstack-neutron.configure b/openstack-neutron.configure
index 9097336d..5b71c09c 100644
--- a/openstack-neutron.configure
+++ b/openstack-neutron.configure
@@ -56,3 +56,12 @@ for service in ${services[@]}; do
ln -sf "/etc/systemd/system/$service" \
"$ROOT/etc/systemd/system/multi-user.target.wants/$service"
done
+
+#############################################
+# Ensure /var/run is an appropriate symlink #
+#############################################
+
+if ! link="$(readlink "$ROOT/var/run")" || [ "$link" != ../run ]; then
+ rm -rf "$ROOT/var/run"
+ ln -s ../run "$ROOT/var/run"
+fi