Enable KSM support for Nova
Change-Id: I6515354a3ceb7f08a647a3e0b93ab06ad24e209c
This commit is contained in:
parent
8500291e2a
commit
e2e79c8157
@ -176,6 +176,9 @@ nova_virt_types:
|
|||||||
# If this is not set, then the playbook will try to guess it.
|
# If this is not set, then the playbook will try to guess it.
|
||||||
#nova_virt_type: kvm
|
#nova_virt_type: kvm
|
||||||
|
|
||||||
|
# Enable Kernel Shared Memory (KSM)
|
||||||
|
nova_compute_ksm_enabled: False
|
||||||
|
|
||||||
#if set, nova_virt_type must be one of these:
|
#if set, nova_virt_type must be one of these:
|
||||||
nova_supported_virt_types:
|
nova_supported_virt_types:
|
||||||
- qemu
|
- qemu
|
||||||
|
5
releasenotes/notes/support-ksm-fe6993158768a14e.yaml
Normal file
5
releasenotes/notes/support-ksm-fe6993158768a14e.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Enable Kernel Shared Memory support by setting
|
||||||
|
``nova_compute_ksm_enabled`` to ``True``.
|
@ -119,6 +119,12 @@
|
|||||||
tags:
|
tags:
|
||||||
- nova-config
|
- nova-config
|
||||||
|
|
||||||
|
- include: nova_enable_ksm.yml
|
||||||
|
when:
|
||||||
|
- nova_compute_ksm_enabled | bool
|
||||||
|
tags:
|
||||||
|
- nova-config
|
||||||
|
|
||||||
- include: nova_compute_kvm_virsh_net_remove.yml
|
- include: nova_compute_kvm_virsh_net_remove.yml
|
||||||
tags:
|
tags:
|
||||||
- nova-config
|
- nova-config
|
||||||
|
14
tasks/drivers/kvm/nova_enable_ksm.yml
Normal file
14
tasks/drivers/kvm/nova_enable_ksm.yml
Normal 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']
|
@ -31,6 +31,9 @@ nova_package_list: |-
|
|||||||
{% if 'nova_compute' in group_names %}
|
{% if 'nova_compute' in group_names %}
|
||||||
{% if nova_virt_type in ['kvm', 'qemu'] %}
|
{% if nova_virt_type in ['kvm', 'qemu'] %}
|
||||||
{% set _ = packages.extend(nova_compute_kvm_distro_packages) %}
|
{% 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' %}
|
{% elif nova_virt_type == 'lxd' %}
|
||||||
{% set _ = packages.extend(nova_compute_lxd_distro_packages) %}
|
{% set _ = packages.extend(nova_compute_lxd_distro_packages) %}
|
||||||
{% elif nova_virt_type == 'powervm' %}
|
{% elif nova_virt_type == 'powervm' %}
|
||||||
|
@ -60,6 +60,9 @@ nova_compute_kvm_distro_packages:
|
|||||||
- qemu-img-ev
|
- qemu-img-ev
|
||||||
- sysfsutils
|
- sysfsutils
|
||||||
|
|
||||||
|
nova_compute_ksm_packages:
|
||||||
|
- ksmtuned
|
||||||
|
|
||||||
# TODO: add support for LXD on CentOS at some point.
|
# TODO: add support for LXD on CentOS at some point.
|
||||||
nova_compute_lxd_distro_packages: []
|
nova_compute_lxd_distro_packages: []
|
||||||
|
|
||||||
|
@ -53,6 +53,9 @@ nova_compute_kvm_distro_packages:
|
|||||||
- qemu-tools
|
- qemu-tools
|
||||||
- sysfsutils
|
- sysfsutils
|
||||||
|
|
||||||
|
nova_compute_ksm_packages:
|
||||||
|
- qemu-ksm
|
||||||
|
|
||||||
# TODO: add support for LXD on openSUSE at some point.
|
# TODO: add support for LXD on openSUSE at some point.
|
||||||
nova_compute_lxd_distro_packages: []
|
nova_compute_lxd_distro_packages: []
|
||||||
|
|
||||||
|
@ -101,6 +101,9 @@ nova_compute_powervm_distro_packages:
|
|||||||
- multipath-tools
|
- multipath-tools
|
||||||
- pvm-novalink
|
- pvm-novalink
|
||||||
|
|
||||||
|
nova_compute_ksm_packages:
|
||||||
|
- ksmtuned
|
||||||
|
|
||||||
novalink_repo:
|
novalink_repo:
|
||||||
repo: "deb [arch=ppc64el] http://public.dhe.ibm.com/systems/virtualization/Novalink/debian/ novalink_1.0.0 non-free"
|
repo: "deb [arch=ppc64el] http://public.dhe.ibm.com/systems/virtualization/Novalink/debian/ novalink_1.0.0 non-free"
|
||||||
state: "present"
|
state: "present"
|
||||||
|
Loading…
Reference in New Issue
Block a user