Use default CPU allocation for default CPU pool 02/702/1
authorKrisztian Lengyel <krisztian.lengyel@nokia.com>
Tue, 14 May 2019 18:46:08 +0000 (14:46 -0400)
committerKrisztian Lengyel <krisztian.lengyel@nokia.com>
Tue, 14 May 2019 19:28:13 +0000 (15:28 -0400)
Change-Id: I3ca6623b6a5b549381f5f7e22d12db3202d14b4b
Depends-On:  I443e8df96b27d9734ae01f5638ec2360987c9803
Signed-off-by: Krisztian Lengyel <krisztian.lengyel@nokia.com>
ansible/roles/cpupooler/defaults/main.yaml
ansible/roles/cpupooler/tasks/create_cpu_pools.yaml
ansible/roles/cpupooler/templates/ncir_cpu_pooler_config.yaml.j2

index 71b9e61..c0ebce3 100644 (file)
@@ -18,5 +18,5 @@ cpu_allocation_mapping:
     pool_name: exclusive_caas
   caas_shared:
     pool_name: shared_caas
     pool_name: exclusive_caas
   caas_shared:
     pool_name: shared_caas
-  platform:
+  caas_default:
     pool_name: default
     pool_name: default
index e5af187..4744613 100644 (file)
 
   - name: make cpu pooler configs
     set_fact:
 
   - 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 }}"
 
   - 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
     become: true
     become_user: root
     register: cpu_pooler_template
index b9a6025..c138125 100644 (file)
@@ -19,7 +19,7 @@ limitations under the License.
   {% if hostname != "localhost" %}
 {{ hostname }}:
   pools:
   {% 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'] }}:
     {% for allocation_name, allocation in cpu_allocation.iteritems() %}
       {% if allocation_name in cpu_allocation_mapping %}
     {{ cpu_allocation_mapping[allocation_name]['pool_name'] }}: