aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamYaple <sam@yaple.net>2016-03-18 01:07:28 +0000
committerSamYaple <sam@yaple.net>2016-03-19 23:01:27 +0000
commitf4175f04d717a8372f7887d9c304758032f76a9f (patch)
tree70ad2dace4e6f11f02f1ea786486f704c944163c
parent0a1486a2c73275009f7158c911e7bfd683e40a58 (diff)
downloadkolla-f4175f04d717a8372f7887d9c304758032f76a9f.tar.gz
kolla-f4175f04d717a8372f7887d9c304758032f76a9f.zip
Fix 'optional' config.json values
These values are optional only when the services are not enabled. If the file does not exist we should not warn, but rather inform. Ceph-mon is an exception here since its bootstrap process means the files may or may not exist initially. TrivialFix Change-Id: Ic02bece76d480e99deecf612036f37abb5604135
-rw-r--r--ansible/roles/ceph/templates/ceph-mon.json.j28
-rw-r--r--ansible/roles/ceph/templates/ceph-rgw.json.j26
-rw-r--r--ansible/roles/cinder/templates/cinder-backup.json.j24
-rw-r--r--ansible/roles/cinder/templates/cinder-volume.json.j24
-rw-r--r--ansible/roles/common/templates/heka.json.j24
-rw-r--r--ansible/roles/haproxy/templates/haproxy.json.j22
-rw-r--r--docker/base/set_configs.py2
7 files changed, 14 insertions, 16 deletions
diff --git a/ansible/roles/ceph/templates/ceph-mon.json.j2 b/ansible/roles/ceph/templates/ceph-mon.json.j2
index 412e778cd..d3a32b399 100644
--- a/ansible/roles/ceph/templates/ceph-mon.json.j2
+++ b/ansible/roles/ceph/templates/ceph-mon.json.j2
@@ -12,28 +12,28 @@
"dest": "/etc/ceph/ceph.client.admin.keyring",
"owner": "ceph",
"perm": "0600",
- "optional": "True"
+ "optional": true
},
{
"source": "{{ container_config_directory }}/ceph.client.mon.keyring",
"dest": "/etc/ceph/ceph.client.mon.keyring",
"owner": "ceph",
"perm": "0600",
- "optional": "True"
+ "optional": true
},
{
"source": "{{ container_config_directory }}/ceph.client.radosgw.keyring",
"dest": "/etc/ceph/ceph.client.radosgw.keyring",
"owner": "ceph",
"perm": "0600",
- "optional": "True"
+ "optional": true
},
{
"source": "{{ container_config_directory }}/ceph.monmap",
"dest": "/etc/ceph/ceph.monmap",
"owner": "ceph",
"perm": "0600",
- "optional": "True"
+ "optional": true
}
]
}
diff --git a/ansible/roles/ceph/templates/ceph-rgw.json.j2 b/ansible/roles/ceph/templates/ceph-rgw.json.j2
index 5a0b043f4..7cb0ccdd4 100644
--- a/ansible/roles/ceph/templates/ceph-rgw.json.j2
+++ b/ansible/roles/ceph/templates/ceph-rgw.json.j2
@@ -11,15 +11,13 @@
"source": "{{ container_config_directory }}/ceph.client.admin.keyring",
"dest": "/etc/ceph/ceph.client.admin.keyring",
"owner": "ceph",
- "perm": "0600",
- "optional": "True"
+ "perm": "0600"
},
{
"source": "{{ container_config_directory }}/ceph.client.radosgw.keyring",
"dest": "/etc/ceph/ceph.client.radosgw.keyring",
"owner": "ceph",
- "perm": "0600",
- "optional": "True"
+ "perm": "0600"
}
]
}
diff --git a/ansible/roles/cinder/templates/cinder-backup.json.j2 b/ansible/roles/cinder/templates/cinder-backup.json.j2
index 2210fbb1c..3e6c27b6e 100644
--- a/ansible/roles/cinder/templates/cinder-backup.json.j2
+++ b/ansible/roles/cinder/templates/cinder-backup.json.j2
@@ -12,14 +12,14 @@
"dest": "/etc/ceph/ceph.client.cinder-backup.keyring",
"owner": "cinder",
"perm": "0600",
- "optional": "true"
+ "optional": {{ (not enable_ceph | bool) | string | lower }}
},
{
"source": "{{ container_config_directory }}/ceph.conf",
"dest": "/etc/ceph/ceph.conf",
"owner": "cinder",
"perm": "0600",
- "optional": "true"
+ "optional": {{ (not enable_ceph | bool) | string | lower }}
}
]
}
diff --git a/ansible/roles/cinder/templates/cinder-volume.json.j2 b/ansible/roles/cinder/templates/cinder-volume.json.j2
index 531843b37..549528410 100644
--- a/ansible/roles/cinder/templates/cinder-volume.json.j2
+++ b/ansible/roles/cinder/templates/cinder-volume.json.j2
@@ -12,14 +12,14 @@
"dest": "/etc/ceph/ceph.client.cinder.keyring",
"owner": "cinder",
"perm": "0600",
- "optional": "true"
+ "optional": {{ (not enable_ceph | bool) | string | lower }}
},
{
"source": "{{ container_config_directory }}/ceph.conf",
"dest": "/etc/ceph/ceph.conf",
"owner": "cinder",
"perm": "0600",
- "optional": "true"
+ "optional": {{ (not enable_ceph | bool) | string | lower }}
}
]
}
diff --git a/ansible/roles/common/templates/heka.json.j2 b/ansible/roles/common/templates/heka.json.j2
index 857e5185b..1087c60d0 100644
--- a/ansible/roles/common/templates/heka.json.j2
+++ b/ansible/roles/common/templates/heka.json.j2
@@ -7,7 +7,7 @@
"dest": "/etc/heka/heka-elasticsearch.toml",
"owner": "heka",
"perm": "0600",
- "optional": "True"
+ "optional": {{ (not enable_central_logging | bool) | string | lower }}
},
{
"source": "{{ container_config_directory }}/heka-global.toml",
@@ -51,7 +51,7 @@
"dest": "/etc/heka/heka-{{ swift_service }}.toml",
"owner": "heka",
"perm": "0600",
- "optional": "True"
+ "optional": {{ (not enable_swift | bool) | string | lower }}
}{% if not loop.last %},{% endif %}
{% endfor %}
diff --git a/ansible/roles/haproxy/templates/haproxy.json.j2 b/ansible/roles/haproxy/templates/haproxy.json.j2
index 9672e239b..d838dad83 100644
--- a/ansible/roles/haproxy/templates/haproxy.json.j2
+++ b/ansible/roles/haproxy/templates/haproxy.json.j2
@@ -12,7 +12,7 @@
"dest": "/etc/haproxy/haproxy.pem",
"owner": "root",
"perm": "0600",
- "optional": "true"
+ "optional": {{ (not kolla_enable_tls_external | bool) | string | lower }}
}
]
}
diff --git a/docker/base/set_configs.py b/docker/base/set_configs.py
index 83b635c30..dc0a7e4a5 100644
--- a/docker/base/set_configs.py
+++ b/docker/base/set_configs.py
@@ -58,7 +58,7 @@ def validate_source(data):
if not exists:
if data.get('optional'):
- LOG.warning("%s does not exist, but is not required", source)
+ LOG.info("%s does not exist, but is not required", source)
return False
else:
LOG.error("The source to copy does not exist: %s", source)