Select first node as bootstrap node not using name
This fixes a regression which reintroduced bug #1640449 because we hard-code the node index/name instead of sorting the map of servers Change-Id: Iaffc66a41edf176dde3b5adf603a9cff6db7aa24 Closes-Bug: #1724888
This commit is contained in:
parent
4aa6e7b419
commit
a460a093c7
|
@ -188,6 +188,14 @@ resources:
|
|||
# END workflow_tasks handling
|
||||
{% endfor %}
|
||||
|
||||
BootstrapServerId:
|
||||
type: OS::Heat::Value
|
||||
properties:
|
||||
value:
|
||||
yaql:
|
||||
expression: $.data.items().orderBy($[0]).first()[1]
|
||||
data: {get_param: [servers, {{primary_role_name}}]}
|
||||
|
||||
# Artifacts config and HostPrepConfig is done on all roles, not only
|
||||
# enabled_roles, because on upgrade we need to write the json files
|
||||
# for the operator driven upgrade scripts (the ansible steps consume them)
|
||||
|
@ -222,7 +230,7 @@ resources:
|
|||
docker_puppet_tasks: {get_param: [role_data, {{role.name}}, docker_puppet_tasks]}
|
||||
docker_startup_configs: {get_param: [role_data, {{role.name}}, docker_config]}
|
||||
kolla_config: {get_param: [role_data, {{role.name}}, kolla_config]}
|
||||
bootstrap_server_id: {get_param: [servers, {{primary_role_name}}, '0']}
|
||||
bootstrap_server_id: {get_attr: [BootstrapServerId, value]}
|
||||
puppet_step_config: {get_param: [role_data, {{role.name}}, step_config]}
|
||||
docker_config_scripts: {get_param: [role_data, {{role.name}}, docker_config_scripts]}
|
||||
tasks:
|
||||
|
@ -330,7 +338,7 @@ resources:
|
|||
step: {{step}}
|
||||
role_name: {{role.name}}
|
||||
update_identifier: {get_param: DeployIdentifier}
|
||||
bootstrap_server_id: {get_param: [servers, {{primary_role_name}}, '0']}
|
||||
bootstrap_server_id: {get_attr: [BootstrapServerId, value]}
|
||||
enable_debug: {get_param: ConfigDebug}
|
||||
docker_puppet_debug: {get_param: DockerPuppetDebug}
|
||||
docker_puppet_process_count: {get_param: DockerPuppetProcessCount}
|
||||
|
@ -374,7 +382,7 @@ outputs:
|
|||
deploy_steps_playbook:
|
||||
str_replace:
|
||||
params:
|
||||
BOOTSTRAP_SERVER_ID: {get_param: [servers, {{primary_role_name}}, '0']}
|
||||
BOOTSTRAP_SERVER_ID: {get_attr: [BootstrapServerId, value]}
|
||||
template: |
|
||||
- hosts: undercloud
|
||||
name: Gather facts undercloud
|
||||
|
|
Loading…
Reference in New Issue