diff options
author | Colin Patrick McCabe <cmccabe@alumni.cmu.edu> | 2011-03-15 14:47:48 -0700 |
---|---|---|
committer | Colin Patrick McCabe <cmccabe@alumni.cmu.edu> | 2011-03-15 14:49:10 -0700 |
commit | abc64b01a336837e2d7d5e00ec93d4145aa4b278 (patch) | |
tree | e6cbb0ef3207781d6eb07307ee6603d4905855b6 | |
parent | 24342a71919e50e81a8c05682a5687b2e54d649b (diff) | |
download | ceph-abc64b01a336837e2d7d5e00ec93d4145aa4b278.tar.gz |
logging: --foreground options reorganization
-f now just means stay in the foreground.
-d now means stay in the foreground and log to foreground.
Both options now disable pid-files.
Update man pages.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
-rw-r--r-- | man/cmds.8 | 12 | ||||
-rw-r--r-- | man/cmon.8 | 12 | ||||
-rw-r--r-- | man/cosd.8 | 12 | ||||
-rw-r--r-- | src/common/config.cc | 7 |
4 files changed, 19 insertions, 24 deletions
diff --git a/man/cmds.8 b/man/cmds.8 index 5570522655b..76fde6c30e7 100644 --- a/man/cmds.8 +++ b/man/cmds.8 @@ -28,14 +28,12 @@ and specifying the rank overrides specifying the name. .SH OPTIONS .TP -\fB\-D\fP -Debug mode: do not daemonize after startup (run in foreground) and send log output -to stdout. +\fB\-f\fP, \fB\-\-foreground\f +Foreground: do not daemonize after startup (run in foreground). +Do not generate a pid file. Useful when run via crun (8). .TP -\fB\-f\fP -do not daemonize after startup (run in foreground), but log to the usual location. -Useful when run via -.BR crun (8). +\fB\-d\fP, \fB\-\-debug\f +Debug mode: like -f, but also send all log output to stderr. .TP \fB\-c\fI ceph.conf\fR, \fB\-\-conf=\fIceph.conf\fR Use \fIceph.conf\fP configuration file instead of the default \fI/etc/ceph/ceph.conf\fP diff --git a/man/cmon.8 b/man/cmon.8 index 4f566501f20..501c30b72c4 100644 --- a/man/cmon.8 +++ b/man/cmon.8 @@ -18,14 +18,12 @@ storing monitor data. It is normally specified via the "mon data" option in the configuration file. .SH OPTIONS .TP -\fB\-D\fP -Debug mode: do not daemonize after startup (run in foreground) and send log output -to stdout. +\fB\-f\fP, \fB\-\-foreground\f +Foreground: do not daemonize after startup (run in foreground). +Do not generate a pid file. Useful when run via crun (8). .TP -\fB\-f\fP -do not daemonize after startup (run in foreground), but log to the usual location. -Useful when run via -.BR crun (8). +\fB\-d\fP, \fB\-\-debug\f +Debug mode: like -f, but also send all log output to stderr. .TP \fB\-c\fI ceph.conf\fR, \fB\-\-conf=\fIceph.conf\fR Use \fIceph.conf\fP configuration file instead of the default \fI/etc/ceph/ceph.conf\fP diff --git a/man/cosd.8 b/man/cosd.8 index 77be8270278..6e8ddc4e5b6 100644 --- a/man/cosd.8 +++ b/man/cosd.8 @@ -19,14 +19,12 @@ and is only useful performance-wise when it resides on a different disk than \fIdatapath\fP with low latency (ideally, an NVRAM device). .SH OPTIONS .TP -\fB\-D\fP -Debug mode: do not daemonize after startup (run in foreground) and send log output -to stdout. +\fB\-f\fP, \fB\-\-foreground\f +Foreground: do not daemonize after startup (run in foreground). +Do not generate a pid file. Useful when run via crun (8). .TP -\fB\-f\fP -do not daemonize after startup (run in foreground), but log to the usual location. -Useful when run via -.BR crun (8). +\fB\-d\fP, \fB\-\-debug\f +Debug mode: like -f, but also send all log output to stderr. .TP \fB\-\-osd\-data \fIosddata\fP Use object store at \fIosddata\fP. diff --git a/src/common/config.cc b/src/common/config.cc index a834a12ab64..70df50c5eca 100644 --- a/src/common/config.cc +++ b/src/common/config.cc @@ -99,7 +99,7 @@ struct config_option config_optionsp[] = { OPTION(num_client, 0, OPT_INT, 1), OPTION(monmap, 'M', OPT_STR, 0), OPTION(mon_host, 'm', OPT_STR, 0), - OPTION(daemonize, 'd', OPT_BOOL, false), + OPTION(daemonize, 0, OPT_BOOL, false), OPTION(tcmalloc_profiler_run, 0, OPT_BOOL, false), OPTION(profiler_allocation_interval, 0, OPT_INT, 1073741824), OPTION(profiler_highwater_interval, 0, OPT_INT, 104857600), @@ -908,10 +908,11 @@ parse_argv(std::vector<const char*>& args) cf->dump(); _exit(0); } - else if (ceph_argparse_flag(args, i, "--nodaemon", "-D", NULL)) { + else if (ceph_argparse_flag(args, i, "--foreground", "-f", NULL)) { daemonize = false; + set_cv(&pid_file, NULL); } - else if (ceph_argparse_flag(args, i, "--foreground", "-f", NULL)) { + else if (ceph_argparse_flag(args, i, "--debug", "-d", NULL)) { daemonize = false; set_cv(&log_dir, NULL); set_cv(&pid_file, NULL); |