From bef718ecdf5dfcd9c1757c3e1f368d44130f0046 Mon Sep 17 00:00:00 2001 From: Krisztian Lengyel Date: Tue, 14 May 2019 14:46:08 -0400 Subject: [PATCH] Use default CPU allocation for default CPU pool Change-Id: I3ca6623b6a5b549381f5f7e22d12db3202d14b4b Depends-On: I443e8df96b27d9734ae01f5638ec2360987c9803 Signed-off-by: Krisztian Lengyel --- ansible/roles/cpupooler/defaults/main.yaml | 2 +- ansible/roles/cpupooler/tasks/create_cpu_pools.yaml | 4 ++-- ansible/roles/cpupooler/templates/ncir_cpu_pooler_config.yaml.j2 | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ansible/roles/cpupooler/defaults/main.yaml b/ansible/roles/cpupooler/defaults/main.yaml index 71b9e61..c0ebce3 100644 --- a/ansible/roles/cpupooler/defaults/main.yaml +++ b/ansible/roles/cpupooler/defaults/main.yaml @@ -18,5 +18,5 @@ cpu_allocation_mapping: pool_name: exclusive_caas caas_shared: pool_name: shared_caas - platform: + caas_default: pool_name: default diff --git a/ansible/roles/cpupooler/tasks/create_cpu_pools.yaml b/ansible/roles/cpupooler/tasks/create_cpu_pools.yaml index e5af187..4744613 100644 --- a/ansible/roles/cpupooler/tasks/create_cpu_pools.yaml +++ b/ansible/roles/cpupooler/tasks/create_cpu_pools.yaml @@ -22,12 +22,12 @@ - name: make cpu pooler configs set_fact: - cpu_poolconfigs: "{{ lookup('template', 'ncir_cpu_pooler_config.yaml.j2') | from_yaml }}" + cpu_poolconfigs: "{{ lookup('template', 'cpu_pooler_config.yaml.j2') | from_yaml }}" - name: template cpu pooler fact file copy: content: "{{ cpu_poolconfigs | to_nice_json }}" - dest: "/etc/ansible/facts.d/ncir_cpu_pooler_config.fact" + dest: "/etc/ansible/facts.d/cpu_pooler_config.fact" become: true become_user: root register: cpu_pooler_template diff --git a/ansible/roles/cpupooler/templates/ncir_cpu_pooler_config.yaml.j2 b/ansible/roles/cpupooler/templates/ncir_cpu_pooler_config.yaml.j2 index b9a6025..c138125 100644 --- a/ansible/roles/cpupooler/templates/ncir_cpu_pooler_config.yaml.j2 +++ b/ansible/roles/cpupooler/templates/ncir_cpu_pooler_config.yaml.j2 @@ -19,7 +19,7 @@ limitations under the License. {% if hostname != "localhost" %} {{ hostname }}: pools: - {% set cpu_allocation = hostdata.get('ansible_local', {}).get('ncir_cpu_allocation', {}) %} + {% set cpu_allocation = hostdata.get('ansible_local', {}).get('cpu_allocation', {}) %} {% for allocation_name, allocation in cpu_allocation.iteritems() %} {% if allocation_name in cpu_allocation_mapping %} {{ cpu_allocation_mapping[allocation_name]['pool_name'] }}: -- 2.16.6