Adjust documentation and behaviour of cpuset
1. Detail the caveats and specific situations and ref the documentation which will provide more details. 2. Always install the configs, but use /etc/default/ceph-osd-cpuset to control if the script does anything or not (so, the "osd" cset set is always active just not set in a special way.
This commit is contained in:
@ -117,14 +117,6 @@
|
||||
- ceph-mon@{{ ansible_hostname }}
|
||||
- ceph-mgr@{{ ansible_hostname }}
|
||||
|
||||
# This is separate from the block to allow *disabling* of the config without removing it
|
||||
- name: install ceph-osd-cpuset controller config
|
||||
template:
|
||||
src: ceph/ceph-osd-cpuset-enable.j2
|
||||
dest: /etc/default/ceph-osd-cpuset
|
||||
when:
|
||||
- pvc_shield_osds_enable is defined
|
||||
|
||||
# System OSD CPU shielding activation
|
||||
- block:
|
||||
- name: install packages
|
||||
@ -134,6 +126,11 @@
|
||||
- numactl
|
||||
state: latest
|
||||
|
||||
- name: install ceph-osd-cpuset controller config
|
||||
template:
|
||||
src: ceph/ceph-osd-cpuset-enable.j2
|
||||
dest: /etc/default/ceph-osd-cpuset
|
||||
|
||||
- name: install ceph-osd-cpuset script
|
||||
template:
|
||||
src: ceph/ceph-osd-cpuset.j2
|
||||
@ -167,12 +164,9 @@
|
||||
enabled: yes
|
||||
|
||||
- debug:
|
||||
msg: "NOTICE: cpuset configs have NOT been applied to the running system. This node must be rebooted to apply these changes."
|
||||
when: systemd_file_cpuset.changed or systemd_file_osd.changed
|
||||
msg: "NOTICE: Any cpuset configs have NOT been applied to the running system. This node must be rebooted to apply these changes."
|
||||
tags: pvc-ceph-cpuset
|
||||
when:
|
||||
- pvc_shield_osds_enable is defined
|
||||
- pvc_shield_osds_cset is defined
|
||||
- pvc_shield_osds_cset | selectattr('hostname', 'equalto', inventory_hostname) | list | count > 0
|
||||
|
||||
- meta: flush_handlers
|
||||
|
@ -4,10 +4,16 @@
|
||||
|
||||
# This script is designed to prepare the cpusets for use by Ceph OSDs, VMs, and other system resources.
|
||||
# Libvirt does not make this easy with any way to globally set its CPUs, so we must do this trickery.
|
||||
{% if pvc_shield_osds_cset is defined %}
|
||||
{% set cset_host = pvc_shield_osds_cset | selectattr('hostname', 'equalto', inventory_hostname) %}
|
||||
|
||||
A_OSD_CPUS=( {{ cset_host[0]['osd_cset'] | join(' ') }} )
|
||||
A_SYS_CPUS=()
|
||||
{% else %}
|
||||
|
||||
A_OSD_CPUS=()
|
||||
A_SYS_CPUS=()
|
||||
{% endif %}
|
||||
|
||||
CPU_INFO="$( lscpu )"
|
||||
|
||||
@ -41,7 +47,9 @@ for i in $( seq 0 $(( ${CPU_COUNT} - 1 )) ); do
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ $( cat /etc/default/ceph-osd-cpuset ) == "True" ]]; then
|
||||
{% raw %}
|
||||
if [[ $( cat /etc/default/ceph-osd-cpuset ) == "True" && ${#A_OSD_CPUS[@]} -gt 0 ]]; then
|
||||
{% endraw %}
|
||||
# Convert arrays into CSV
|
||||
OSD_MEMS="$( IFS=, ; echo "${A_OSD_MEMS[*]}" )"
|
||||
OSD_CPUS="$( IFS=, ; echo "${A_OSD_CPUS[*]}" )"
|
||||
|
@ -1,6 +1,5 @@
|
||||
# PVC Ceph OSD cpuset service unit
|
||||
# {{ ansible_managed }}
|
||||
{% set cset_host = pvc_shield_osds_cset | selectattr('hostname', 'equalto', inventory_hostname) %}
|
||||
[Unit]
|
||||
Description = Ceph OSD cpuset shield creation
|
||||
Before = ceph-osd@.service libvirtd.service
|
||||
|
Reference in New Issue
Block a user