summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-10-15 16:32:32 -0700
committerSage Weil <sage@inktank.com>2013-10-15 16:32:32 -0700
commit5838c0901a8942e0e080c90cd806e7dee1265743 (patch)
treec32c2949f07981279e117cefe3c0a97342226364
parent92ea0d19bbf8ae1d5d901d26da87cee997ca6843 (diff)
downloadceph-5838c0901a8942e0e080c90cd806e7dee1265743.tar.gz
common: fix non-daemon init
In commit 4f403c26dc0048ad63e20d20369fa86bfb31c50e we broke the general non-daemon case. Also make a note in the release notes. Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
-rw-r--r--PendingReleaseNotes9
-rw-r--r--src/common/common_init.cc13
2 files changed, 19 insertions, 3 deletions
diff --git a/PendingReleaseNotes b/PendingReleaseNotes
index a3ec73290f3..a30cf8c6e17 100644
--- a/PendingReleaseNotes
+++ b/PendingReleaseNotes
@@ -21,3 +21,12 @@ v0.71
* Most output that used K or KB (e.g., for kilobyte) now uses a
lower-case k to match the official SI convention. Any scripts that
parse output and check for an upper-case K will need to be modified.
+
+v0.72
+~~~~~
+
+* ceph-fuse and radosgw now use the same default values for the admin
+ socket and log file paths that the other daemons (ceph-osd,
+ ceph-mon, etc.) do. If you run these daemons as non-root, you may
+ need to adjust your ceph.conf to disable these options or to adjust
+ the permissions on /var/run/ceph and /var/log/ceph.
diff --git a/src/common/common_init.cc b/src/common/common_init.cc
index 18fdf726787..8fb688cd8d3 100644
--- a/src/common/common_init.cc
+++ b/src/common/common_init.cc
@@ -73,10 +73,17 @@ CephContext *common_preinit(const CephInitParameters &iparams,
break;
}
- if ((flags & CINIT_FLAG_UNPRIVILEGED_DAEMON_DEFAULTS) ||
- code_env != CODE_ENVIRONMENT_DAEMON) {
+ if (flags & CINIT_FLAG_UNPRIVILEGED_DAEMON_DEFAULTS) {
// do nothing special! we used to do no default log, pid_file,
- // admin_socket, but changed our minds.
+ // admin_socket, but changed our minds. let's make ceph-fuse
+ // and radosgw use the same defaults as ceph-{osd,mon,mds,...}
+ } else if (code_env != CODE_ENVIRONMENT_DAEMON) {
+ // no default log, pid_file, admin_socket
+ conf->set_val_or_die("pid_file", "");
+ conf->set_val_or_die("admin_socket", "");
+ conf->set_val_or_die("log_file", "");
+ // use less memory for logs
+ conf->set_val_or_die("log_max_recent", "500");
}
return cct;