summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alvarez <pedro.alvarez@codethink.co.uk>2015-04-07 13:51:53 +0000
committerPedro Alvarez <pedro.alvarez@codethink.co.uk>2015-04-08 15:48:13 +0000
commit141e38861a5cf3e462ca45ed50d80ddf0f36e38b (patch)
tree12484429f589e174cfbf5cb061624545efd96bdc
parentfde4590de772b80e346de3259da703e94db41095 (diff)
downloaddefinitions-141e38861a5cf3e462ca45ed50d80ddf0f36e38b.tar.gz
openstack-network: Add service to run network.yml setup scripts
openvswitch-setup now is oneshot because openstack-network needs to wait for it. Some other changes were needed to meet this change.
-rw-r--r--openstack/usr/lib/systemd/system/openstack-network-setup.service11
-rw-r--r--openstack/usr/lib/systemd/system/openvswitch-db-server.service2
-rw-r--r--openstack/usr/lib/systemd/system/openvswitch-setup.service1
3 files changed, 13 insertions, 1 deletions
diff --git a/openstack/usr/lib/systemd/system/openstack-network-setup.service b/openstack/usr/lib/systemd/system/openstack-network-setup.service
new file mode 100644
index 00000000..90c9ecf7
--- /dev/null
+++ b/openstack/usr/lib/systemd/system/openstack-network-setup.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Run Ansible scripts to configure internal network for OpenStack
+After=openvswitch.service openvswitch-setup.service
+Before=systemd-networkd.service
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/ansible-playbook -v -M /usr/share/ansible/ansible-openstack-modules -i /usr/share/openstack/hosts /usr/share/openstack/network.yml
+
+[Install]
+WantedBy=multi-user.target
diff --git a/openstack/usr/lib/systemd/system/openvswitch-db-server.service b/openstack/usr/lib/systemd/system/openvswitch-db-server.service
index 5c7e7646..7ea7942a 100644
--- a/openstack/usr/lib/systemd/system/openvswitch-db-server.service
+++ b/openstack/usr/lib/systemd/system/openvswitch-db-server.service
@@ -1,6 +1,6 @@
[Unit]
Description=Open vSwitch Database Server Daemon
-After=local-fs.target openvswitch-setup.service
+After=local-fs.target
[Service]
Type=forking
diff --git a/openstack/usr/lib/systemd/system/openvswitch-setup.service b/openstack/usr/lib/systemd/system/openvswitch-setup.service
index 1dbda6d8..6fdd7db6 100644
--- a/openstack/usr/lib/systemd/system/openvswitch-setup.service
+++ b/openstack/usr/lib/systemd/system/openvswitch-setup.service
@@ -3,6 +3,7 @@ Description=Run openvswitch-setup Ansible scripts
After=local-fs.target
[Service]
+Type=oneshot
ExecStart=/usr/bin/ansible-playbook -v -i /usr/share/openstack/hosts /usr/share/openstack/openvswitch.yml
[Install]