Skip to content
Snippets Groups Projects
Commit f4175f04 authored by SamYaple's avatar SamYaple
Browse files

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
parent 0a1486a2
No related branches found
No related tags found
No related merge requests found
...@@ -12,28 +12,28 @@ ...@@ -12,28 +12,28 @@
"dest": "/etc/ceph/ceph.client.admin.keyring", "dest": "/etc/ceph/ceph.client.admin.keyring",
"owner": "ceph", "owner": "ceph",
"perm": "0600", "perm": "0600",
"optional": "True" "optional": true
}, },
{ {
"source": "{{ container_config_directory }}/ceph.client.mon.keyring", "source": "{{ container_config_directory }}/ceph.client.mon.keyring",
"dest": "/etc/ceph/ceph.client.mon.keyring", "dest": "/etc/ceph/ceph.client.mon.keyring",
"owner": "ceph", "owner": "ceph",
"perm": "0600", "perm": "0600",
"optional": "True" "optional": true
}, },
{ {
"source": "{{ container_config_directory }}/ceph.client.radosgw.keyring", "source": "{{ container_config_directory }}/ceph.client.radosgw.keyring",
"dest": "/etc/ceph/ceph.client.radosgw.keyring", "dest": "/etc/ceph/ceph.client.radosgw.keyring",
"owner": "ceph", "owner": "ceph",
"perm": "0600", "perm": "0600",
"optional": "True" "optional": true
}, },
{ {
"source": "{{ container_config_directory }}/ceph.monmap", "source": "{{ container_config_directory }}/ceph.monmap",
"dest": "/etc/ceph/ceph.monmap", "dest": "/etc/ceph/ceph.monmap",
"owner": "ceph", "owner": "ceph",
"perm": "0600", "perm": "0600",
"optional": "True" "optional": true
} }
] ]
} }
...@@ -11,15 +11,13 @@ ...@@ -11,15 +11,13 @@
"source": "{{ container_config_directory }}/ceph.client.admin.keyring", "source": "{{ container_config_directory }}/ceph.client.admin.keyring",
"dest": "/etc/ceph/ceph.client.admin.keyring", "dest": "/etc/ceph/ceph.client.admin.keyring",
"owner": "ceph", "owner": "ceph",
"perm": "0600", "perm": "0600"
"optional": "True"
}, },
{ {
"source": "{{ container_config_directory }}/ceph.client.radosgw.keyring", "source": "{{ container_config_directory }}/ceph.client.radosgw.keyring",
"dest": "/etc/ceph/ceph.client.radosgw.keyring", "dest": "/etc/ceph/ceph.client.radosgw.keyring",
"owner": "ceph", "owner": "ceph",
"perm": "0600", "perm": "0600"
"optional": "True"
} }
] ]
} }
...@@ -12,14 +12,14 @@ ...@@ -12,14 +12,14 @@
"dest": "/etc/ceph/ceph.client.cinder-backup.keyring", "dest": "/etc/ceph/ceph.client.cinder-backup.keyring",
"owner": "cinder", "owner": "cinder",
"perm": "0600", "perm": "0600",
"optional": "true" "optional": {{ (not enable_ceph | bool) | string | lower }}
}, },
{ {
"source": "{{ container_config_directory }}/ceph.conf", "source": "{{ container_config_directory }}/ceph.conf",
"dest": "/etc/ceph/ceph.conf", "dest": "/etc/ceph/ceph.conf",
"owner": "cinder", "owner": "cinder",
"perm": "0600", "perm": "0600",
"optional": "true" "optional": {{ (not enable_ceph | bool) | string | lower }}
} }
] ]
} }
...@@ -12,14 +12,14 @@ ...@@ -12,14 +12,14 @@
"dest": "/etc/ceph/ceph.client.cinder.keyring", "dest": "/etc/ceph/ceph.client.cinder.keyring",
"owner": "cinder", "owner": "cinder",
"perm": "0600", "perm": "0600",
"optional": "true" "optional": {{ (not enable_ceph | bool) | string | lower }}
}, },
{ {
"source": "{{ container_config_directory }}/ceph.conf", "source": "{{ container_config_directory }}/ceph.conf",
"dest": "/etc/ceph/ceph.conf", "dest": "/etc/ceph/ceph.conf",
"owner": "cinder", "owner": "cinder",
"perm": "0600", "perm": "0600",
"optional": "true" "optional": {{ (not enable_ceph | bool) | string | lower }}
} }
] ]
} }
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
"dest": "/etc/heka/heka-elasticsearch.toml", "dest": "/etc/heka/heka-elasticsearch.toml",
"owner": "heka", "owner": "heka",
"perm": "0600", "perm": "0600",
"optional": "True" "optional": {{ (not enable_central_logging | bool) | string | lower }}
}, },
{ {
"source": "{{ container_config_directory }}/heka-global.toml", "source": "{{ container_config_directory }}/heka-global.toml",
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
"dest": "/etc/heka/heka-{{ swift_service }}.toml", "dest": "/etc/heka/heka-{{ swift_service }}.toml",
"owner": "heka", "owner": "heka",
"perm": "0600", "perm": "0600",
"optional": "True" "optional": {{ (not enable_swift | bool) | string | lower }}
}{% if not loop.last %},{% endif %} }{% if not loop.last %},{% endif %}
{% endfor %} {% endfor %}
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
"dest": "/etc/haproxy/haproxy.pem", "dest": "/etc/haproxy/haproxy.pem",
"owner": "root", "owner": "root",
"perm": "0600", "perm": "0600",
"optional": "true" "optional": {{ (not kolla_enable_tls_external | bool) | string | lower }}
} }
] ]
} }
...@@ -58,7 +58,7 @@ def validate_source(data): ...@@ -58,7 +58,7 @@ def validate_source(data):
if not exists: if not exists:
if data.get('optional'): 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 return False
else: else:
LOG.error("The source to copy does not exist: %s", source) LOG.error("The source to copy does not exist: %s", source)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment