get_param calls with multiple arguments need brackets around them

This issue was spotted during major upgrade where we had calls like
this:

   servers: {get_param: servers, Controller}

These get_param calls are hanging indefinitely and make the whole
upgrade end in a timeout. We need to put brackets around the get_param
function when there are multiple arguments:
http://docs.openstack.org/developer/heat/template_guide/hot_spec.html#get-param

This is already done in most of the tree, and the few places where this
was not happening were parts not under CI. After this change the
following grep returns only one false positive:

   grep -ir get_param: |grep -v -- '\[' |grep ','

Change-Id: I65b23bb44f37b93e017dd15a5212939ffac76614
Closes-Bug: #1626628
This commit is contained in:
Michele Baldessari 2016-09-23 17:31:19 +02:00
parent 5d49b75b6e
commit 9393a3e2a5
8 changed files with 19 additions and 19 deletions

View File

@ -34,7 +34,7 @@ resources:
type: OS::Heat::SoftwareDeployments type: OS::Heat::SoftwareDeployments
properties: properties:
name: CollectMacDeploymentsController name: CollectMacDeploymentsController
servers: {get_param: servers, {{role.name}}} servers: {get_param: [servers, {{role.name}}]}
config: {get_resource: CollectMacConfig} config: {get_resource: CollectMacConfig}
actions: ['CREATE'] # Only do this on CREATE actions: ['CREATE'] # Only do this on CREATE
{% endfor %} {% endfor %}
@ -63,7 +63,7 @@ resources:
type: OS::Heat::SoftwareDeployments type: OS::Heat::SoftwareDeployments
properties: properties:
name: DistributeMacDeploymentsController name: DistributeMacDeploymentsController
servers: {get_param: servers, Controller} servers: {get_param: [servers, Controller]}
config: {get_resource: DistributeMacConfig} config: {get_resource: DistributeMacConfig}
input_values: input_values:
# FIXME(shardy): It'd be more convenient if we could join these # FIXME(shardy): It'd be more convenient if we could join these

View File

@ -34,7 +34,7 @@ resources:
type: OS::Heat::SoftwareDeployments type: OS::Heat::SoftwareDeployments
properties: properties:
name: RandomDeploymentsController name: RandomDeploymentsController
servers: {get_param: servers, Controller} servers: {get_param: [servers, Controller]}
config: {get_resource: RandomConfig} config: {get_resource: RandomConfig}
actions: ['CREATE'] # Only do this on CREATE actions: ['CREATE'] # Only do this on CREATE
input_values: input_values:
@ -44,7 +44,7 @@ resources:
type: OS::Heat::SoftwareDeployments type: OS::Heat::SoftwareDeployments
properties: properties:
name: RandomDeploymentsCompute name: RandomDeploymentsCompute
servers: {get_param: servers, Compute} servers: {get_param: [servers, Compute]}
config: {get_resource: RandomConfig} config: {get_resource: RandomConfig}
actions: ['CREATE'] # Only do this on CREATE actions: ['CREATE'] # Only do this on CREATE
input_values: input_values:

View File

@ -37,7 +37,7 @@ resources:
type: OS::Heat::SoftwareDeploymentGroup type: OS::Heat::SoftwareDeploymentGroup
properties: properties:
config: {get_resource: SwapConfig} config: {get_resource: SwapConfig}
servers: {get_param: servers, {{role.name}}} servers: {get_param: [servers, {{role.name}}]}
input_values: input_values:
swap_partition_label: {get_param: swap_partition_label} swap_partition_label: {get_param: swap_partition_label}
actions: ["CREATE"] actions: ["CREATE"]

View File

@ -50,7 +50,7 @@ resources:
type: OS::Heat::SoftwareDeploymentGroup type: OS::Heat::SoftwareDeploymentGroup
properties: properties:
config: {get_resource: SwapConfig} config: {get_resource: SwapConfig}
servers: {get_param: servers, {{role.name}}} servers: {get_param: [servers, {{role.name}}]}
input_values: input_values:
swap_size_megabytes: {get_param: swap_size_megabytes} swap_size_megabytes: {get_param: swap_size_megabytes}
swap_path: {get_param: swap_path} swap_path: {get_param: swap_path}

View File

@ -46,7 +46,7 @@ resources:
CephMonUpgradeDeployment: CephMonUpgradeDeployment:
type: OS::Heat::SoftwareDeploymentGroup type: OS::Heat::SoftwareDeploymentGroup
properties: properties:
servers: {get_param: servers, Controller} servers: {get_param: [servers, Controller]}
config: {get_resource: CephMonUpgradeConfig} config: {get_resource: CephMonUpgradeConfig}
input_values: {get_param: input_values} input_values: {get_param: input_values}
update_policy: update_policy:
@ -83,7 +83,7 @@ resources:
type: OS::Heat::SoftwareDeploymentGroup type: OS::Heat::SoftwareDeploymentGroup
depends_on: CephMonUpgradeDeployment depends_on: CephMonUpgradeDeployment
properties: properties:
servers: {get_param: servers, Controller} servers: {get_param: [servers, Controller]}
config: {get_resource: ControllerPacemakerUpgradeConfig_Step1} config: {get_resource: ControllerPacemakerUpgradeConfig_Step1}
input_values: {get_param: input_values} input_values: {get_param: input_values}
@ -97,7 +97,7 @@ resources:
BlockStorageUpgradeDeployment: BlockStorageUpgradeDeployment:
type: OS::Heat::SoftwareDeploymentGroup type: OS::Heat::SoftwareDeploymentGroup
properties: properties:
servers: {get_param: servers, BlockStorage} servers: {get_param: [servers, BlockStorage]}
config: {get_resource: BlockStorageUpgradeConfig} config: {get_resource: BlockStorageUpgradeConfig}
input_values: {get_param: input_values} input_values: {get_param: input_values}
@ -116,7 +116,7 @@ resources:
type: OS::Heat::SoftwareDeploymentGroup type: OS::Heat::SoftwareDeploymentGroup
depends_on: BlockStorageUpgradeDeployment depends_on: BlockStorageUpgradeDeployment
properties: properties:
servers: {get_param: servers, Controller} servers: {get_param: [servers, Controller]}
config: {get_resource: ControllerPacemakerUpgradeConfig_Step2} config: {get_resource: ControllerPacemakerUpgradeConfig_Step2}
input_values: {get_param: input_values} input_values: {get_param: input_values}

View File

@ -20,6 +20,6 @@ resources:
AodhMysqlMigrationScriptDeployment: AodhMysqlMigrationScriptDeployment:
type: OS::Heat::SoftwareDeploymentGroup type: OS::Heat::SoftwareDeploymentGroup
properties: properties:
servers: {get_param: servers, Controller} servers: {get_param: [servers, Controller]}
config: {get_resource: AodhMysqlMigrationScriptConfig} config: {get_resource: AodhMysqlMigrationScriptConfig}
input_values: {get_param: input_values} input_values: {get_param: input_values}

View File

@ -94,10 +94,10 @@ resources:
type: OS::Heat::StructuredDeploymentGroup type: OS::Heat::StructuredDeploymentGroup
properties: properties:
config: {get_resource: NetworkMidoNetConfig} config: {get_resource: NetworkMidoNetConfig}
servers: {get_param: servers, Controller} servers: {get_param: [servers, Controller]}
NetworkMidonetDeploymentComputes: NetworkMidonetDeploymentComputes:
type: OS::Heat::StructuredDeploymentGroup type: OS::Heat::StructuredDeploymentGroup
properties: properties:
config: {get_resource: NetworkMidoNetConfig} config: {get_resource: NetworkMidoNetConfig}
servers: {get_param: servers, Compute} servers: {get_param: [servers, Compute]}

View File

@ -132,7 +132,7 @@ resources:
properties: properties:
name: NetworkCiscoDeployment name: NetworkCiscoDeployment
config: {get_resource: NetworkCiscoConfig} config: {get_resource: NetworkCiscoConfig}
servers: {get_param: servers, Controller} servers: {get_param: [servers, Controller]}
input_values: input_values:
UCSM_ip: {get_param: NetworkUCSMIp} UCSM_ip: {get_param: NetworkUCSMIp}
UCSM_username: {get_param: NetworkUCSMUsername} UCSM_username: {get_param: NetworkUCSMUsername}
@ -179,7 +179,7 @@ resources:
type: OS::Heat::SoftwareDeployments type: OS::Heat::SoftwareDeployments
properties: properties:
name: CollectMacDeploymentsController name: CollectMacDeploymentsController
servers: {get_param: servers, Controller} servers: {get_param: [servers, Controller]}
config: {get_resource: CollectMacConfig} config: {get_resource: CollectMacConfig}
actions: ['CREATE'] # Only do this on CREATE actions: ['CREATE'] # Only do this on CREATE
@ -187,7 +187,7 @@ resources:
type: OS::Heat::SoftwareDeployments type: OS::Heat::SoftwareDeployments
properties: properties:
name: CollectMacDeploymentsCompute name: CollectMacDeploymentsCompute
servers: {get_param: servers, Compute} servers: {get_param: [servers, Compute]}
config: {get_resource: CollectMacConfig} config: {get_resource: CollectMacConfig}
actions: ['CREATE'] # Only do this on CREATE actions: ['CREATE'] # Only do this on CREATE
@ -195,7 +195,7 @@ resources:
type: OS::Heat::SoftwareDeployments type: OS::Heat::SoftwareDeployments
properties: properties:
name: CollectMacDeploymentsBlockStorage name: CollectMacDeploymentsBlockStorage
servers: {get_param: servers, BlockStorage} servers: {get_param: [servers, BlockStorage]}
config: {get_resource: CollectMacConfig} config: {get_resource: CollectMacConfig}
actions: ['CREATE'] # Only do this on CREATE actions: ['CREATE'] # Only do this on CREATE
@ -203,7 +203,7 @@ resources:
type: OS::Heat::SoftwareDeployments type: OS::Heat::SoftwareDeployments
properties: properties:
name: CollectMacDeploymentsObjectStorage name: CollectMacDeploymentsObjectStorage
servers: {get_param: servers, ObjectStorage} servers: {get_param: [servers, ObjectStorage]}
config: {get_resource: CollectMacConfig} config: {get_resource: CollectMacConfig}
actions: ['CREATE'] # Only do this on CREATE actions: ['CREATE'] # Only do this on CREATE
@ -211,7 +211,7 @@ resources:
type: OS::Heat::SoftwareDeployments type: OS::Heat::SoftwareDeployments
properties: properties:
name: CollectMacDeploymentsCephStorage name: CollectMacDeploymentsCephStorage
servers: {get_param: servers, CephStorage} servers: {get_param: [servers, CephStorage]}
config: {get_resource: CollectMacConfig} config: {get_resource: CollectMacConfig}
actions: ['CREATE'] # Only do this on CREATE actions: ['CREATE'] # Only do this on CREATE