Skip to content

Commit

Permalink
common/options: add configs for temporary files made by daemons
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
  • Loading branch information
batrick committed May 11, 2024
1 parent 5a3584b commit de350cc
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/common/config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
23 changes: 23 additions & 0 deletions src/common/options/global.yaml.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit de350cc

Please sign in to comment.