Enable KSM support for Nova

Change-Id: I6515354a3ceb7f08a647a3e0b93ab06ad24e209c
This commit is contained in:
ArchiFleKs 2017-09-27 15:59:21 +02:00 committed by Major Hayden
parent 8500291e2a
commit e2e79c8157
8 changed files with 40 additions and 0 deletions

View File

@ -176,6 +176,9 @@ nova_virt_types:
# If this is not set, then the playbook will try to guess it.
#nova_virt_type: kvm
# Enable Kernel Shared Memory (KSM)
nova_compute_ksm_enabled: False
#if set, nova_virt_type must be one of these:
nova_supported_virt_types:
- qemu

View File

@ -0,0 +1,5 @@
---
features:
- |
Enable Kernel Shared Memory support by setting
``nova_compute_ksm_enabled`` to ``True``.

View File

@ -119,6 +119,12 @@
tags:
- nova-config
- include: nova_enable_ksm.yml
when:
- nova_compute_ksm_enabled | bool
tags:
- nova-config
- include: nova_compute_kvm_virsh_net_remove.yml
tags:
- nova-config

View File

@ -0,0 +1,14 @@
---
- name: Enable ksm systemd service
service:
name: ksm
enabled: yes
state: started
- name: Enable ksmtuned systemd service
service:
name: ksmtuned
enabled: yes
state: started
when:
- ansible_pkg_mgr in ['yum', 'dnf', 'apt']

View File

@ -31,6 +31,9 @@ nova_package_list: |-
{% if 'nova_compute' in group_names %}
{% if nova_virt_type in ['kvm', 'qemu'] %}
{% set _ = packages.extend(nova_compute_kvm_distro_packages) %}
{% if nova_compute_ksm_enabled %}
{% set _ = packages.extend(nova_compute_ksm_packages) %}
{% endif %}
{% elif nova_virt_type == 'lxd' %}
{% set _ = packages.extend(nova_compute_lxd_distro_packages) %}
{% elif nova_virt_type == 'powervm' %}

View File

@ -60,6 +60,9 @@ nova_compute_kvm_distro_packages:
- qemu-img-ev
- sysfsutils
nova_compute_ksm_packages:
- ksmtuned
# TODO: add support for LXD on CentOS at some point.
nova_compute_lxd_distro_packages: []

View File

@ -53,6 +53,9 @@ nova_compute_kvm_distro_packages:
- qemu-tools
- sysfsutils
nova_compute_ksm_packages:
- qemu-ksm
# TODO: add support for LXD on openSUSE at some point.
nova_compute_lxd_distro_packages: []

View File

@ -101,6 +101,9 @@ nova_compute_powervm_distro_packages:
- multipath-tools
- pvm-novalink
nova_compute_ksm_packages:
- ksmtuned
novalink_repo:
repo: "deb [arch=ppc64el] http://public.dhe.ibm.com/systems/virtualization/Novalink/debian/ novalink_1.0.0 non-free"
state: "present"