Project

General

Profile

Bug #6475

rgw: Log directory should not be created by the init script

Added by Wido den Hollander over 10 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
High
Assignee:
-
Target version:
-
% Done:

0%

Source:
other
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

The init script currently created /var/log/radosgw, which isn't the way it's supposed to be:

  1. directory to write logs to
    LOGDIR='/var/log/radosgw'
    ...
    ...
  2. make sure log dir exists
    if [ ! -d "$LOGDIR" ]; then
    mkdir -p $LOGDIR
    fi

Shouldn't this directory be created by the DEB and RPM packages instead of having an init script creating it?

Associated revisions

Revision 10b466e9 (diff)
Added by Sage Weil over 10 years ago

radosgw: create /var/log/radosgw in package, not init script

Fixes: #6475
Signed-off-by: Sage Weil <>

History

#1 Updated by Sage Weil over 10 years ago

  • Priority changed from Normal to High

yeah.. and i think the logs by default go into /var/log/ceph anyway. it's a bit wonky though because of ceph vs radosgw. probably ceph-common should create the logs dir, and both should depend on that.

#2 Updated by Yehuda Sadeh over 10 years ago

  • Assignee set to Sage Weil

#3 Updated by Sage Weil over 10 years ago

  • Status changed from New to Fix Under Review
  • Assignee changed from Sage Weil to Anonymous

#4 Updated by Anonymous over 10 years ago

I've confirmed that the rpm fix is correct with one change:

diff --git a/ceph.spec.in b/ceph.spec.in
index d6cc630..63e336b 100644
--- a/ceph.spec.in
+++ b/ceph.spec.in
@ -329,7 +329,7 @ mkdir p $RPM_BUILD_ROOT%{_localstatedir}/lib/ceph/osd
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/ceph/mds
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/ceph/bootstrap-osd
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/ceph/bootstrap-mds

+mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/radosgw

next I'll test the debian fix.

#5 Updated by Anonymous over 10 years ago

Debian looks good.

#6 Updated by Sage Weil over 10 years ago

  • Status changed from Fix Under Review to Resolved

awesome, merged it in. thanks!

Also available in: Atom PDF