From 34086ec23302c28a127f6aaba4ec162bf00d240e Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Sat, 9 Mar 2019 09:24:46 +0100 Subject: [PATCH] osd: support numactl options on OSD activate This commit adds OSD containers activate with numactl support. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1684146 Signed-off-by: Guillaume Abrioux (cherry picked from commit b3eb9206fada05df811602217d8770db854e0adf) --- group_vars/osds.yml.sample | 2 +- roles/ceph-osd/defaults/main.yml | 2 +- roles/ceph-osd/templates/ceph-osd-run.sh.j2 | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/group_vars/osds.yml.sample b/group_vars/osds.yml.sample index 02e868583..236a2e2be 100644 --- a/group_vars/osds.yml.sample +++ b/group_vars/osds.yml.sample @@ -258,7 +258,7 @@ dummy: # #ceph_osd_docker_extra_env: #ceph_osd_docker_run_script_path: "/usr/share" # script called by systemd to run the docker command - +#ceph_osd_numactl_opts: "" ########### # SYSTEMD # diff --git a/roles/ceph-osd/defaults/main.yml b/roles/ceph-osd/defaults/main.yml index 0292e69e3..0f85a1511 100644 --- a/roles/ceph-osd/defaults/main.yml +++ b/roles/ceph-osd/defaults/main.yml @@ -250,7 +250,7 @@ ceph_osd_docker_prepare_env: -e OSD_JOURNAL_SIZE={{ journal_size }} # ceph_osd_docker_extra_env: ceph_osd_docker_run_script_path: "/usr/share" # script called by systemd to run the docker command - +ceph_osd_numactl_opts: "" ########### # SYSTEMD # diff --git a/roles/ceph-osd/templates/ceph-osd-run.sh.j2 b/roles/ceph-osd/templates/ceph-osd-run.sh.j2 index 7e7cda05e..4a6eaa181 100644 --- a/roles/ceph-osd/templates/ceph-osd-run.sh.j2 +++ b/roles/ceph-osd/templates/ceph-osd-run.sh.j2 @@ -70,6 +70,10 @@ fi # MAIN # ######## +{% if ceph_osd_numactl_opts != "" %} +numactl \ +{{ ceph_osd_numactl_opts }} \ +{% endif %} /usr/bin/docker run \ --rm \ --net=host \