aboutsummaryrefslogtreecommitdiffstats
path: root/overcloud.j2.yaml
diff options
context:
space:
mode:
authorLuca Lorenzetto <lorenzetto.luca@gmail.com>2017-03-17 09:29:41 +0100
committerSteven Hardy <shardy@redhat.com>2017-03-20 08:57:56 +0000
commitd385fc38b22b204414e04ba1962d7c6add262f1d (patch)
treeeb1a26379a1be89dcc4f3748bfe1b85db7647e1d /overcloud.j2.yaml
parent557b0214162ac60b65db93deb4af71dee14a28dd (diff)
Pick dynamically the first node for stack validation
When replacing the controller node with resource id 0, AllNodesValidation will fail because there is an hardcoded reference to resource.0. With this commit the id for validation is extracted dynamically with yaql query, picking the first available. Thanks to Steven Hardy for pointing to the right direction. Change-Id: I8f2bfacbc005d948bd31ebd51c3d3df3182d5a3c Closes-Bug: #1673439
Diffstat (limited to 'overcloud.j2.yaml')
-rw-r--r--overcloud.j2.yaml24
1 files changed, 18 insertions, 6 deletions
diff --git a/overcloud.j2.yaml b/overcloud.j2.yaml
index bbb5bae4..4fe5d712 100644
--- a/overcloud.j2.yaml
+++ b/overcloud.j2.yaml
@@ -567,12 +567,24 @@ resources:
PingTestIps:
list_join:
- ' '
- - - {get_attr: [{{primary_role_name}}, resource.0.external_ip_address]}
- - {get_attr: [{{primary_role_name}}, resource.0.internal_api_ip_address]}
- - {get_attr: [{{primary_role_name}}, resource.0.storage_ip_address]}
- - {get_attr: [{{primary_role_name}}, resource.0.storage_mgmt_ip_address]}
- - {get_attr: [{{primary_role_name}}, resource.0.tenant_ip_address]}
- - {get_attr: [{{primary_role_name}}, resource.0.management_ip_address]}
+ - - yaql:
+ expression: coalesce($.data, []).first(null)
+ data: {get_attr: [Controller, external_ip_address]}
+ - yaql:
+ expression: coalesce($.data, []).first(null)
+ data: {get_attr: [Controller, internal_api_ip_address]}
+ - yaql:
+ expression: coalesce($.data, []).first(null)
+ data: {get_attr: [Controller, storage_ip_address]}
+ - yaql:
+ expression: coalesce($.data, []).first(null)
+ data: {get_attr: [Controller, storage_mgmt_ip_address]}
+ - yaql:
+ expression: coalesce($.data, []).first(null)
+ data: {get_attr: [Controller, tenant_ip_address]}
+ - yaql:
+ expression: coalesce($.data, []).first(null)
+ data: {get_attr: [Controller, management_ip_address]}
UpdateWorkflow:
type: OS::TripleO::Tasks::UpdateWorkflow