diff options
author | Tiago Gomes <tiago.gomes@codethink.co.uk> | 2015-05-01 14:39:04 +0000 |
---|---|---|
committer | Baserock Gerrit <gerrit@baserock.org> | 2015-05-08 10:56:54 +0000 |
commit | 311537d3650cb106bacc852fed3ae16988ce5dbc (patch) | |
tree | 6c26985395e8c968607fc03592e418bbf9f09a3c | |
parent | a6a53e7dbef3c88c9d301456398544b76c93cebe (diff) | |
download | definitions-311537d3650cb106bacc852fed3ae16988ce5dbc.tar.gz |
openstack: ensure that /var/run/openvswitch exists
This directory is created by the setup script, but as /var/run is a
symbolic link to /run, which is a tmpfs mounting point, the directory
will not persist across reboots. Hence, ensure that the directory
exists before starting the services that require it.
Note that we can't get away by adding the openvswitch-setup.service to
the Wants of openvswitch.service and openvswitch-db-server.services, as
those are enabled and started by the Ansible setup script, and so would
create a deadlock.
Also, remove non-existent service from the After section.
Change-Id: Ic5c16f89a8e71e4ad42f468159d6e604a5ee8e47
-rw-r--r-- | openstack/usr/lib/systemd/system/openvswitch-db-server.service | 1 | ||||
-rw-r--r-- | openstack/usr/lib/systemd/system/openvswitch.service | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/openstack/usr/lib/systemd/system/openvswitch-db-server.service b/openstack/usr/lib/systemd/system/openvswitch-db-server.service index 7ea7942a..34a7c812 100644 --- a/openstack/usr/lib/systemd/system/openvswitch-db-server.service +++ b/openstack/usr/lib/systemd/system/openvswitch-db-server.service @@ -4,6 +4,7 @@ After=local-fs.target [Service] Type=forking +ExecStartPre=-/usr/bin/mkdir -p /var/run/openvswitch ExecStart=/usr/sbin/ovsdb-server --remote=punix:/var/run/openvswitch/db.sock --remote=db:Open_vSwitch,Open_vSwitch,manager_options --private-key=db:Open_vSwitch,SSL,private_key --certificate=db:Open_vSwitch,SSL,certificate --bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert --pidfile --detach [Install] diff --git a/openstack/usr/lib/systemd/system/openvswitch.service b/openstack/usr/lib/systemd/system/openvswitch.service index 70a640de..113911f6 100644 --- a/openstack/usr/lib/systemd/system/openvswitch.service +++ b/openstack/usr/lib/systemd/system/openvswitch.service @@ -1,11 +1,11 @@ [Unit] Description=Open vSwitch Daemon -After=openvswitch-initialize-db.service Before=network-pre.target Wants=network-pre.target [Service] Type=forking +ExecStartPre=-/usr/bin/mkdir -p /var/run/openvswitch ExecStart=/usr/sbin/ovs-vswitchd --pidfile --detach [Install] |