summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Gomes <tiago.gomes@codethink.co.uk>2015-04-27 15:31:58 (GMT)
committerPedro Alvarez <pedro.alvarez@codethink.co.uk>2015-05-08 09:56:08 (GMT)
commitcf991b0e46cdc7f81895e4f14106d1d4071c9a4e (patch)
treeb9fa3fc8a857c3be9e8b8319acb37851e4939078
parent8f96be4bd3b9d9f8546b23bc43b51e5cdaaddf38 (diff)
downloaddefinitions-cf991b0e46cdc7f81895e4f14106d1d4071c9a4e.tar.gz
openstack: add missing ConditionPathExists
And fix some existing as well. Generate a separate postgres.conf file so that we don't have to reference keystone on the postgres setup systemd unit and Ansible script. Change-Id: I0bb4428b7e88a508a37d1d43ddcd266369b05cd2
-rw-r--r--openstack-keystone.configure10
-rw-r--r--openstack/usr/lib/systemd/system/openstack-ceilometer-alarm-evaluator.service1
-rw-r--r--openstack/usr/lib/systemd/system/openstack-ceilometer-alarm-notifier.service1
-rw-r--r--openstack/usr/lib/systemd/system/openstack-ceilometer-api.service1
-rw-r--r--openstack/usr/lib/systemd/system/openstack-ceilometer-central.service1
-rw-r--r--openstack/usr/lib/systemd/system/openstack-ceilometer-collector.service1
-rw-r--r--openstack/usr/lib/systemd/system/openstack-ceilometer-compute.service1
-rw-r--r--openstack/usr/lib/systemd/system/openstack-ceilometer-notification.service1
-rw-r--r--openstack/usr/lib/systemd/system/openstack-cinder-db-setup.service2
-rw-r--r--openstack/usr/lib/systemd/system/openstack-glance-api.service1
-rw-r--r--openstack/usr/lib/systemd/system/openstack-glance-registry.service1
-rw-r--r--openstack/usr/lib/systemd/system/openstack-glance-setup.service1
-rw-r--r--openstack/usr/lib/systemd/system/openstack-ironic-api.service1
-rw-r--r--openstack/usr/lib/systemd/system/openstack-ironic-conductor.service1
-rw-r--r--openstack/usr/lib/systemd/system/openstack-ironic-setup.service1
-rw-r--r--openstack/usr/lib/systemd/system/openstack-keystone.service1
-rw-r--r--openstack/usr/lib/systemd/system/openstack-nova-config-setup.service2
-rw-r--r--openstack/usr/lib/systemd/system/openstack-nova-db-setup.service2
-rw-r--r--openstack/usr/lib/systemd/system/postgres-server-setup.service1
-rw-r--r--openstack/usr/share/openstack/postgres.yml2
20 files changed, 29 insertions, 4 deletions
diff --git a/openstack-keystone.configure b/openstack-keystone.configure
index 2a3cc0f..6b011b1 100644
--- a/openstack-keystone.configure
+++ b/openstack-keystone.configure
@@ -111,3 +111,13 @@ keystone_configuration={
yaml.dump(keystone_configuration, sys.stdout, default_flow_style=False)
EOF
+
+python << 'EOF' > "$OPENSTACK_DATA/postgres.conf"
+import os, sys, yaml
+
+postgres_configuration={
+ 'MANAGEMENT_INTERFACE_IP_ADDRESS': os.environ['MANAGEMENT_INTERFACE_IP_ADDRESS'],
+}
+
+yaml.dump(postgres_configuration, sys.stdout, default_flow_style=False)
+EOF
diff --git a/openstack/usr/lib/systemd/system/openstack-ceilometer-alarm-evaluator.service b/openstack/usr/lib/systemd/system/openstack-ceilometer-alarm-evaluator.service
index ec972f8..627d261 100644
--- a/openstack/usr/lib/systemd/system/openstack-ceilometer-alarm-evaluator.service
+++ b/openstack/usr/lib/systemd/system/openstack-ceilometer-alarm-evaluator.service
@@ -1,5 +1,6 @@
[Unit]
Description=OpenStack ceilometer alarm evaluation service
+ConditionPathExists=/etc/ceilometer/ceilometer.conf
After=syslog.target network-online.target openstack-ceilometer-config-setup.service
Wants=network-online.target
diff --git a/openstack/usr/lib/systemd/system/openstack-ceilometer-alarm-notifier.service b/openstack/usr/lib/systemd/system/openstack-ceilometer-alarm-notifier.service
index 30a9444..c30420e 100644
--- a/openstack/usr/lib/systemd/system/openstack-ceilometer-alarm-notifier.service
+++ b/openstack/usr/lib/systemd/system/openstack-ceilometer-alarm-notifier.service
@@ -1,5 +1,6 @@
[Unit]
Description=OpenStack ceilometer alarm notification service
+ConditionPathExists=/etc/ceilometer/ceilometer.conf
After=syslog.target network-online.target openstack-ceilometer-config-setup.service
Wants=network-online.target
diff --git a/openstack/usr/lib/systemd/system/openstack-ceilometer-api.service b/openstack/usr/lib/systemd/system/openstack-ceilometer-api.service
index f5bd480..8a6c44d 100644
--- a/openstack/usr/lib/systemd/system/openstack-ceilometer-api.service
+++ b/openstack/usr/lib/systemd/system/openstack-ceilometer-api.service
@@ -1,5 +1,6 @@
[Unit]
Description=OpenStack ceilometer API service
+ConditionPathExists=/etc/ceilometer/ceilometer.conf
After=syslog.target network-online.target openstack-ceilometer-config-setup.service
Wants=network-online.target
diff --git a/openstack/usr/lib/systemd/system/openstack-ceilometer-central.service b/openstack/usr/lib/systemd/system/openstack-ceilometer-central.service
index 05b9189..48d6e5f 100644
--- a/openstack/usr/lib/systemd/system/openstack-ceilometer-central.service
+++ b/openstack/usr/lib/systemd/system/openstack-ceilometer-central.service
@@ -1,5 +1,6 @@
[Unit]
Description=OpenStack ceilometer central agent
+ConditionPathExists=/etc/ceilometer/ceilometer.conf
After=syslog.target network-online.target openstack-ceilometer-collector.service
Wants=network-online.target
diff --git a/openstack/usr/lib/systemd/system/openstack-ceilometer-collector.service b/openstack/usr/lib/systemd/system/openstack-ceilometer-collector.service
index 5941c20..d1de528 100644
--- a/openstack/usr/lib/systemd/system/openstack-ceilometer-collector.service
+++ b/openstack/usr/lib/systemd/system/openstack-ceilometer-collector.service
@@ -1,5 +1,6 @@
[Unit]
Description=OpenStack ceilometer collection service
+ConditionPathExists=/etc/ceilometer/ceilometer.conf
After=syslog.target network-online.target openstack-ceilometer-config-setup.service
Wants=network-online.target
diff --git a/openstack/usr/lib/systemd/system/openstack-ceilometer-compute.service b/openstack/usr/lib/systemd/system/openstack-ceilometer-compute.service
index 5dee894..95c6d87 100644
--- a/openstack/usr/lib/systemd/system/openstack-ceilometer-compute.service
+++ b/openstack/usr/lib/systemd/system/openstack-ceilometer-compute.service
@@ -1,5 +1,6 @@
[Unit]
Description=OpenStack ceilometer compute agent
+ConditionPathExists=/etc/ceilometer/ceilometer.conf
After=syslog.target network-online.target openstack-ceilometer-config-setup.service
Wants=network-online.target
diff --git a/openstack/usr/lib/systemd/system/openstack-ceilometer-notification.service b/openstack/usr/lib/systemd/system/openstack-ceilometer-notification.service
index c78b3e3..3385ec9 100644
--- a/openstack/usr/lib/systemd/system/openstack-ceilometer-notification.service
+++ b/openstack/usr/lib/systemd/system/openstack-ceilometer-notification.service
@@ -1,5 +1,6 @@
[Unit]
Description=OpenStack ceilometer notification agent
+ConditionPathExists=/etc/ceilometer/ceilometer.conf
After=syslog.target network-online.target openstack-ceilometer-collector.service
Wants=network-online.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
index d0568c7..cc99d0c 100644
--- a/openstack/usr/lib/systemd/system/openstack-cinder-db-setup.service
+++ b/openstack/usr/lib/systemd/system/openstack-cinder-db-setup.service
@@ -1,6 +1,6 @@
[Unit]
Description=Run cinder-db-setup Ansible scripts
-ConditionPathExists=/etc/cinder/cinder.conf
+ConditionPathExists=/etc/openstack/cinder.conf
After=postgres-server-setup.service openstack-cinder-config-setup.service openstack-keystone-setup.service
[Service]
diff --git a/openstack/usr/lib/systemd/system/openstack-glance-api.service b/openstack/usr/lib/systemd/system/openstack-glance-api.service
index e138711..dc9fd2f 100644
--- a/openstack/usr/lib/systemd/system/openstack-glance-api.service
+++ b/openstack/usr/lib/systemd/system/openstack-glance-api.service
@@ -1,5 +1,6 @@
[Unit]
Description=OpenStack Image Service (code-named Glance) API server
+ConditionPathExists=/etc/glance/glance-api.conf
After=syslog.target network-online.target
Wants=network-online.target
diff --git a/openstack/usr/lib/systemd/system/openstack-glance-registry.service b/openstack/usr/lib/systemd/system/openstack-glance-registry.service
index f313435..b2cc8b4 100644
--- a/openstack/usr/lib/systemd/system/openstack-glance-registry.service
+++ b/openstack/usr/lib/systemd/system/openstack-glance-registry.service
@@ -1,5 +1,6 @@
[Unit]
Description=OpenStack Image Service (code-named Glance) Registry server
+ConditionPathExists=/etc/glance/glance-registry.conf
After=syslog.target network-online.target
Wants=network-online.target
diff --git a/openstack/usr/lib/systemd/system/openstack-glance-setup.service b/openstack/usr/lib/systemd/system/openstack-glance-setup.service
index 8fec1cf..b4ec3f0 100644
--- a/openstack/usr/lib/systemd/system/openstack-glance-setup.service
+++ b/openstack/usr/lib/systemd/system/openstack-glance-setup.service
@@ -1,5 +1,6 @@
[Unit]
Description=Run glance-setup Ansible scripts
+ConditionPathExists=/etc/openstack/glance.conf
After=local-fs.target openstack-keystone-setup.service postgres-server-setup.service
[Service]
diff --git a/openstack/usr/lib/systemd/system/openstack-ironic-api.service b/openstack/usr/lib/systemd/system/openstack-ironic-api.service
index 83d5678..8d05d42 100644
--- a/openstack/usr/lib/systemd/system/openstack-ironic-api.service
+++ b/openstack/usr/lib/systemd/system/openstack-ironic-api.service
@@ -1,5 +1,6 @@
[Unit]
Description=OpenStack Bare Metal Provisioning Service (code-named Ironic) API server
+ConditionPathExists=/etc/ironic/ironic.conf
After=syslog.target network-online.target
Wants=network-online.target
diff --git a/openstack/usr/lib/systemd/system/openstack-ironic-conductor.service b/openstack/usr/lib/systemd/system/openstack-ironic-conductor.service
index f276f6f..8ce3f84 100644
--- a/openstack/usr/lib/systemd/system/openstack-ironic-conductor.service
+++ b/openstack/usr/lib/systemd/system/openstack-ironic-conductor.service
@@ -1,5 +1,6 @@
[Unit]
Description=OpenStack Bare Metal Provisioning Service (code-named Ironic) Conductor server
+ConditionPathExists=/etc/ironic/ironic.conf
After=syslog.target network-online.target
Wants=network-online.target
diff --git a/openstack/usr/lib/systemd/system/openstack-ironic-setup.service b/openstack/usr/lib/systemd/system/openstack-ironic-setup.service
index 5560b88..6d118f1 100644
--- a/openstack/usr/lib/systemd/system/openstack-ironic-setup.service
+++ b/openstack/usr/lib/systemd/system/openstack-ironic-setup.service
@@ -1,5 +1,6 @@
[Unit]
Description=Run ironic-setup Ansible scripts
+ConditionPathExists=/etc/openstack/ironic.conf
After=local-fs.target openstack-keystone-setup.service postgres-server-setup.service
[Service]
diff --git a/openstack/usr/lib/systemd/system/openstack-keystone.service b/openstack/usr/lib/systemd/system/openstack-keystone.service
index 0aa9e1e..9e79165 100644
--- a/openstack/usr/lib/systemd/system/openstack-keystone.service
+++ b/openstack/usr/lib/systemd/system/openstack-keystone.service
@@ -1,6 +1,7 @@
[Unit]
Description=OpenStack Identity Service (code-named Keystone)
After=syslog.target network-online.target
+ConditionPathExists=/etc/keystone/keystone.conf
Wants=network-online.target
[Service]
diff --git a/openstack/usr/lib/systemd/system/openstack-nova-config-setup.service b/openstack/usr/lib/systemd/system/openstack-nova-config-setup.service
index eeb4389..2813081 100644
--- a/openstack/usr/lib/systemd/system/openstack-nova-config-setup.service
+++ b/openstack/usr/lib/systemd/system/openstack-nova-config-setup.service
@@ -1,6 +1,6 @@
[Unit]
Description=Run nova-config-setup Ansible scripts
-ConditionPathExists=/etc/openstack/neutron.conf
+ConditionPathExists=/etc/openstack/nova.conf
After=openstack-keystone-setup.service
[Service]
diff --git a/openstack/usr/lib/systemd/system/openstack-nova-db-setup.service b/openstack/usr/lib/systemd/system/openstack-nova-db-setup.service
index ee40527..238df3c 100644
--- a/openstack/usr/lib/systemd/system/openstack-nova-db-setup.service
+++ b/openstack/usr/lib/systemd/system/openstack-nova-db-setup.service
@@ -1,6 +1,6 @@
[Unit]
Description=Run nova-db-setup Ansible scripts
-ConditionPathExists=/etc/openstack/neutron.conf
+ConditionPathExists=/etc/openstack/nova.conf
After=postgres-server-setup.service openstack-keystone-setup.service openstack-nova-config-setup.service
[Service]
diff --git a/openstack/usr/lib/systemd/system/postgres-server-setup.service b/openstack/usr/lib/systemd/system/postgres-server-setup.service
index 5bb70eb..a185db3 100644
--- a/openstack/usr/lib/systemd/system/postgres-server-setup.service
+++ b/openstack/usr/lib/systemd/system/postgres-server-setup.service
@@ -1,5 +1,6 @@
[Unit]
Description=Run postgres-setup Ansible scripts
+ConditionPathExists=/etc/openstack/postgres.conf
After=local-fs.target
[Service]
diff --git a/openstack/usr/share/openstack/postgres.yml b/openstack/usr/share/openstack/postgres.yml
index 3cf2370..5ff9355 100644
--- a/openstack/usr/share/openstack/postgres.yml
+++ b/openstack/usr/share/openstack/postgres.yml
@@ -1,7 +1,7 @@
---
- hosts: localhost
vars_files:
- - "/etc/openstack/keystone.conf"
+ - "/etc/openstack/postgres.conf"
tasks:
- name: Create postgres user