diff options
author | Ben Nemec <bnemec@redhat.com> | 2016-09-26 16:40:20 -0500 |
---|---|---|
committer | Ben Nemec <bnemec@redhat.com> | 2016-09-26 16:40:20 -0500 |
commit | 3d05733dd3db118a328a5fcb5199cdd0f1027ea4 (patch) | |
tree | 3cceb250a1f8ff3548f2294de172631629035812 | |
parent | 546683fdc91c5f3269d69b781cd667a4ed21a163 (diff) |
Fix predictable placement indexing
As noted in the bug, predictable placement is broken right now
because the %index% in the scheduler hint isn't being interpolated.
This is because the parameter was moved from overcloud.yaml to the
service-specific files, which doesn't provide the index value.
Because the Compute role's parameter is named NovaCompute... we also
have to include some backwards compatibility logic to handle the
mismatch.
Change-Id: Ibee2949fe4c6c707203d7250e2ce169c769b1dcd
Closes-Bug: 1627858
-rw-r--r-- | overcloud.j2.yaml | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/overcloud.j2.yaml b/overcloud.j2.yaml index e2ff4c14..bd699f50 100644 --- a/overcloud.j2.yaml +++ b/overcloud.j2.yaml @@ -147,6 +147,15 @@ parameters: List of resources to be removed from {{role.name}} ResourceGroup when doing an update which requires removal of specific resources. Example format ComputeRemovalPolicies: [{'resource_list': ['0']}] + +{% if role.name != 'Compute' %} + {{role.name}}SchedulerHints: +{% else %} + NovaComputeSchedulerHints: +{% endif %} + type: json + description: Optional scheduler hints to pass to nova + default: {} {% endfor %} # Identifiers to trigger tasks on nodes @@ -255,6 +264,11 @@ resources: params: '%stackname%': {get_param: 'OS::stack_name'} NodeIndex: '%index%' + {% if role.name != 'Compute' %} + {{role.name}}SchedulerHints: {get_param: {{role.name}}SchedulerHints} + {% else %} + NovaComputeSchedulerHints: {get_param: NovaComputeSchedulerHints} + {% endif %} ServiceConfigSettings: map_merge: - get_attr: [{{role.name}}ServiceChain, role_data, config_settings] |