summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-12-06 11:49:36 +0000
committerGerrit Code Review <review@openstack.org>2018-12-06 11:49:36 +0000
commit2485978bee7f6432e164ba8552d622e80ce2af92 (patch)
tree4a999ecda0d88695338acaaf1572969530a347fb
parent38f7f7d9a70d2ec06d38cb98e76fbde1b11395b2 (diff)
parenta77d045663d01aaeaf1f49d2ada2a342ad6289c3 (diff)
Merge "Add SERVICE_bootstrap_node_ip values to allNodesConfig"
-rw-r--r--network/ports/net_ip_list_map.j2.yaml23
-rw-r--r--overcloud.j2.yaml12
-rw-r--r--puppet/all-nodes-config.j2.yaml4
-rw-r--r--puppet/services/database/redis-base.yaml2
-rw-r--r--releasenotes/notes/remove_bootstrap_nodeid_ip-d97ec1da4f73599c.yaml7
5 files changed, 42 insertions, 6 deletions
diff --git a/network/ports/net_ip_list_map.j2.yaml b/network/ports/net_ip_list_map.j2.yaml
index d4b1b4f..5efb129 100644
--- a/network/ports/net_ip_list_map.j2.yaml
+++ b/network/ports/net_ip_list_map.j2.yaml
@@ -164,3 +164,26 @@ outputs:
164 SERVICE_short_bootstrap_node_name: {get_param: ServiceHostnameList} 164 SERVICE_short_bootstrap_node_name: {get_param: ServiceHostnameList}
165 for_each: 165 for_each:
166 SERVICE: {get_attr: [EnabledServicesValue, value]} 166 SERVICE: {get_attr: [EnabledServicesValue, value]}
167 service_bootstrap_ips:
168 description: >
169 Map of enabled services to a list of their IP addresses
170 Used for bootstrap purposes
171 value:
172 yaql:
173 # This filters any entries where the value hasn't been substituted for
174 # a list, e.g it's still $service_network. This happens when there is
175 # no network defined for the service in the ServiceNetMap, which is OK
176 # as not all services have to be bound to a network, so we filter them
177 expression: dict($.data.map.items().where(not isString($[1])))
178 data:
179 map:
180 map_replace:
181 - map_replace:
182 - map_merge:
183 repeat:
184 template:
185 SERVICE_bootstrap_node_ip: SERVICE_network
186 for_each:
187 SERVICE: {get_attr: [EnabledServicesValue, value]}
188 - values: {get_param: ServiceNetMap}
189 - values: {get_attr: [NetIpMapValue, value]}
diff --git a/overcloud.j2.yaml b/overcloud.j2.yaml
index c02ebaf..98c1cec 100644
--- a/overcloud.j2.yaml
+++ b/overcloud.j2.yaml
@@ -513,10 +513,6 @@ resources:
513 yaql: 513 yaql:
514 expression: coalesce($.data, []).first(null) 514 expression: coalesce($.data, []).first(null)
515 data: {get_attr: [{{role.name}}, hostname]} 515 data: {get_attr: [{{role.name}}, hostname]}
516 bootstrap_nodeid_ip:
517 yaql:
518 expression: coalesce($.data, []).first(null)
519 data: {get_attr: [{{role.name}}, ip_address]}
520 516
521 {{role.name}}AllNodesValidationDeployment: 517 {{role.name}}AllNodesValidationDeployment:
522 type: OS::Heat::StructuredDeployments 518 type: OS::Heat::StructuredDeployments
@@ -736,6 +732,14 @@ resources:
736{% for role in roles %} 732{% for role in roles %}
737 - {get_attr: [{{role.name}}IpListMap, short_service_bootstrap_hostnames]} 733 - {get_attr: [{{role.name}}IpListMap, short_service_bootstrap_hostnames]}
738{% endfor %} 734{% endfor %}
735 service_bootstrap_node_ip:
736 yaql:
737 expression: dict($.data.l.where($ != null).selectMany($.items()).groupBy($[0], $[1]).select([$[0], $[1].flatten().first()]))
738 data:
739 l:
740{% for role in roles %}
741 - {get_attr: [{{role.name}}IpListMap, service_bootstrap_ips]}
742{% endfor %}
739 NetVipMap: {get_attr: [VipMap, net_ip_map]} 743 NetVipMap: {get_attr: [VipMap, net_ip_map]}
740 RedisVirtualIP: {get_attr: [RedisVirtualIP, ip_address]} 744 RedisVirtualIP: {get_attr: [RedisVirtualIP, ip_address]}
741 ServiceNetMap: {get_attr: [ServiceNetMap, service_net_map_lower]} 745 ServiceNetMap: {get_attr: [ServiceNetMap, service_net_map_lower]}
diff --git a/puppet/all-nodes-config.j2.yaml b/puppet/all-nodes-config.j2.yaml
index adb4e78..601ff1f 100644
--- a/puppet/all-nodes-config.j2.yaml
+++ b/puppet/all-nodes-config.j2.yaml
@@ -20,6 +20,8 @@ parameters:
20 type: json 20 type: json
21 short_service_bootstrap_node: 21 short_service_bootstrap_node:
22 type: json 22 type: json
23 service_bootstrap_node_ip:
24 type: json
23 controller_names: 25 controller_names:
24 type: comma_delimited_list 26 type: comma_delimited_list
25 cellv2_discovery_hosts: 27 cellv2_discovery_hosts:
@@ -131,6 +133,7 @@ resources:
131 - {get_param: service_node_names} 133 - {get_param: service_node_names}
132 - {get_param: short_service_node_names} 134 - {get_param: short_service_node_names}
133 - {get_param: short_service_bootstrap_node} 135 - {get_param: short_service_bootstrap_node}
136 - {get_param: service_bootstrap_node_ip}
134 - controller_node_ips: 137 - controller_node_ips:
135 list_join: 138 list_join:
136 - ',' 139 - ','
@@ -156,7 +159,6 @@ resources:
156 datafiles: 159 datafiles:
157 bootstrap_node: 160 bootstrap_node:
158 bootstrap_nodeid: {get_input: bootstrap_nodeid} 161 bootstrap_nodeid: {get_input: bootstrap_nodeid}
159 bootstrap_nodeid_ip: {get_input: bootstrap_nodeid_ip}
160 all_nodes: {get_attr: [allNodesConfigValue, value]} 162 all_nodes: {get_attr: [allNodesConfigValue, value]}
161 vip_data: 163 vip_data:
162 map_merge: 164 map_merge:
diff --git a/puppet/services/database/redis-base.yaml b/puppet/services/database/redis-base.yaml
index ffc1c0a..442aba4 100644
--- a/puppet/services/database/redis-base.yaml
+++ b/puppet/services/database/redis-base.yaml
@@ -81,7 +81,7 @@ outputs:
81 $NETWORK: {get_param: [ServiceNetMap, RedisNetwork]} 81 $NETWORK: {get_param: [ServiceNetMap, RedisNetwork]}
82 redis::port: 6379 82 redis::port: 6379
83 redis::sentinel::master_name: "%{hiera('redis_short_bootstrap_node_name')}" 83 redis::sentinel::master_name: "%{hiera('redis_short_bootstrap_node_name')}"
84 redis::sentinel::redis_host: "%{hiera('bootstrap_nodeid_ip')}" 84 redis::sentinel::redis_host: "%{hiera('redis_bootstrap_node_ip')}"
85 redis::sentinel::notification_script: '/usr/local/bin/redis-notifications.sh' 85 redis::sentinel::notification_script: '/usr/local/bin/redis-notifications.sh'
86 redis::sentinel::sentinel_bind: 86 redis::sentinel::sentinel_bind:
87 if: 87 if:
diff --git a/releasenotes/notes/remove_bootstrap_nodeid_ip-d97ec1da4f73599c.yaml b/releasenotes/notes/remove_bootstrap_nodeid_ip-d97ec1da4f73599c.yaml
new file mode 100644
index 0000000..fc9b22e
--- /dev/null
+++ b/releasenotes/notes/remove_bootstrap_nodeid_ip-d97ec1da4f73599c.yaml
@@ -0,0 +1,7 @@
1---
2upgrade:
3 - |
4 The hiera bootstrap_nodeid_ip key has been replaced with per-service
5 SERVICE_bootstrap_node_ip where SERVICE is the service_name from the
6 composable service templates. If any out-of-tree services use this
7 key they will need to adjust to the new interface on upgrade.