Skip to content

Commit

Permalink
Merge pull request ceph#722 from ceph/wip-6475
Browse files Browse the repository at this point in the history
radosgw: create /var/log/radosgw in package, not init script

Reviewed-and-tested-by: Gary Lowell <[email protected]>
  • Loading branch information
Sage Weil committed Oct 18, 2013
2 parents 09bd6bb + 2edc04c commit ac533bf
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 19 deletions.
10 changes: 8 additions & 2 deletions ceph.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,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

%if %{defined suse_version}
# Fedora seems to have some problems with this macro, use it only on SUSE
Expand Down Expand Up @@ -364,7 +364,7 @@ fi
%endif
# Package removal cleanup
if [ "$1" -eq "0" ] ; then
rm -rf /var/log/ceph
rm -rf /var/log/ceph
rm -rf /etc/ceph
fi

Expand Down Expand Up @@ -515,6 +515,7 @@ fi
%{_mandir}/man8/radosgw.8*
%{_mandir}/man8/radosgw-admin.8*
%{_sbindir}/rcceph-radosgw
%dir %{_localstatedir}/log/radosgw/

%post radosgw
/sbin/ldconfig
Expand All @@ -533,6 +534,11 @@ fi
%restart_on_update ceph-radosgw
%insserv_cleanup
%endif
# Package removal cleanup
if [ "$1" -eq "0" ] ; then
rm -rf /var/log/radosgw
fi


#################################################################################
%if %{with ocf}
Expand Down
2 changes: 1 addition & 1 deletion debian/radosgw.dirs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
var/log/ceph
var/log/radosgw
var/lib/ceph/radosgw
8 changes: 0 additions & 8 deletions src/init-radosgw
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,11 @@ PREFIX='client.radosgw.'
# user to run radosgw as (it not specified in ceph.conf)
DEFAULT_USER='www-data'

# directory to write logs to
LOGDIR='/var/log/radosgw'

RADOSGW=`which radosgw`
if [ ! -x "$RADOSGW" ]; then
exit 0
fi

# make sure log dir exists
if [ ! -d "$LOGDIR" ]; then
mkdir -p $LOGDIR
fi

case "$1" in
start)
for name in `ceph-conf --list-sections $PREFIX`;
Expand Down
8 changes: 0 additions & 8 deletions src/init-radosgw.sysv
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,11 @@ PREFIX='client.radosgw.'
#DEFAULT_USER='www-data'
DEFAULT_USER='apache'

# directory to write logs to
LOGDIR='/var/log/radosgw'

RADOSGW=`which radosgw`
if [ ! -x "$RADOSGW" ]; then
exit 0
fi

# make sure log dir exists
if [ ! -d "$LOGDIR" ]; then
mkdir -p $LOGDIR
fi

case "$1" in
start)
echo "Starting radosgw instance(s)..."
Expand Down

0 comments on commit ac533bf

Please sign in to comment.