From: Patrick Donnelly Date: Fri, 10 May 2024 13:45:27 +0000 (-0400) Subject: common/options: add configs for temporary files made by daemons X-Git-Tag: v19.2.3~303^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2369180fd41d3bd8e15d07dae3d6e0d58595f2a3;p=ceph.git common/options: add configs for temporary files made by daemons Signed-off-by: Patrick Donnelly (cherry picked from commit de350ccc4362903dc8fab2e166454f0675dde7f1) --- diff --git a/src/common/config.cc b/src/common/config.cc index c8101587b719..604b3c35d5e3 100644 --- a/src/common/config.cc +++ b/src/common/config.cc @@ -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`. diff --git a/src/common/options/global.yaml.in b/src/common/options/global.yaml.in index 76a4f4d9551a..66c8bd839080 100644 --- a/src/common/options/global.yaml.in +++ b/src/common/options/global.yaml.in @@ -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