Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 529228 - sys-cluster/ceph - /etc/logrotate.d/ceph rotates already rotated files
Summary: sys-cluster/ceph - /etc/logrotate.d/ceph rotates already rotated files
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Yixun Lan
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2014-11-14 09:09 UTC by Malte Starostik
Modified: 2015-03-02 13:40 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ceph.logrotate (ceph.logrotate,503 bytes, text/plain)
2014-11-14 09:09 UTC, Malte Starostik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Malte Starostik 2014-11-14 09:09:00 UTC
$FILESDIR/ceph.logrotate applies to
/var/log/ceph/ceph-mon.*
/var/log/ceph/ceph-mds.*
/var/log/ceph/ceph-osd.*

That matches already rotated files.  Should be changed as attached.

Reproducible: Always

Steps to Reproduce:
1. Have ceph running for some time
2. Watch /var/log/ceph contents

Actual Results:  
Logrotate fails:

error: failed to rename /var/log/ceph/ceph-mon.5.log-20141006-20141008.gz-20141010.gz-20141012.gz-20141014.gz-20141016.gz-20141018.gz-20141020.gz-20141022.gz-20141024.gz-20141026.gz-20141027.gz-20141029.gz-20141031.gz-20141102.gz-20141104.gz-20141106.gz-20141108.gz-20141110.gz-20141112.gz to /var/log/ceph/ceph-mon.5.log-20141006-20141008.gz-20141010.gz-20141012.gz-20141014.gz-20141016.gz-20141018.gz-20141020.gz-20141022.gz-20141024.gz-20141026.gz-20141027.gz-20141029.gz-20141031.gz-20141102.gz-20141104.gz-20141106.gz-20141108.gz-20141110.gz-20141112.gz-20141114: File name too long

# ls /var/log/ceph/
ceph.log
ceph.log-20140501
ceph.log-20141108.gz
ceph.log-20141109.gz
ceph.log-20141110.gz
ceph.log-20141111.gz
ceph.log-20141112.gz
ceph.log-20141113.gz
ceph.log-20141114.gz
ceph-mon.3.log
ceph-mon.3.log-20140501
ceph-mon.3.log-20141007.gz-20141009.gz
ceph-mon.3.log-20141007.gz-20141009.gz-20141011.gz
ceph-mon.3.log-20141007.gz-20141009.gz-20141011.gz-20141013.gz
ceph-mon.3.log-20141007.gz-20141009.gz-20141011.gz-20141013.gz-20141015.gz
ceph-mon.3.log-20141007.gz-20141009.gz-20141011.gz-20141013.gz-20141015.gz-20141017.gz
ceph-mon.3.log-20141007.gz-20141009.gz-20141011.gz-20141013.gz-20141015.gz-20141017.gz-20141019.gz
ceph-mon.3.log-20141007.gz-20141009.gz-20141011.gz-20141013.gz-20141015.gz-20141017.gz-20141019.gz-20141021.gz
ceph-mon.3.log-20141007.gz-20141009.gz-20141011.gz-20141013.gz-20141015.gz-20141017.gz-20141019.gz-20141021.gz-20141023.gz
ceph-mon.3.log-20141007.gz-20141009.gz-20141011.gz-20141013.gz-20141015.gz-20141017.gz-20141019.gz-20141021.gz-20141023.gz-20141025.gz
ceph-mon.3.log-20141007.gz-20141009.gz-20141011.gz-20141013.gz-20141015.gz-20141017.gz-20141019.gz-20141021.gz-20141023.gz-20141025.gz-20141027.gz
ceph-mon.3.log-20141007.gz-20141009.gz-20141011.gz-20141013.gz-20141015.gz-20141017.gz-20141019.gz-20141021.gz-20141023.gz-20141025.gz-20141027.gz-20141029.gz
ceph-mon.3.log-20141007.gz-20141009.gz-20141011.gz-20141013.gz-20141015.gz-20141017.gz-20141019.gz-20141021.gz-20141023.gz-20141025.gz-20141027.gz-20141029.gz-20141031.gz
ceph-mon.3.log-20141007.gz-20141009.gz-20141011.gz-20141013.gz-20141015.gz-20141017.gz-20141019.gz-20141021.gz-20141023.gz-20141025.gz-20141027.gz-20141029.gz-20141031.gz-20141102.gz
ceph-mon.3.log-20141007.gz-20141009.gz-20141011.gz-20141013.gz-20141015.gz-20141017.gz-20141019.gz-20141021.gz-20141023.gz-20141025.gz-20141027.gz-20141029.gz-20141031.gz-20141102.gz-20141104.gz
ceph-mon.3.log-20141007.gz-20141009.gz-20141011.gz-20141013.gz-20141015.gz-20141017.gz-20141019.gz-20141021.gz-20141023.gz-20141025.gz-20141027.gz-20141029.gz-20141031.gz-20141102.gz-20141104.gz-20141106.gz
ceph-mon.3.log-20141007.gz-20141009.gz-20141011.gz-20141013.gz-20141015.gz-20141017.gz-20141019.gz-20141021.gz-20141023.gz-20141025.gz-20141027.gz-20141029.gz-20141031.gz-20141102.gz-20141104.gz-20141106.gz-20141108.gz
ceph-mon.3.log-20141007.gz-20141009.gz-20141011.gz-20141013.gz-20141015.gz-20141017.gz-20141019.gz-20141021.gz-20141023.gz-20141025.gz-20141027.gz-20141029.gz-20141031.gz-20141102.gz-20141104.gz-20141106.gz-20141108.gz-20141110.gz
ceph-mon.3.log-20141007.gz-20141009.gz-20141011.gz-20141013.gz-20141015.gz-20141017.gz-20141019.gz-20141021.gz-20141023.gz-20141025.gz-20141027.gz-20141029.gz-20141031.gz-20141102.gz-20141104.gz-20141106.gz-20141108.gz-20141110.gz-20141112.gz
ceph-mon.3.log-20141007.gz-20141009.gz-20141011.gz-20141013.gz-20141015.gz-20141017.gz-20141019.gz-20141021.gz-20141023.gz-20141025.gz-20141027.gz-20141029.gz-20141031.gz-20141102.gz-20141104.gz-20141106.gz-20141108.gz-20141110.gz-20141112.gz-20141114.gz

[...]



Expected Results:  
Regular logfile rotation

Portage 2.2.8-r2 (default/linux/amd64/13.0, gcc-4.8.3, glibc-2.19-r1, 3.16.5-gentoo-jmb x86_64)
=================================================================
System uname: Linux-3.16.5-gentoo-jmb-x86_64-Intel-R-_Xeon-R-_CPU_E5620_@_2.40GHz-with-gentoo-2.2
KiB Mem:    24689668 total,   8998732 free
KiB Swap:   16777212 total,  16777212 free
Timestamp of tree: Fri, 14 Nov 2014 06:15:01 +0000
ld GNU ld (Gentoo 2.24 p1.4) 2.24
app-shells/bash:          4.2_p53
dev-lang/perl:            5.18.2-r2
dev-lang/python:          2.7.7, 3.3.5-r1, 3.4.1
dev-util/cmake:           2.8.12.2-r1
dev-util/pkgconfig:       0.28-r1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.24-r3
sys-devel/gcc:            4.8.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.13 (virtual/os-headers)
sys-libs/glibc:           2.19-r1
Repositories: gentoo celestilay
Installed sets: @jmb-virt
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA Intel-SDP"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going y --jobs 9 --load-average 8.0"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs candy clean-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://de-mirror.org/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9 -l8.0"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/mnt/master/repo/gentoo"
PORTDIR_OVERLAY="/mnt/master/repo/celestilay"
USE="acl aften alsa amd64 amr avahi berkdb btrfs bzip2 calendar caps cli cracklib crypt curl cxx dbus device-mapper dri dv ffmpeg fortran gdbm geoip iconv icu inotify ipmi ipv6 jack jpeg jpeg2k kerberos lame libsamplerate lm_sensors lvm lzma matroska mikmod mmx modules mtp multilib ncurses nls nptl openal openexr openmp oscar pam pam_krb5 pcre perl png python quicktime rbd readline sasl schroedinger session smp sndfile snmp speex sqlite sse sse2 ssl system-ffmpeg systemd tcpd theora threads tiff truetype udev unicode usb v4l vcd vim-syntax vpx x264 xattr xine xmp xvmc zeroconf zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" CELESTILAY_MODULES="kernel" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby20 ruby19" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON
Comment 1 Malte Starostik 2014-11-14 09:09:52 UTC
Created attachment 389290 [details]
ceph.logrotate

Must end in .log to get rotated
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2014-11-14 13:47:58 UTC
Comment on attachment 389290 [details]
ceph.logrotate

--- a/files/ceph.logrotate
+++ b/files/ceph.logrotate
@@ -1,8 +1,8 @@
 /var/log/ceph/admin.log
 /var/log/ceph/ceph.log
-/var/log/ceph/ceph-mon.*
-/var/log/ceph/ceph-mds.*
-/var/log/ceph/ceph-osd.*
+/var/log/ceph/ceph-mon.*.log
+/var/log/ceph/ceph-mds.*.log
+/var/log/ceph/ceph-osd.*.log
 {
     rotate 7
     daily
Comment 3 Sergey Popov gentoo-dev 2015-03-02 13:36:37 UTC
+  02 Mar 2015; Sergey Popov <pinkbyte@gentoo.org> files/ceph.logrotate:
+  QA: prevent rotating already rotated log files
Comment 4 Sergey Popov gentoo-dev 2015-03-02 13:40:33 UTC
  02 Mar 2015; Sergey Popov <pinkbyte@gentoo.org> -ceph-0.67.9.ebuild,
  +ceph-0.67.9-r1.ebuild, -ceph-0.67.10.ebuild, +ceph-0.67.10-r1.ebuild,
  -ceph-0.80.5.ebuild, +ceph-0.80.5-r1.ebuild, -ceph-0.80.7.ebuild,
  +ceph-0.80.7-r1.ebuild:
  QA: revbump all ceph ebuilds to fix bug #529228 and related logrotate issues