]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common: fix non-daemon init
authorSage Weil <sage@inktank.com>
Tue, 15 Oct 2013 23:32:32 +0000 (16:32 -0700)
committerSage Weil <sage@inktank.com>
Tue, 15 Oct 2013 23:32:32 +0000 (16:32 -0700)
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>
PendingReleaseNotes
src/common/common_init.cc

index a3ec73290f39ea9a572c515557c8ea5d814fd8a6..a30cf8c6e17994e51cbd4b2e4bdf36e6f80dbc74 100644 (file)
@@ -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.
index 18fdf7267870fb1dc5908bf8615d8a1edbd7bcd9..8fb688cd8d3faa9052e98c9e31d4c53865c2b544 100644 (file)
@@ -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;