Ensure CPU tuning is only applied on Debian 11+

This commit is contained in:
Joshua Boniface 2023-09-01 15:42:29 -04:00
parent 6bf827ca13
commit 5a48ec4d79
4 changed files with 7 additions and 2 deletions

View File

@ -153,6 +153,7 @@ pvc_sriov_enable: False
# > ADVANCED TUNING: These options are strongly recommended due to the performance gains possible, but
# most users would be able to use the default without too much issue. Read the following notes
# carefully to determine if this setting should be enabled in your cluster.
# > NOTE: CPU tuning is only supported on Debian Bullseye (11) or newer
# > Defines CPU tuning/affinity options for various subsystems within PVC. This is useful to
# help limit the impact that noisy elements may have on other elements, e.g. busy VMs on
# OSDs, or system processes on latency-sensitive VMs.

View File

@ -12,7 +12,7 @@ recursive_dns_servers:
recursive_dns_search_domains:
- "{{ local_domain }}"
grub_cmdline: "systemd.unified_cgroup_hierarchy=1 console=tty0 console=ttyS{{ grub.serial_console[cluster_hardware].console }},115200 plymouth.ignore-serial-consoles splash"
grub_cmdline: "console=tty0 console=ttyS{{ grub.serial_console[cluster_hardware].console }},115200 plymouth.ignore-serial-consoles splash"
grub_serial: "serial --unit={{ grub.serial_console[cluster_hardware].console }} --speed=115200"
deploy_username: "deploy"

View File

@ -3,7 +3,11 @@
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="PVC Parallel Virtual Cluster - Debian"
{% if ansible_distribution_major_version|int >= 11 %}
GRUB_CMDLINE_LINUX="systemd.unified_cgroup_hierarchy=1 {{ grub_cmdline }}"
{% else %}
GRUB_CMDLINE_LINUX="{{ grub_cmdline }}"
{% endif %}
GRUB_TERMINAL_INPUT="console serial"
GRUB_TERMINAL_OUTPUT="gfxterm serial"
GRUB_SERIAL_COMMAND="{{ grub_serial }}"

View File

@ -59,7 +59,7 @@
# Install CPU tuning
- include: cputuning/main.yml
tags: pvc-cputuning
when: cpu_tuning is defined
when: ansible_distribution_major_version|int >= 11 and cpu_tuning is defined
- name: restart server on first install
shell: 'sleep 3 && shutdown -r now "Ansible updates triggered"'