From d08af0a654af5f2e7fc5daf40e88f0c9c2aee7c9 Mon Sep 17 00:00:00 2001 From: Dimitri Savineau Date: Fri, 21 Jun 2019 17:19:07 -0400 Subject: [PATCH] ceph-disk: Set max open files limit on container Same behaviour than ceph-volume (b987534). The ceph-disk command runs faster when using ulimit nofile with container cli. Signed-off-by: Dimitri Savineau --- roles/ceph-osd/tasks/scenarios/collocated.yml | 2 ++ roles/ceph-osd/tasks/scenarios/non-collocated.yml | 3 +++ 2 files changed, 5 insertions(+) diff --git a/roles/ceph-osd/tasks/scenarios/collocated.yml b/roles/ceph-osd/tasks/scenarios/collocated.yml index 51354c3ee..946877472 100644 --- a/roles/ceph-osd/tasks/scenarios/collocated.yml +++ b/roles/ceph-osd/tasks/scenarios/collocated.yml @@ -5,6 +5,7 @@ - name: prepare ceph containerized osd disk collocated shell: | docker run --net=host \ + --ulimit nofile=1024:1024 \ --pid=host \ --privileged=true \ --name=ceph-osd-prepare-{{ ansible_hostname }}-{{ item.1 | regex_replace('/dev/', '') }} \ @@ -30,6 +31,7 @@ - name: automatic prepare ceph containerized osd disk collocated shell: | docker run --net=host \ + --ulimit nofile=1024:1024 \ --pid=host \ --privileged=true \ --name=ceph-osd-prepare-{{ ansible_hostname }}-{{ item.split('/')[-1] }} \ diff --git a/roles/ceph-osd/tasks/scenarios/non-collocated.yml b/roles/ceph-osd/tasks/scenarios/non-collocated.yml index 49e7bf8d6..f3fb858d5 100644 --- a/roles/ceph-osd/tasks/scenarios/non-collocated.yml +++ b/roles/ceph-osd/tasks/scenarios/non-collocated.yml @@ -5,6 +5,7 @@ - name: prepare ceph "{{ osd_objectstore }}" containerized osd disk(s) non-collocated shell: | docker run --net=host \ + --ulimit nofile=1024:1024 \ --pid=host \ --privileged=true \ --name=ceph-osd-prepare-{{ ansible_hostname }}-{{ item.1 | regex_replace('/dev/', '') }} \ @@ -32,6 +33,7 @@ - name: prepare ceph "{{ osd_objectstore }}" containerized osd disk(s) non-collocated with a dedicated device for db shell: | docker run --net=host \ + --ulimit nofile=1024:1024 \ --pid=host \ --privileged=true \ --name=ceph-osd-prepare-{{ ansible_hostname }}-{{ item.1 | regex_replace('/dev/', '') }} \ @@ -60,6 +62,7 @@ - name: prepare ceph "{{ osd_objectstore }}" containerized osd disk(s) non-collocated with a dedicated device for db and wal shell: | docker run --net=host \ + --ulimit nofile=1024:1024 \ --pid=host \ --privileged=true \ --name=ceph-osd-prepare-{{ ansible_hostname }}-{{ item.1 | regex_replace('/dev/', '') }} \ -- 2.39.5