logrotate on master node fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Fuel for OpenStack |
Fix Released
|
High
|
MOS Linux | ||
8.0.x |
Fix Released
|
High
|
Ivan Suzdal |
Bug Description
I have found that all docker containers have
crond, xinetd, rsyslogd inside of containers.
This creates problems with logrotate we do on masternode with
# bash -x /etc/logrotate.
For instance logrotate for nginx inside of container have problems with rotating nginx logs. Just run
# pgrep nginx
294
# cd /proc/294/fd
# ll
total 0
lrwx------ 1 root root 64 Jan 4 15:20 0 -> /dev/null
lrwx------ 1 root root 64 Jan 4 15:20 1 -> /dev/null
lrwx------ 1 root root 64 Jan 4 15:20 10 -> socket:[100990]
lrwx------ 1 root root 64 Jan 4 15:20 11 -> socket:[100991]
lrwx------ 1 root root 64 Jan 4 15:20 12 -> socket:[100992]
lrwx------ 1 root root 64 Jan 4 15:20 13 -> socket:[103809]
lrwx------ 1 root root 64 Jan 4 15:20 14 -> socket:[103810]
lrwx------ 1 root root 64 Jan 4 15:20 15 -> socket:[103811]
lrwx------ 1 root root 64 Jan 4 15:20 16 -> socket:[103812]
lrwx------ 1 root root 64 Jan 4 15:20 17 -> socket:[103813]
lrwx------ 1 root root 64 Jan 4 15:20 18 -> socket:[103814]
lrwx------ 1 root root 64 Jan 4 15:20 19 -> socket:[103815]
l-wx------ 1 root root 64 Jan 4 15:20 2 -> /var/log/
lrwx------ 1 root root 64 Jan 4 15:20 3 -> socket:[103808]
l-wx------ 1 root root 64 Jan 4 15:20 4 -> /var/log/
l-wx------ 1 root root 64 Jan 4 15:20 5 -> /var/log/
l-wx------ 1 root root 64 Jan 4 15:20 6 -> /var/log/
l-wx------ 1 root root 64 Jan 4 15:20 7 -> /var/log/
l-wx------ 1 root root 64 Jan 4 15:20 8 -> /var/log/
l-wx------ 1 root root 64 Jan 4 15:20 9 -> /var/log/
# cd /var/log/nginx/
# ll
total 4056160
-rw-r--r-- 1 root root 0 Dec 29 13:14 access.log
-rw-r--r-- 1 nginx nginx 0 Dec 30 03:06 access_nailgun.log
-rw-r--r-- 1 root root 5735128 Dec 30 03:05 access_
-rw-r--r-- 1 nginx nginx 0 Dec 30 03:06 access_repo.log
-rw-r--r-- 1 root root 43410 Dec 29 20:10 access_
-rw-r--r-- 1 nginx nginx 0 Dec 30 03:06 error.log
-rw-r--r-- 1 root root 221 Dec 29 13:14 error.log-
-rw-r--r-- 1 nginx nginx 0 Dec 29 14:06 error_nailgun.log
-rw-r--r-- 1 root root 4145066270 Jan 4 16:22 error_nailgun.
-rw-r--r-- 1 nginx nginx 0 Dec 30 03:06 error_repo.log
-rw-r--r-- 1 root root 135075 Dec 30 03:04 error_repo.
-rw-r--r-- 1 root root 955733 Dec 29 19:59 error_repo.log.1.gz
-rw-r--r-- 1 root root 790415 Dec 29 18:59 error_repo.log.2.gz
-rw-r--r-- 1 root root 758530 Dec 29 16:59 error_repo.log.3.gz
It looks like copy truncate doesn't work properly.
Changed in fuel: | |
importance: | Undecided → High |
assignee: | nobody → Fuel Library Team (fuel-library) |
milestone: | none → 9.0 |
status: | New → Confirmed |
tags: | added: area-build logging |
tags: |
added: area-library removed: area-build |
Changed in fuel: | |
assignee: | Fuel Library Team (fuel-library) → MOS Linux (mos-linux) |
tags: |
added: area-mos removed: area-library |
tags: | added: on-verification |
Changed in fuel: | |
status: | Confirmed → Fix Committed |
tags: | removed: on-verification |
It looks like logrotate inside of containers interacts with bash -x /etc/logrotate. d/fuel. nodaily
Firsly, we should disable logrotate in containers.