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: testing/wip-pdonnell-testing-20240517.012458-debug~2^2~4 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=de350ccc4362903dc8fab2e166454f0675dde7f1;p=ceph-ci.git common/options: add configs for temporary files made by daemons Signed-off-by: Patrick Donnelly --- diff --git a/src/common/config.cc b/src/common/config.cc index c8101587b71..604b3c35d5e 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 52d306e4c11..7366bbb31c6 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