summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alvarez <pedro.alvarez@codethink.co.uk>2015-04-07 13:51:53 +0000
committerRichard Ipsum <richardipsum@fastmail.co.uk>2015-04-10 20:17:47 +0100
commite5912f9066c634b1afec5aa51bee5897a3cf9d8c (patch)
treec8a7eb2130eb447c6eaf17ee492bad2deb54fff9
parenteea0c22cf5d768a7d59aacab620e3875f12431df (diff)
downloaddefinitions-e5912f9066c634b1afec5aa51bee5897a3cf9d8c.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]