summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Hardy <shardy@redhat.com>2016-11-09 11:35:03 +0000
committerSteven Hardy <shardy@redhat.com>2016-11-10 10:28:31 +0000
commit390292e59e230d575621133cbbfef0aad4bfb9e3 (patch)
tree7511555a9ab020cc0e4caae0fb3bce36bda30ec8
parent465324cb6aa85b56b4390b01425190b23a64acf3 (diff)
Select bootstrap node by list index not name
Modify the syntax used to access the ResourceGroup attributes so we always select the first node from the group, e.g even if the node named "0" in the ResourceGroup nested stack has been removed due to the removal policy. Change-Id: I8b1c9538976a1518b220187a0034ad41a738d5a6 Closes-Bug: #1640449
-rw-r--r--overcloud.j2.yaml15
1 files changed, 13 insertions, 2 deletions
diff --git a/overcloud.j2.yaml b/overcloud.j2.yaml
index 47c73f8e..874418f2 100644
--- a/overcloud.j2.yaml
+++ b/overcloud.j2.yaml
@@ -231,8 +231,19 @@ resources:
config: {get_attr: [allNodesConfig, config_id]}
servers: {get_attr: [{{role.name}}, attributes, nova_server_resource]}
input_values:
- bootstrap_nodeid: {get_attr: [{{role.name}}, resource.0.hostname]}
- bootstrap_nodeid_ip: {get_attr: [{{role.name}}, resource.0.ip_address]}
+ # Note we have to use yaql to look up the first hostname/ip in the
+ # list because heat path based attributes operate on the attribute
+ # inside the ResourceGroup, not the exposed list ref discussion in
+ # https://bugs.launchpad.net/heat/+bug/1640488
+ # The coalesce is needed because $.data is None during heat validation
+ bootstrap_nodeid:
+ yaql:
+ expression: coalesce($.data, []).first(null)
+ data: {get_attr: [{{role.name}}, hostname]}
+ bootstrap_nodeid_ip:
+ yaql:
+ expression: coalesce($.data, []).first(null)
+ data: {get_attr: [{{role.name}}, ip_address]}
{{role.name}}AllNodesValidationDeployment:
type: OS::Heat::StructuredDeployments