From cca2fa2e1d1b4e412ddf09cd70fe5754312f9b78 Mon Sep 17 00:00:00 2001 From: Richard Maw Date: Wed, 15 Apr 2015 07:16:42 +0000 Subject: OpenStack: Split Cinder into config, db and lv setup Change-Id: Iae387e39c4a62ef608496d31c748493fa88ce3e1 --- .../usr/lib/systemd/system/openstack-cinder-api.service | 5 +++-- .../usr/lib/systemd/system/openstack-cinder-backup.service | 3 ++- .../systemd/system/openstack-cinder-config-setup.service | 11 +++++++++++ .../lib/systemd/system/openstack-cinder-db-setup.service | 13 +++++++++++++ .../lib/systemd/system/openstack-cinder-iscsi-setup.service | 12 ++++++++++++ .../lib/systemd/system/openstack-cinder-lv-setup.service | 12 ++++++++++++ .../lib/systemd/system/openstack-cinder-scheduler.service | 3 ++- .../usr/lib/systemd/system/openstack-cinder-volume.service | 3 ++- 8 files changed, 57 insertions(+), 5 deletions(-) create mode 100644 openstack/usr/lib/systemd/system/openstack-cinder-config-setup.service create mode 100644 openstack/usr/lib/systemd/system/openstack-cinder-db-setup.service create mode 100644 openstack/usr/lib/systemd/system/openstack-cinder-iscsi-setup.service create mode 100644 openstack/usr/lib/systemd/system/openstack-cinder-lv-setup.service (limited to 'openstack/usr/lib/systemd') 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] -- cgit v1.2.1