summaryrefslogtreecommitdiff
path: root/openstack/usr/lib/systemd/system/openstack-neutron-db-setup.service
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2015-04-14 13:00:50 +0000
committerPedro Alvarez <pedro.alvarez@codethink.co.uk>2015-04-17 15:35:24 +0000
commitf1baa4ade17fcd1eaa2fed4aecf3901c414acc9a (patch)
tree64c52a84fb808aa6853d583a53e46c98b7f1b35c /openstack/usr/lib/systemd/system/openstack-neutron-db-setup.service
parentda6201b2e28b41a55547941ed181f2a6b413e61d (diff)
downloaddefinitions-f1baa4ade17fcd1eaa2fed4aecf3901c414acc9a.tar.gz
OpenStack: Split neutron config up into MANAGER, CONTROLLER and AGENT
This adds NEUTRON_ENABLE_{MANAGER,CONTROLLER,AGENT} to determine which parts should be run on a node, so a network node has MANAGER enabled, but doesn't need CONTROLLER or AGENT, since those will be run on the controller and compute nodes respectively. This works by the configuration extension selectively enabling systemd units, with config-setup always being run, and db-setup run on the controller node. Rather than having the enable logic in 3 distinct setup services, their dependencies have been augmented to run after appropriate setup services if they are enabled, and to not run if their configuration hasn't been created. Change-Id: I7625074c94acfb49fc68660440609b0fe9c0052d
Diffstat (limited to 'openstack/usr/lib/systemd/system/openstack-neutron-db-setup.service')
-rw-r--r--openstack/usr/lib/systemd/system/openstack-neutron-db-setup.service13
1 files changed, 13 insertions, 0 deletions
diff --git a/openstack/usr/lib/systemd/system/openstack-neutron-db-setup.service b/openstack/usr/lib/systemd/system/openstack-neutron-db-setup.service
new file mode 100644
index 00000000..4b30e78a
--- /dev/null
+++ b/openstack/usr/lib/systemd/system/openstack-neutron-db-setup.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Run neutron-db-setup Ansible scripts
+ConditionPathExists=/etc/openstack/neutron.conf
+After=network-online.target openstack-keystone.service postgres-server.service openstack-keystone-setup.service
+Wants=network-online.target openstack-keystone.service postgres-server.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/neutron-db.yml
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target