Fix malformed mistal_executor kolla config file

In the event UndercloudConfigFilePath is empty, the produced
/var/lib/kolla/config_files/mistral_executor.json file was malformed
and kolla would complain with:

+ sudo -E kolla_set_configs
INFO:__main__:Loading config file at /var/lib/kolla/config_files/config.json
INFO:__main__:Validating config file
ERROR:__main__:Unexpected error:
Traceback (most recent call last):
  File "/usr/local/bin/kolla_set_configs", line 412, in main
    config = load_config()
  File "/usr/local/bin/kolla_set_configs", line 297, in load_config
    validate_config(config)
  File "/usr/local/bin/kolla_set_configs", line 238, in validate_config
    if not set(data.keys()) >= required_keys:
AttributeError: 'unicode' object has no attribute 'keys'

Change-Id: Ibb7ed9e63404729ab8c2406d7e3c4733f465ea98
Closes-Bug: #1816441
This commit is contained in:
Martin André 2019-02-18 18:24:38 +01:00
parent e506999744
commit a08daffcc7
2 changed files with 12 additions and 12 deletions

View File

@ -6,7 +6,6 @@ resource_registry:
OS::TripleO::Services::OpenShift::Worker: ../../extraconfig/services/openshift-worker.yaml OS::TripleO::Services::OpenShift::Worker: ../../extraconfig/services/openshift-worker.yaml
OS::TripleO::Services::OpenShift::Infra: ../../extraconfig/services/openshift-infra.yaml OS::TripleO::Services::OpenShift::Infra: ../../extraconfig/services/openshift-infra.yaml
parameter_defaults: parameter_defaults:
ControllerServices: ControllerServices:
- OS::TripleO::Services::DisableUnbound - OS::TripleO::Services::DisableUnbound

View File

@ -134,17 +134,18 @@ outputs:
/var/lib/kolla/config_files/mistral_executor.json: /var/lib/kolla/config_files/mistral_executor.json:
command: /usr/bin/mistral-server --config-file=/etc/mistral/mistral.conf --log-file=/var/log/mistral/executor.log --server=executor command: /usr/bin/mistral-server --config-file=/etc/mistral/mistral.conf --log-file=/var/log/mistral/executor.log --server=executor
config_files: config_files:
- source: "/var/lib/kolla/config_files/src/*" list_concat:
dest: "/" - - source: "/var/lib/kolla/config_files/src/*"
merge: true dest: "/"
preserve_properties: true merge: true
- if: preserve_properties: true
- undercloud_config_file_path_unset - if:
- '' - undercloud_config_file_path_unset
- source: '/var/lib/undercloud.conf' - null
dest: '/var/lib/mistral/undercloud.conf' - - source: '/var/lib/undercloud.conf'
merge: true dest: '/var/lib/mistral/undercloud.conf'
preserve_properties: true merge: true
preserve_properties: true
permissions: permissions:
- path: /var/log/mistral - path: /var/log/mistral
owner: mistral:mistral owner: mistral:mistral