Merge "'tripleo_ovs_dpdk_lcore_list' should be optional"
This commit is contained in:
commit
4f100a7a9f
|
@ -22,14 +22,18 @@ Role Defaults
|
|||
- ``tripleo_ovs_dpdk_pmd_core_list``
|
||||
|
||||
- **Description**: (*Mandatory*) List of PMD Cores for DPDK. Its a
|
||||
comma-separated string of logical cores.
|
||||
comma-separated string of logical cores. These core should be part
|
||||
of ``isolcpus`` kernel parameter and be excluded from ``NovaComputeCpuDedicatedSet``
|
||||
and from ``NovaComputeCpuSharedSet``
|
||||
- **Default**: ``''``
|
||||
- **Examples**: ``'1,13'``
|
||||
|
||||
- ``tripleo_ovs_dpdk_lcore_list``
|
||||
|
||||
- **Description**: (*Mandatory*) List of lcores for DPDK. Its a
|
||||
- **Description**: (*Optional*) List of lcores for DPDK. Its a
|
||||
comma-separated string of logical cores.
|
||||
All ovs-vswitchd threads will be pinned to the first core declared
|
||||
in the mask.
|
||||
- **Default**: ``''``
|
||||
- **Examples**: ``'0,12'``
|
||||
|
||||
|
|
|
@ -27,8 +27,9 @@
|
|||
tripleo_ovs_dpdk_socket_memory: "1024,1024"
|
||||
tripleo_ovs_dpdk_emc_insertion_probablity: 10
|
||||
|
||||
# By removing tripleo_ovs_dpdk_emc_insertion_probablity from the vars,
|
||||
# which was set by earlier play, should remove this key from the ovs db.
|
||||
# By removing tripleo_ovs_dpdk_emc_insertion_probablity and
|
||||
# tripleo_ovs_dpdk_lcore_list from the vars, which were set by earlier play,
|
||||
# should remove these keys from the ovs db.
|
||||
- name: Converge
|
||||
hosts: all
|
||||
tasks:
|
||||
|
@ -37,5 +38,4 @@
|
|||
tasks_from: "config.yml"
|
||||
vars:
|
||||
tripleo_ovs_dpdk_pmd_core_list: "1,13-15"
|
||||
tripleo_ovs_dpdk_lcore_list: "0,12"
|
||||
tripleo_ovs_dpdk_socket_memory: "1024,1024"
|
||||
|
|
|
@ -46,18 +46,17 @@ def test_positive_pmd(host):
|
|||
assert val == "e002"
|
||||
|
||||
|
||||
def test_positive_lcore(host):
|
||||
other_config = get_config(host)
|
||||
val = other_config['dpdk-lcore-mask'].replace('"', '')
|
||||
assert val == "1001"
|
||||
|
||||
|
||||
def test_positive_socket_mem(host):
|
||||
other_config = get_config(host)
|
||||
val = other_config['dpdk-socket-mem'].replace('"', '')
|
||||
assert val == "1024,1024"
|
||||
|
||||
|
||||
def test_positive_lcore(host):
|
||||
other_config = get_config(host)
|
||||
assert 'dpdk-lcore-mask' not in other_config
|
||||
|
||||
|
||||
def test_positive_validator_threads(host):
|
||||
other_config = get_config(host)
|
||||
assert 'n-revalidator-threads' not in other_config
|
||||
|
|
|
@ -19,11 +19,6 @@
|
|||
msg: "List of PMD cores cannot be empty - tripleo_ovs_dpdk_pmd_core_list"
|
||||
when: not tripleo_ovs_dpdk_pmd_core_list|string or tripleo_ovs_dpdk_pmd_core_list == 'null'
|
||||
|
||||
- name: Check valid input for tripleo_ovs_dpdk_lcore_list
|
||||
fail:
|
||||
msg: "List of DPDK lcores cannot be empty - tripleo_ovs_dpdk_lcore_list"
|
||||
when: not tripleo_ovs_dpdk_lcore_list|string or tripleo_ovs_dpdk_lcore_list == 'null'
|
||||
|
||||
- name: Check valid input for tripleo_ovs_dpdk_socket_memory
|
||||
fail:
|
||||
msg: "Socket Memory cannot be empty - tripleo_ovs_dpdk_socket_memory"
|
||||
|
@ -38,7 +33,7 @@
|
|||
value: "{{ tripleo_ovs_dpdk_pmd_core_list | cpu_mask }}"
|
||||
when: tripleo_ovs_dpdk_pmd_core_list|string
|
||||
|
||||
- name: Apply DPDK lcores config
|
||||
- name: Set DPDK lcores config
|
||||
openvswitch_db:
|
||||
table: open_vswitch
|
||||
record: .
|
||||
|
@ -47,6 +42,15 @@
|
|||
value: "{{ tripleo_ovs_dpdk_lcore_list | cpu_mask }}"
|
||||
when: tripleo_ovs_dpdk_lcore_list|string
|
||||
|
||||
- name: Remove DPDK lcores config
|
||||
openvswitch_db:
|
||||
state: absent
|
||||
table: open_vswitch
|
||||
record: .
|
||||
col: other_config
|
||||
key: dpdk-lcore-mask
|
||||
when: not tripleo_ovs_dpdk_lcore_list|string or tripleo_ovs_dpdk_lcore_list == 'null'
|
||||
|
||||
- name: Add memory channels to dpdk extra
|
||||
set_fact:
|
||||
tripleo_ovs_dpdk_extra_internal: "{{ tripleo_ovs_dpdk_extra }} -n {{ tripleo_ovs_dpdk_memory_channels }}"
|
||||
|
|
Loading…
Reference in New Issue