summaryrefslogtreecommitdiff
path: root/openstack/usr/lib/systemd/system
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2015-04-15 07:16:42 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2015-04-16 04:09:41 +0000
commitcca2fa2e1d1b4e412ddf09cd70fe5754312f9b78 (patch)
tree6bc06ff6a5d9c6a74189622f81c046ce8299027e /openstack/usr/lib/systemd/system
parent8de7d921a3f8b7375691a4fbcfcfa8a66c49226c (diff)
downloaddefinitions-cca2fa2e1d1b4e412ddf09cd70fe5754312f9b78.tar.gz
OpenStack: Split Cinder into config, db and lv setupbaserock/openstack-in-baserock2
Change-Id: Iae387e39c4a62ef608496d31c748493fa88ce3e1
Diffstat (limited to 'openstack/usr/lib/systemd/system')
-rw-r--r--openstack/usr/lib/systemd/system/openstack-cinder-api.service5
-rw-r--r--openstack/usr/lib/systemd/system/openstack-cinder-backup.service3
-rw-r--r--openstack/usr/lib/systemd/system/openstack-cinder-config-setup.service11
-rw-r--r--openstack/usr/lib/systemd/system/openstack-cinder-db-setup.service13
-rw-r--r--openstack/usr/lib/systemd/system/openstack-cinder-iscsi-setup.service12
-rw-r--r--openstack/usr/lib/systemd/system/openstack-cinder-lv-setup.service12
-rw-r--r--openstack/usr/lib/systemd/system/openstack-cinder-scheduler.service3
-rw-r--r--openstack/usr/lib/systemd/system/openstack-cinder-volume.service3
8 files changed, 57 insertions, 5 deletions
diff --git a/openstack/usr/lib/systemd/system/openstack-cinder-api.service b/openstack/usr/lib/systemd/system/openstack-cinder-api.service
index c863f3f5..d1aaf136 100644
--- a/openstack/usr/lib/systemd/system/openstack-cinder-api.service
+++ b/openstack/usr/lib/systemd/system/openstack-cinder-api.service
@@ -1,7 +1,8 @@
[Unit]
Description=OpenStack Volume Service (code-named Cinder) API server
-After=syslog.target network-online.target
-Wants=network-online.target
+ConditionPathExists=/etc/cinder/cinder.conf
+After=postgres-server.service network-online.target openstack-cinder-db-setup.service openstack-cinder-config-setup.service
+Wants=postgres-server.service network-online.target
[Service]
Type=simple
diff --git a/openstack/usr/lib/systemd/system/openstack-cinder-backup.service b/openstack/usr/lib/systemd/system/openstack-cinder-backup.service
index 2f489228..bfb28b6b 100644
--- a/openstack/usr/lib/systemd/system/openstack-cinder-backup.service
+++ b/openstack/usr/lib/systemd/system/openstack-cinder-backup.service
@@ -1,6 +1,7 @@
[Unit]
Description=OpenStack Cinder backup server
-After=syslog.target network-online.target
+ConditionPathExists=/etc/cinder/cinder.conf
+After=network-online.target openstack-cinder-volume.service openstack-cinder-config-setup.service
Wants=network-online.target
[Service]
diff --git a/openstack/usr/lib/systemd/system/openstack-cinder-config-setup.service b/openstack/usr/lib/systemd/system/openstack-cinder-config-setup.service
new file mode 100644
index 00000000..1c966933
--- /dev/null
+++ b/openstack/usr/lib/systemd/system/openstack-cinder-config-setup.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Run cinder-config-setup Ansible scripts
+ConditionPathExists=/etc/openstack/cinder.conf
+
+[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/cinder-config.yml
+
+[Install]
+WantedBy=multi-user.target
diff --git a/openstack/usr/lib/systemd/system/openstack-cinder-db-setup.service b/openstack/usr/lib/systemd/system/openstack-cinder-db-setup.service
new file mode 100644
index 00000000..01a352e4
--- /dev/null
+++ b/openstack/usr/lib/systemd/system/openstack-cinder-db-setup.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Run cinder-db-setup Ansible scripts
+ConditionPathExists=/etc/cinder/cinder.conf
+After=postgres-server.service openstack-cinder-config-setup.service openstack-keystone.service openstack-keystone-setup.service
+Wants=postgres-server.service openstack-cinder-config-setup.service 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/cinder-db.yml
+
+[Install]
+WantedBy=multi-user.target
diff --git a/openstack/usr/lib/systemd/system/openstack-cinder-iscsi-setup.service b/openstack/usr/lib/systemd/system/openstack-cinder-iscsi-setup.service
new file mode 100644
index 00000000..157f30fc
--- /dev/null
+++ b/openstack/usr/lib/systemd/system/openstack-cinder-iscsi-setup.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Run cinder-iscsi-setup Ansible scripts
+Before=iscsid.service target.service
+Wants= iscsid.service target.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/cinder-iscsi.yml
+
+[Install]
+WantedBy=multi-user.target
diff --git a/openstack/usr/lib/systemd/system/openstack-cinder-lv-setup.service b/openstack/usr/lib/systemd/system/openstack-cinder-lv-setup.service
new file mode 100644
index 00000000..82e9b08d
--- /dev/null
+++ b/openstack/usr/lib/systemd/system/openstack-cinder-lv-setup.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Run cinder-lvs-setup Ansible scripts
+ConditionPathExists=/etc/openstack/cinder.conf
+Wants=lvm2-lvmetad.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/cinder-lvs.yml
+
+[Install]
+WantedBy=multi-user.target
diff --git a/openstack/usr/lib/systemd/system/openstack-cinder-scheduler.service b/openstack/usr/lib/systemd/system/openstack-cinder-scheduler.service
index 025f1f3c..c5f3337c 100644
--- a/openstack/usr/lib/systemd/system/openstack-cinder-scheduler.service
+++ b/openstack/usr/lib/systemd/system/openstack-cinder-scheduler.service
@@ -1,6 +1,7 @@
[Unit]
Description=OpenStack Cinder scheduler server
-After=syslog.target network-online.target
+ConditionPathExists=/etc/cinder/cinder.conf
+After=network-online.target openstack-cinder-volume.service openstack-cinder-config-setup.service
Wants=network-online.target
[Service]
diff --git a/openstack/usr/lib/systemd/system/openstack-cinder-volume.service b/openstack/usr/lib/systemd/system/openstack-cinder-volume.service
index 4a8da9c3..72cb73fc 100644
--- a/openstack/usr/lib/systemd/system/openstack-cinder-volume.service
+++ b/openstack/usr/lib/systemd/system/openstack-cinder-volume.service
@@ -1,6 +1,7 @@
[Unit]
Description=OpenStack Cinder volume server
-After=syslog.target network-online.target
+ConditionPathExists=/etc/cinder/cinder.conf
+After=network-online.target openstack-cinder-lv-setup.service openstack-cinder-config-setup.service lvm2-lvmetad.service iscsid.service target.service
Wants=network-online.target
[Service]