Reviewed: https://review.opendev.org/728361 Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=7c46fd01425a40818916aeca227ec1dbfa1ec348 Submitter: Zuul Branch: master
commit 7c46fd01425a40818916aeca227ec1dbfa1ec348 Author: Zhu Sheng Li <email address hidden> Date: Fri May 15 12:44:45 2020 +0800
Add non-string value support for CephAnsibleEnvironmentVariables
CephAnsibleEnvironmentVariables data is supposed to be transformed into "KEY=VALUE" format by yaql expression.
``` ceph_ansible_environment_variables: yaql: data: {get_param: CephAnsibleEnvironmentVariables} expression: $.data.items().select($[0] + '=' + $[1]) ```
However, the expression here uses `+` to join the key($[0]) and value($[1]), which will cause syntax error when value is not string type.
For example:
If we use boolean or integer for environment values such as ``` parameter_defaults: CephAnsibleEnvironmentVariables: ANSIBLE_DEBUG: true ```
the following error will occour
``` overcloud.CephStorageServiceChain: resource_type: OS::TripleO::CephStorageServices physical_resource_id: 51fd6f95-027b-4047-9132-763e1cb8150c status: UPDATE_FAILED status_reason: | resources.CephStorageServiceChain: Error in 4 output role_data: Error in CephBase output role_data: No function "#operator_+" matches supplied arguments ```
Change-Id: I8394cec6bbaca9c89c848eaddf724c072bc36cb3 Closes-Bug: #1878720
Reviewed: https:/ /review. opendev. org/728361 /git.openstack. org/cgit/ openstack/ tripleo- heat-templates/ commit/ ?id=7c46fd01425 a40818916aeca22 7ec1dbfa1ec348
Committed: https:/
Submitter: Zuul
Branch: master
commit 7c46fd01425a408 18916aeca227ec1 dbfa1ec348
Author: Zhu Sheng Li <email address hidden>
Date: Fri May 15 12:44:45 2020 +0800
Add non-string value support for CephAnsibleEnvi ronmentVariable s
CephAnsible EnvironmentVari ables data is supposed to be transformed
into "KEY=VALUE" format by yaql expression.
``` ansible_ environment_ variables: ronmentVariable s} items() .select( $[0] + '=' + $[1])
ceph_
yaql:
data: {get_param: CephAnsibleEnvi
expression: $.data.
```
However, the expression here uses `+` to join the key($[0]) and
value($[1]), which will cause syntax error when value is not string
type.
For example:
If we use boolean or integer for environment values such as defaults: leEnvironmentVa riables:
ANSIBLE_ DEBUG: true
```
parameter_
CephAnsib
```
the following error will occour
``` CephStorageServ iceChain: type: OS::TripleO: :CephStorageSer vices resource_ id: 51fd6f95- 027b-4047- 9132-763e1cb815 0c reason: |
resources. CephStorageServ iceChain:
overcloud.
resource_
physical_
status: UPDATE_FAILED
status_
Error in 4 output role_data:
Error in CephBase output role_data:
No function "#operator_+" matches supplied arguments
```
Change-Id: I8394cec6bbaca9 c89c848eaddf724 c072bc36cb3
Closes-Bug: #1878720