Remove references to any particular product.
Change-Id: Ic74a87d1fd29a18fe7cde61c76d61b07c8a8705f
Signed-off-by: Janne Suominen <janne.suominen@nokia.com>
# limitations under the License.
# Number of platform CPUs to allocate per service by default.
-ncir_default_platform_cpus:
+cloud_default_platform_cpus:
default:
controller:
own: 1
- caas_master
- caas_worker
-allocation_fact_file: "/etc/ansible/facts.d/ncir_cpu_allocation.fact"
+allocation_fact_file: "/etc/ansible/facts.d/cloud_cpu_allocation.fact"
cpu_set_mapping:
ovs_dpdk:
- name: Prepare.
set_fact:
- ncir_cpu_remain: []
- ncir_cpu_sets: {}
+ cloud_cpu_remain: []
+ cloud_cpu_sets: {}
- name: Get CPU topology.
get_cpu_topology:
- var: ncir_cpu_topology
+ var: cloud_cpu_topology
- debug:
- var: ncir_cpu_topology
+ var: cloud_cpu_topology
- name: Make default performance profile.
set_fact:
perf_profile: {
- platform_cpus: "{{ ncir_cpu_topology | cpu_topology_defaults(hosts[hostname]['service_profiles'], ncir_default_platform_cpus, virtual_env, hosts | length < 2) }}"
+ platform_cpus: "{{ cloud_cpu_topology | cpu_topology_defaults(hosts[hostname]['service_profiles'], cloud_default_platform_cpus, virtual_env, hosts | length < 2) }}"
}
- debug:
var: perf_profile
loop_control:
loop_var: cpu_set
with_items:
- - { 'name': 'vm', 'request': "{{ ncir_cpu_topology | get_cpu_count_by_percent(vm_share_percent) }}", 'where': 'tail' }
+ - { 'name': 'vm', 'request': "{{ cloud_cpu_topology | get_cpu_count_by_percent(vm_share_percent) }}", 'where': 'tail' }
when:
- "'compute' in hosts[hostname]['service_profiles']"
- name: Calculate CaaS CPU counts
set_fact:
- perf_profile: "{{ perf_profile | combine({ item.key: ncir_cpu_topology | get_cpu_count_by_percent(item.value) }) }}"
+ perf_profile: "{{ perf_profile | combine({ item.key: cloud_cpu_topology | get_cpu_count_by_percent(item.value) }) }}"
with_dict: "{{ perf_profile['caas_cpu_pools'] | default({}) }}"
when: hosts[hostname]['service_profiles'] | intersect(caas_service_profiles)
- name: Make set of remaining CPUs.
set_fact:
- ncir_cpu_remain: "{{ ncir_cpu_remain | union(item) }}"
- with_items: "{{ ncir_cpu_topology.values() }}"
+ cloud_cpu_remain: "{{ cloud_cpu_remain | union(item) }}"
+ with_items: "{{ cloud_cpu_topology.values() }}"
- debug:
- var: ncir_cpu_remain
+ var: cloud_cpu_remain
- name: Allocate remaining CPUs to platform.
set_fact:
- ncir_cpu_sets: "{{ ncir_cpu_sets | combine({ 'platform': ncir_cpu_sets['platform'] | default([]) | union(ncir_cpu_remain) }) }}"
- ncir_cpu_remain: []
- when: "ncir_cpu_remain | length > 0"
+ cloud_cpu_sets: "{{ cloud_cpu_sets | combine({ 'platform': cloud_cpu_sets['platform'] | default([]) | union(cloud_cpu_remain) }) }}"
+ cloud_cpu_remain: []
+ when: "cloud_cpu_remain | length > 0"
- debug:
- var: ncir_cpu_sets
+ var: cloud_cpu_sets
- name: Make sure facts directory exists.
file:
- name: Save CPU allocation.
template:
- src: ncir_cpu_allocation.fact.j2
+ src: cloud_cpu_allocation.fact.j2
dest: "{{ allocation_fact_file }}"
register: cpu_allocation
- name: Allocate CPU set.
set_fact:
- allocated_cpu_set: "{{ ncir_cpu_topology | cpu_topology_alloc(cpu_request, cpu_set.where) }}"
+ allocated_cpu_set: "{{ cloud_cpu_topology | cpu_topology_alloc(cpu_request, cpu_set.where) }}"
- name: Append allocated CPU set.
set_fact:
- combined_cpu_set: "{{ allocated_cpu_set | union(ncir_cpu_sets[cpu_set.name] | default([])) | sort }}"
+ combined_cpu_set: "{{ allocated_cpu_set | union(cloud_cpu_sets[cpu_set.name] | default([])) | sort }}"
- name: Make CPU set.
set_fact:
- ncir_cpu_sets: "{{ ncir_cpu_sets | combine({ cpu_set.name: combined_cpu_set }) }}"
- ncir_cpu_topology: "{{ ncir_cpu_topology | cpu_topology_trim(cpu_request, cpu_set.where) }}"
+ cloud_cpu_sets: "{{ cloud_cpu_sets | combine({ cpu_set.name: combined_cpu_set }) }}"
+ cloud_cpu_topology: "{{ cloud_cpu_topology | cpu_topology_trim(cpu_request, cpu_set.where) }}"
- name: Show created CPU sets.
debug:
- var: ncir_cpu_sets
+ var: cloud_cpu_sets
- name: Show CPU topology after sets creation.
debug:
- var: ncir_cpu_topology
+ var: cloud_cpu_topology
--- /dev/null
+{# Copyright (C) 2018 Nokia #}
+{
+{% for s in cloud_cpu_sets %}
+ "{{ s }}": {
+ "set" : {{ cloud_cpu_sets[s] | sort }},
+ "list": "{{ cloud_cpu_sets[s] | set_to_cpulist }}"
+ }{{ "," if not loop.last else "" }}
+{% endfor %}
+}
+++ /dev/null
-{# Copyright (C) 2018 Nokia #}
-{
-{% for s in ncir_cpu_sets %}
- "{{ s }}": {
- "set" : {{ ncir_cpu_sets[s] | sort }},
- "list": "{{ ncir_cpu_sets[s] | set_to_cpulist }}"
- }{{ "," if not loop.last else "" }}
-{% endfor %}
-}
- name: Get configuration.
set_fact:
perf_profile: "{{ performance_profiles[hosts[hostname]['performance_profiles'][0]] if 'performance_profiles' in hosts[hostname] else {} }}"
- cpu_alloc: "{{ ansible_local.ncir_cpu_allocation | default([]) }}"
+ cpu_alloc: "{{ ansible_local.cloud_cpu_allocation | default([]) }}"
- debug:
var: perf_profile
- debug:
tags:
- generate_log_forwarding_config
-- include: restart_centralized_instance.yml
- tags:
- - restart_centralized_instance
+++ /dev/null
-# Copyright 2019 Nokia
-
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-- name: Restart the centralized rsyslogd to activate updated configuration
- shell: /usr/local/bin/hascli -r -o /rsyslog-master
- ignore_errors: yes
- debug:
msg:
- - "DPDK cores {{ ansible_local.ncir_cpu_allocation['ovs_dpdk']['list'] }}"
- - "Platform cores {{ ansible_local.ncir_cpu_allocation['platform']['list'] }}"
+ - "DPDK cores {{ ansible_local.cloud_cpu_allocation['ovs_dpdk']['list'] }}"
+ - "Platform cores {{ ansible_local.cloud_cpu_allocation['platform']['list'] }}"
- "Host VPUs {{ansible_processor_vcpus}}, Processor cores {{ansible_processor_cores}}"
- "Threads per core {{ansible_processor_threads_per_core}}, Sockets {{ansible_processor_count}}"
script: >
configure_ovsdpdk.py --cores {{ansible_processor_vcpus}} --pcore {{ansible_processor_cores}}
--tcore {{ansible_processor_threads_per_core}} --sockets {{ansible_processor_count}}
- --dpdkcores {{ ansible_local.ncir_cpu_allocation['ovs_dpdk']['list'] }}
+ --dpdkcores {{ ansible_local.cloud_cpu_allocation['ovs_dpdk']['list'] }}
register: result
changed_when: result.rc == 0
failed_when: result.rc == 2
# limitations under the License.
- name: Set vcpu_pin_set
- ini_file: dest=/etc/nova/nova.conf section=DEFAULT option=vcpu_pin_set value={{ ansible_local.ncir_cpu_allocation['vm']['list'] }} backup=no
+ ini_file: dest=/etc/nova/nova.conf section=DEFAULT option=vcpu_pin_set value={{ ansible_local.cloud_cpu_allocation['vm']['list'] }} backup=no
register: nova1_result
- name: Get performance profile configuration