From: Sage Weil Date: Tue, 15 Oct 2013 23:32:32 +0000 (-0700) Subject: common: fix non-daemon init X-Git-Tag: v0.72-rc1~48 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5838c0901a8942e0e080c90cd806e7dee1265743;p=ceph.git 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 Reviewed-by: Josh Durgin --- diff --git a/PendingReleaseNotes b/PendingReleaseNotes index a3ec73290f39..a30cf8c6e179 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 18fdf7267870..8fb688cd8d3f 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;