LACROIX Jean Marc
2015-11-08 07:40:02 UTC
Package: logrotate
Version: 3.8.7-1+b1
Dears Maintainers,
I have a strange behaviour on Debian Jessie on ARM platform with 2
differents contexts when using logotate with default config Debian
files.
Im am using logrotate on the host and the same logrotate on one
container managed by LXC, with of course the same Debian release.
When using logrotate on the host, logrotate behaviour is correct and
all files are correctly rotated. But when running the same command in
the container ( with same OS and same package, it was not possible to
run the command (look at error bellow).
The only found method is to use the '--force' option in order to run
the command correctly release on HOST:
------------trace ----------------
***@srv-cubie2-1:/etc# uname -a
Linux srv-cubie2-1 4.0.5-e23a94b-be4cb23-dirty #9 SMP Mon Aug 24
09:43:56 CEST 2015 armv7l GNU/Linux
***@srv-cubie2-1:/etc# cat /etc/debian_version
8.2
***@srv-cubie2-1:/etc# dpkg -l |grep logrotate
ii logrotate 3.8.7-1+b1 armhf Log rotation utility
step 1: config
--------------
***@srv-dns-2:/etc# cat /etc/logrotate.conf
# see "man logrotate" for details
# rotate log files weekly
weekly
# keep 4 weeks worth of backlogs
rotate 4
# create new (empty) log files after rotating old ones
create
# uncomment this if you want your log files compressed
#compress
# packages drop log rotation information into this directory
include /etc/logrotate.d
# no packages own wtmp, or btmp -- we'll rotate them here
/var/log/wtmp {
missingok
monthly
create 0664 root utmp
rotate 1
}
/var/log/btmp {
missingok
monthly
create 0660 root utmp
rotate 1
}
***@srv-dns-2:/etc# md5sum /etc/logrotate.conf
176edd439a499501372cf3d04e795810 /etc/logrotate.conf
step 2: run logrotate on host
-----------------------------
***@srv-cubie2-1:/etc# /usr/sbin/logrotate /etc/logrotate.conf;echo $?
0
step 3: config container
------------------------
***@srv-dns-2:/etc# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/vg_srv_dns-lv_rootfs 198337 33277 154820 18% /
/dev/mapper/vg_srv_dns-lv_tmp 99150 1550 92480 2% /tmp
/dev/mapper/vg_srv_dns-lv_usr 394724 257330 117017 69% /usr
/dev/mapper/vg_srv_dns-lv_var 301619 238194 47861 84% /var
tmpfs 102768 96 102672 1% /run
tmpfs 5120 0 5120 0% /run/lock
tmpfs 205520 0 205520 0% /run/shm
***@srv-dns-2:/etc# cat /etc/debian_version
8.2
***@srv-dns-2:/etc# dpkg -l |grep logrotate
ii logrotate 3.8.7-1+b1 armhf
Log rotation utility
***@srv-dns-2:/etc# md5sum /etc/logrotate.conf
176edd439a499501372cf3d04e795810 /etc/logrotate.conf
Please note that configuration file is the same (same md5) than in host
step 4: run logrotate in container
----------------------------------
***@srv-dns-2:/etc# /usr/sbin/logrotate /etc/logrotate.conf
error: stat of # failed: No such file or directory
error: stat of internal failed: No such file or directory
error: stat of infrastructure failed: No such file or directory
but when forcing command...., there are still errors, but the job is
done
***@srv-dns-2:/etc# /usr/sbin/logrotate -f /etc/logrotate.conf
error: error creating output file /var/log/dpkg.log.1.gz: File exists
error: stat of # failed: No such file or directory
error: stat of internal failed: No such file or directory
error: stat of infrastructure failed: No such file or directory
error: error creating output file /var/log/kern.log.1.gz: File exists
error: error creating output file /var/log/auth.log.1.gz: File exists
error: error creating output file /var/log/debug.1.gz: File exists
error: error creating output file /var/log/messages.1.gz: File exists
Any suggestion would be appreciated
best regards
Version: 3.8.7-1+b1
Dears Maintainers,
I have a strange behaviour on Debian Jessie on ARM platform with 2
differents contexts when using logotate with default config Debian
files.
Im am using logrotate on the host and the same logrotate on one
container managed by LXC, with of course the same Debian release.
When using logrotate on the host, logrotate behaviour is correct and
all files are correctly rotated. But when running the same command in
the container ( with same OS and same package, it was not possible to
run the command (look at error bellow).
The only found method is to use the '--force' option in order to run
the command correctly release on HOST:
------------trace ----------------
***@srv-cubie2-1:/etc# uname -a
Linux srv-cubie2-1 4.0.5-e23a94b-be4cb23-dirty #9 SMP Mon Aug 24
09:43:56 CEST 2015 armv7l GNU/Linux
***@srv-cubie2-1:/etc# cat /etc/debian_version
8.2
***@srv-cubie2-1:/etc# dpkg -l |grep logrotate
ii logrotate 3.8.7-1+b1 armhf Log rotation utility
step 1: config
--------------
***@srv-dns-2:/etc# cat /etc/logrotate.conf
# see "man logrotate" for details
# rotate log files weekly
weekly
# keep 4 weeks worth of backlogs
rotate 4
# create new (empty) log files after rotating old ones
create
# uncomment this if you want your log files compressed
#compress
# packages drop log rotation information into this directory
include /etc/logrotate.d
# no packages own wtmp, or btmp -- we'll rotate them here
/var/log/wtmp {
missingok
monthly
create 0664 root utmp
rotate 1
}
/var/log/btmp {
missingok
monthly
create 0660 root utmp
rotate 1
}
***@srv-dns-2:/etc# md5sum /etc/logrotate.conf
176edd439a499501372cf3d04e795810 /etc/logrotate.conf
step 2: run logrotate on host
-----------------------------
***@srv-cubie2-1:/etc# /usr/sbin/logrotate /etc/logrotate.conf;echo $?
0
step 3: config container
------------------------
***@srv-dns-2:/etc# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/vg_srv_dns-lv_rootfs 198337 33277 154820 18% /
/dev/mapper/vg_srv_dns-lv_tmp 99150 1550 92480 2% /tmp
/dev/mapper/vg_srv_dns-lv_usr 394724 257330 117017 69% /usr
/dev/mapper/vg_srv_dns-lv_var 301619 238194 47861 84% /var
tmpfs 102768 96 102672 1% /run
tmpfs 5120 0 5120 0% /run/lock
tmpfs 205520 0 205520 0% /run/shm
***@srv-dns-2:/etc# cat /etc/debian_version
8.2
***@srv-dns-2:/etc# dpkg -l |grep logrotate
ii logrotate 3.8.7-1+b1 armhf
Log rotation utility
***@srv-dns-2:/etc# md5sum /etc/logrotate.conf
176edd439a499501372cf3d04e795810 /etc/logrotate.conf
Please note that configuration file is the same (same md5) than in host
step 4: run logrotate in container
----------------------------------
***@srv-dns-2:/etc# /usr/sbin/logrotate /etc/logrotate.conf
error: stat of # failed: No such file or directory
error: stat of internal failed: No such file or directory
error: stat of infrastructure failed: No such file or directory
but when forcing command...., there are still errors, but the job is
done
***@srv-dns-2:/etc# /usr/sbin/logrotate -f /etc/logrotate.conf
error: error creating output file /var/log/dpkg.log.1.gz: File exists
error: stat of # failed: No such file or directory
error: stat of internal failed: No such file or directory
error: stat of infrastructure failed: No such file or directory
error: error creating output file /var/log/kern.log.1.gz: File exists
error: error creating output file /var/log/auth.log.1.gz: File exists
error: error creating output file /var/log/debug.1.gz: File exists
error: error creating output file /var/log/messages.1.gz: File exists
Any suggestion would be appreciated
best regards
--
--------------------------------------
-- Jean-Marc LACROIX --
-- mailto : ***@free.fr --
---------------------------------------
--------------------------------------
-- Jean-Marc LACROIX --
-- mailto : ***@free.fr --
---------------------------------------