summaryrefslogtreecommitdiff
path: root/openstack/usr/lib/systemd
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2015-04-14 13:00:50 +0000
committerFrancisco Redondo Marchena <francisco.marchena@codethink.co.uk>2015-04-16 16:30:44 +0000
commit0aa33ca0596dcb6a388c1228707f69112be4c052 (patch)
tree3066ce90087afc759c99ab4bb78036bfe9b4f4da /openstack/usr/lib/systemd
parent1146b222d5782cc771952328b7b3f989af743d0c (diff)
downloaddefinitions-0aa33ca0596dcb6a388c1228707f69112be4c052.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')
-rw-r--r--openstack/usr/lib/systemd/system/openstack-neutron-config-setup.service13
-rw-r--r--openstack/usr/lib/systemd/system/openstack-neutron-db-setup.service13
-rw-r--r--openstack/usr/lib/systemd/system/openstack-neutron-dhcp-agent.service5
-rw-r--r--openstack/usr/lib/systemd/system/openstack-neutron-l3-agent.service5
-rw-r--r--openstack/usr/lib/systemd/system/openstack-neutron-metadata-agent.service5
-rw-r--r--openstack/usr/lib/systemd/system/openstack-neutron-ovs-cleanup.service5
-rw-r--r--openstack/usr/lib/systemd/system/openstack-neutron-plugin-openvswitch-agent.service5
-rw-r--r--openstack/usr/lib/systemd/system/openstack-neutron-server.service5
-rw-r--r--openstack/usr/lib/systemd/system/openstack-neutron-setup.service10
9 files changed, 44 insertions, 22 deletions
diff --git a/openstack/usr/lib/systemd/system/openstack-neutron-config-setup.service b/openstack/usr/lib/systemd/system/openstack-neutron-config-setup.service
new file mode 100644
index 00000000..46e1b585
--- /dev/null
+++ b/openstack/usr/lib/systemd/system/openstack-neutron-config-setup.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Run neutron-config-setup Ansible scripts
+ConditionPathExists=/etc/openstack/neutron.conf
+After=openstack-keystone.service openstack-keystone-setup.service
+Wants=openstack-keystone.service
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/bin/ansible-playbook -v -M /usr/share/ansible/ansible-openstack-modules -i /usr/share/openstack/hosts /usr/share/openstack/neutron-config.yml
+
+[Install]
+WantedBy=multi-user.target
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
diff --git a/openstack/usr/lib/systemd/system/openstack-neutron-dhcp-agent.service b/openstack/usr/lib/systemd/system/openstack-neutron-dhcp-agent.service
index 34a682b6..cd9ed9fe 100644
--- a/openstack/usr/lib/systemd/system/openstack-neutron-dhcp-agent.service
+++ b/openstack/usr/lib/systemd/system/openstack-neutron-dhcp-agent.service
@@ -1,7 +1,8 @@
[Unit]
Description=Neutron DHCP Agent
-After=network-online.target openstack-neutron-ovs-cleanup.service
-Wants=network-online.target
+ConditionPathExists=/etc/neutron/neutron.conf
+After=network-online.target openstack-neutron-config-setup.service openstack-neutron-db-setup.service openstack-neutron-ovs-cleanup.service
+Wants=network-online.target openstack-neutron-config-setup.service
[Service]
Type=simple
diff --git a/openstack/usr/lib/systemd/system/openstack-neutron-l3-agent.service b/openstack/usr/lib/systemd/system/openstack-neutron-l3-agent.service
index bd514aa1..1a6b5928 100644
--- a/openstack/usr/lib/systemd/system/openstack-neutron-l3-agent.service
+++ b/openstack/usr/lib/systemd/system/openstack-neutron-l3-agent.service
@@ -1,7 +1,8 @@
[Unit]
Description=Neutron Layer 3 Agent
-After=network-online.target openstack-neutron-ovs-cleanup.service
-Wants=network-online.target
+ConditionPathExists=/etc/neutron/neutron.conf
+After=network-online.target openstack-neutron-config-setup.service openstack-neutron-db-setup.service openstack-neutron-ovs-cleanup.service
+Wants=network-online.target openstack-neutron-config-setup.service
[Service]
Type=simple
diff --git a/openstack/usr/lib/systemd/system/openstack-neutron-metadata-agent.service b/openstack/usr/lib/systemd/system/openstack-neutron-metadata-agent.service
index 22bbf675..c96fa3a2 100644
--- a/openstack/usr/lib/systemd/system/openstack-neutron-metadata-agent.service
+++ b/openstack/usr/lib/systemd/system/openstack-neutron-metadata-agent.service
@@ -1,7 +1,8 @@
[Unit]
Description=Neutron Metadata Plugin Agent
-After=network-online.target openstack-neutron-setup.service
-Wants=network-online.target
+ConditionPathExists=/etc/neutron/neutron.conf
+After=network-online.target openstack-neutron-config-setup.service openstack-neutron-db-setup.service
+Wants=network-online.target openstack-neutron-config-setup.service
[Service]
Type=simple
diff --git a/openstack/usr/lib/systemd/system/openstack-neutron-ovs-cleanup.service b/openstack/usr/lib/systemd/system/openstack-neutron-ovs-cleanup.service
index 544531ed..386f50dd 100644
--- a/openstack/usr/lib/systemd/system/openstack-neutron-ovs-cleanup.service
+++ b/openstack/usr/lib/systemd/system/openstack-neutron-ovs-cleanup.service
@@ -1,7 +1,8 @@
[Unit]
Description=Neutron OVS cleanup
-After=network-online.target openstack-neutron-setup.service openvswitch.service
-Wants=network-online.target
+ConditionPathExists=/etc/neutron/neutron.conf
+After=network-online.target openstack-neutron-config-setup.service openstack-neutron-db-setup.service openvswitch.service
+Wants=network-online.target openstack-neutron-config-setup.service
Before=openstack-neutron-plugin-openvswitch-agent.service
ConditionFileIsExecutable=/usr/bin/neutron-ovs-cleanup
diff --git a/openstack/usr/lib/systemd/system/openstack-neutron-plugin-openvswitch-agent.service b/openstack/usr/lib/systemd/system/openstack-neutron-plugin-openvswitch-agent.service
index 894c3a45..ade14733 100644
--- a/openstack/usr/lib/systemd/system/openstack-neutron-plugin-openvswitch-agent.service
+++ b/openstack/usr/lib/systemd/system/openstack-neutron-plugin-openvswitch-agent.service
@@ -1,7 +1,8 @@
[Unit]
Description=Neutron OpenvSwitch Plugin Agent
-After=network-online.target openstack-neutron-setup.service
-Wants=network-online.target
+ConditionPathExists=/etc/neutron/neutron.conf
+After=network-online.target openstack-neutron-config-setup.service openstack-neutron-db-setup.service
+Wants=network-online.target openstack-neutron-config-setup.service
[Service]
Type=simple
diff --git a/openstack/usr/lib/systemd/system/openstack-neutron-server.service b/openstack/usr/lib/systemd/system/openstack-neutron-server.service
index 05dfb7aa..3c0e1bda 100644
--- a/openstack/usr/lib/systemd/system/openstack-neutron-server.service
+++ b/openstack/usr/lib/systemd/system/openstack-neutron-server.service
@@ -1,7 +1,8 @@
[Unit]
Description=Neutron Api Server
-Wants=openstack-neutron-network-configuration-one-node.service network-online.target
-After=network-online.target openstack-neutron-setup.service openstack-neutron-network-configuration-one-node.service
+ConditionPathExists=/etc/neutron/neutron.conf
+Wants=openstack-neutron-network-configuration-one-node.service network-online.target openstack-neutron-config-setup.service
+After=openstack-neutron-network-configuration-one-node.service network-online.target openstack-neutron-config-setup.service openstack-neutron-db-setup.service
[Service]
Type=simple
diff --git a/openstack/usr/lib/systemd/system/openstack-neutron-setup.service b/openstack/usr/lib/systemd/system/openstack-neutron-setup.service
deleted file mode 100644
index 99213b6a..00000000
--- a/openstack/usr/lib/systemd/system/openstack-neutron-setup.service
+++ /dev/null
@@ -1,10 +0,0 @@
-[Unit]
-Description=Run neutron-setup Ansible scripts
-After=network-online.target openstack-keystone-setup.service postgres-server.service
-Wants=network-online.target
-
-[Service]
-ExecStart=/usr/bin/ansible-playbook -v -M /usr/share/ansible/ansible-openstack-modules -i /usr/share/openstack/hosts /usr/share/openstack/neutron.yml
-
-[Install]
-WantedBy=multi-user.target