summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-12-22 11:58:32 +0000
committerGerrit Code Review <review@openstack.org>2016-12-22 11:58:32 +0000
commit58f3d248bab6ea0ed3433fd3aa485d8c93060f56 (patch)
tree31885a68b376bdb5064cee63254f4ec4d3a378e5
parent33bdba26d668d91f213515a91f8797b9b249d84a (diff)
parent8d796ea0e4afd69f9776d07f491b1a0d83e34128 (diff)
Merge "Add a per service bootstrap node variable"
-rw-r--r--network/ports/net_ip_list_map.yaml17
-rw-r--r--overcloud.j2.yaml8
-rw-r--r--puppet/all-nodes-config.yaml3
3 files changed, 28 insertions, 0 deletions
diff --git a/network/ports/net_ip_list_map.yaml b/network/ports/net_ip_list_map.yaml
index d7863e02..263eccd8 100644
--- a/network/ports/net_ip_list_map.yaml
+++ b/network/ports/net_ip_list_map.yaml
@@ -138,3 +138,20 @@ outputs:
SERVICE_short_node_names: {get_param: ServiceHostnameList}
for_each:
SERVICE: {get_attr: [EnabledServicesValue, value]}
+ short_service_bootstrap_hostnames:
+ description: >
+ Map of enabled services to a list of hostnames where they're running regardless of the network
+ Used for bootstrap purposes
+ value:
+ yaql:
+ # If ServiceHostnameList is empty the role is deployed with zero nodes
+ # therefore we don't want to add any *_node_names to the map
+ expression: dict($.data.map.items().where(len($[1]) > 0))
+ data:
+ map:
+ map_merge:
+ repeat:
+ template:
+ SERVICE_short_bootstrap_node_name: {get_param: ServiceHostnameList}
+ for_each:
+ SERVICE: {get_attr: [EnabledServicesValue, value]}
diff --git a/overcloud.j2.yaml b/overcloud.j2.yaml
index f7e6f37f..f53a99af 100644
--- a/overcloud.j2.yaml
+++ b/overcloud.j2.yaml
@@ -444,6 +444,14 @@ resources:
{% for role in roles %}
- {get_attr: [{{role.name}}IpListMap, short_service_hostnames]}
{% endfor %}
+ short_service_bootstrap_node:
+ yaql:
+ expression: dict($.data.l.where($ != null).selectMany($.items()).groupBy($[0], $[1], [$[0], $[1].flatten().first()]))
+ data:
+ l:
+{% for role in roles %}
+ - {get_attr: [{{role.name}}IpListMap, short_service_bootstrap_hostnames]}
+{% endfor %}
# FIXME(shardy): These require further work to move into service_ips
memcache_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, MemcachedNetwork]}]}
NetVipMap: {get_attr: [VipMap, net_ip_map]}
diff --git a/puppet/all-nodes-config.yaml b/puppet/all-nodes-config.yaml
index 0a8bec6e..5f56fe28 100644
--- a/puppet/all-nodes-config.yaml
+++ b/puppet/all-nodes-config.yaml
@@ -28,6 +28,8 @@ parameters:
type: json
short_service_node_names:
type: json
+ short_service_bootstrap_node:
+ type: json
controller_names:
type: comma_delimited_list
memcache_node_ips:
@@ -125,6 +127,7 @@ resources:
- {get_param: service_ips}
- {get_param: service_node_names}
- {get_param: short_service_node_names}
+ - {get_param: short_service_bootstrap_node}
- controller_node_ips:
list_join:
- ','