This is an automated email from the ASF dual-hosted git repository.

ssulav pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone-installer.git


The following commit(s) were added to refs/heads/master by this push:
     new d6ff9eb  HDDS-14767. Added an option to set max open files for SCM, OM 
and DN (#12)
d6ff9eb is described below

commit d6ff9ebb6c27d5c1f3b741f47f35373b5cb9818f
Author: Andrey Yarovoy <[email protected]>
AuthorDate: Thu Mar 12 15:05:07 2026 -0400

    HDDS-14767. Added an option to set max open files for SCM, OM and DN (#12)
---
 inventories/dev/group_vars/all.yml |  3 +++
 roles/ozone_service/tasks/main.yml | 30 +++++++++++++++++++++++++-----
 2 files changed, 28 insertions(+), 5 deletions(-)

diff --git a/inventories/dev/group_vars/all.yml 
b/inventories/dev/group_vars/all.yml
index 817c47a..12db898 100644
--- a/inventories/dev/group_vars/all.yml
+++ b/inventories/dev/group_vars/all.yml
@@ -33,6 +33,9 @@ data_base: "/data/ozone"
 jdk_major: 17
 ozone_java_home: ""           # autodetected if empty
 
+# Max number of open files for Ozone SCM, OM and DN  processes (ulimit -n).
+ozone_nofile_limit: 65536
+
 # Service user/group
 service_user: "ozone"
 service_group: "ozone"
diff --git a/roles/ozone_service/tasks/main.yml 
b/roles/ozone_service/tasks/main.yml
index 09ac7ec..b26d23c 100644
--- a/roles/ozone_service/tasks/main.yml
+++ b/roles/ozone_service/tasks/main.yml
@@ -37,7 +37,11 @@
           failed_when: scm_init_first.rc != 0
 
         - name: "Start first SCM"
-          command: "{{ ozone_bin }} --daemon start scm"
+          shell: |-
+            ulimit -n {{ ozone_nofile_limit | int }}
+            "{{ ozone_bin }}" --daemon start scm
+          args:
+            executable: "{{ service_shell | default('/bin/bash') }}"
           when: (groups['scm'] | length > 0) and (inventory_hostname == 
groups['scm'][0])
           register: scm_start_first
           failed_when: scm_start_first.rc != 0
@@ -51,7 +55,11 @@
           failed_when: om_init_first.rc != 0
 
         - name: "Start first OM"
-          command: "{{ ozone_bin }} --daemon start om"
+          shell: |-
+            ulimit -n {{ ozone_nofile_limit | int }}
+            "{{ ozone_bin }}" --daemon start om
+          args:
+            executable: "{{ service_shell | default('/bin/bash') }}"
           when: (groups['om'] | length > 0) and (inventory_hostname == 
groups['om'][0])
           register: om_start_first
           failed_when: om_start_first.rc != 0
@@ -66,7 +74,11 @@
           failed_when: scm_bootstrap_rest.rc != 0
 
         - name: "Start SCM on remaining SCMs"
-          command: "{{ ozone_bin }} --daemon start scm"
+          shell: |-
+            ulimit -n {{ ozone_nofile_limit | int }}
+            "{{ ozone_bin }}" --daemon start scm
+          args:
+            executable: "{{ service_shell | default('/bin/bash') }}"
           when: "'scm' in groups and (groups['scm'] | length > 1) and 
(inventory_hostname in groups['scm'][1:])"
           register: scm_start_rest
           failed_when: scm_start_rest.rc != 0
@@ -78,7 +90,11 @@
           failed_when: om_init_rest.rc != 0
 
         - name: "Start OM on remaining OMs"
-          command: "{{ ozone_bin }} --daemon start om"
+          shell: |-
+            ulimit -n {{ ozone_nofile_limit | int }}
+            "{{ ozone_bin }}" --daemon start om
+          args:
+            executable: "{{ service_shell | default('/bin/bash') }}"
           when: "'om' in groups and (groups['om'] | length > 1) and 
(inventory_hostname in groups['om'][1:])"
           register: om_start_rest
           failed_when: om_start_rest.rc != 0
@@ -90,7 +106,11 @@
   environment: "{{ ozone_runtime_env }}"
   block:
     - name: "Start Datanodes"
-      command: "{{ ozone_bin }} --daemon start datanode"
+      shell: |-
+        ulimit -n {{ ozone_nofile_limit | int }}
+        "{{ ozone_bin }}" --daemon start datanode
+      args:
+        executable: "{{ service_shell | default('/bin/bash') }}"
       when: inventory_hostname in (groups.get('datanodes', []))
       async: 300
       poll: 0


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to