]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/options: add configs for temporary files made by daemons
authorPatrick Donnelly <pdonnell@redhat.com>
Fri, 10 May 2024 13:45:27 +0000 (09:45 -0400)
committerPatrick Donnelly <pdonnell@ibm.com>
Mon, 3 Mar 2025 20:00:53 +0000 (15:00 -0500)
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit de350ccc4362903dc8fab2e166454f0675dde7f1)

src/common/config.cc
src/common/options/global.yaml.in

index c8101587b7190527088481a4b98ab1037738a308..604b3c35d5e32912d23646f140c94ea6337f73ba 100644 (file)
@@ -493,6 +493,11 @@ void md_config_t::parse_env(unsigned entity_type,
     }
   }
 
+  if (auto s = getenv("TMPDIR"); s) {
+    string err;
+    _set_val(values, tracker, s, *find_option("tmp_dir"), CONF_ENV, &err);
+  }
+
   // Apply pod memory limits:
   //
   // There are two types of resource requests: `limits` and `requests`.
index 76a4f4d9551ada1ce20913197dab2b0bdb716b5c..66c8bd8390807120ec9017acf96dbd83aebe4b97 100644 (file)
@@ -250,6 +250,29 @@ options:
   flags:
   - startup
   with_legacy: true
+- name: tmp_dir
+  type: str
+  level: advanced
+  desc: path for the 'tmp' directory
+  default: /tmp
+  services:
+  - common
+  see_also:
+  - admin_socket
+  flags:
+  - runtime
+- name: tmp_file_template
+  type: str
+  level: advanced
+  desc: Template for temporary files created by daemons for ceph tell commands
+  long_desc: The template file name prefix for temporary files. For example, temporary files may be created by `ceph tell` commands using the --daemon-output-file switch.
+  daemon_default: $tmp_dir/$cluster-$name.XXXXXX
+  services:
+  - osd
+  - mds
+  - mon
+  flags:
+  - runtime
 - name: admin_socket
   type: str
   level: advanced