Unconsistent logrotate configuration on master node in mitaka release

Bug #1656305 reported by Alexey Stupnikov on 2017-01-13
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Medium
Alexey Stupnikov
Nominated for Ocata by Alexey Stupnikov
Newton
Medium
Fuel Sustaining

Bug Description

There is an intersection between general logrotate configuration and fuel.nodaily runs in MOS9 (but not MOS10). This is not a critical problem itself, but some application could need a special treatment when their logs are rotated. We have to analyse possible impact and modify logrotate configuration if some problems are possible.

There are two logrotate statements for the following log files:
[root@localhost logrotate.d]# grep -r /var/log/cobb /etc/logrotate.d
/etc/logrotate.d/fuel.nodaily:"/var/log/cobbler/*.log"
/etc/logrotate.d/cobblerd:/var/log/cobbler/cobbler.log {
/etc/logrotate.d/cobblerd:/var/log/cobbler/tasks/*.log {
/etc/logrotate.d/cobblerd:/var/log/cobbler/install.log {

[root@localhost logrotate.d]# grep -r /var/log/http /etc/logrotate.d
/etc/logrotate.d/fuel.nodaily:"/var/log/httpd/*"
/etc/logrotate.d/httpd:/var/log/httpd/*log {

[root@localhost logrotate.d]# grep -r /var/log/nail /etc/logrotate.d
/etc/logrotate.d/fuel.nodaily:"/var/log/nailgun/*.log"
/etc/logrotate.d/nailgun:/var/log/nailgun/api.log
/etc/logrotate.d/nailgun:/var/log/nailgun/app.log

[root@localhost logrotate.d]# grep -r /var/log/rabbi /etc/logrotate.d
/etc/logrotate.d/fuel.nodaily:"/var/log/rabbitmq/*"
/etc/logrotate.d/rabbitmq-server:/var/log/rabbitmq/*.log {

Alexey Stupnikov (astupnikov) wrote :

Setting this bug's importance to medium as it is a 'Failure of a significant feature, with workaround'. WA is to delete duplicate logrotate configuration entries from /etc/logrotate.d/fuel.nodaily file.

We can re-open and fix this issue if this bug will become customer-found.

Changed in fuel:
importance: Undecided → Medium
Alexey Stupnikov (astupnikov) wrote :

It looks like we are fixing medium priority bugs in stable/mitaka, so I will write a patch.

Alexey Stupnikov (astupnikov) wrote :

This bug's resolutions is locked by the bug #1656834

Alexey Stupnikov (astupnikov) wrote :

Bug #1656834 was solved.

Alexey Stupnikov (astupnikov) wrote :

Let me clarify this bug's description. It turns out that some log locations are mentioned twice in /etc/logrotate.d configuration files: first time in specific file that is shipped with a service's rpm and second time inside fuel.nodaily file.

Despite quite different logrotate configuration, this situation shouldn't cause any problems. But such kind of inconsistencies across configuration should be removed.

Alexey Stupnikov (astupnikov) wrote :

Here is a list of issues I have found:

stable/mitaka:

- cobblerd: duplicate configuration in /etc/logrotate.d/fuel.nodaily and /etc/logrotate.d/cobblerd
- httpd: same as above
- nginx: same as above
- rabbitmq: same as above
- nailgun: there is an intersection between /etc/logrotate.d/fuel.nodaily and /etc/logrotate.d/nailgun. But some log files are not covered by /etc/logrotate.d/fuel.nodaily.

stable/newton, stable/ocata, master:

- same config for keystone on master and slaves nodes, need to delete keystone-related statement from fuel.nodaily;
- same as above for messages.

Alexey Stupnikov (astupnikov) wrote :

And we have another issue with keystone logrotate configuration on master node: server isn't restarted, files are not rotated with copytruncate option (as in deb package). Will open another bug.

Alexey Stupnikov (astupnikov) wrote :

Opened a bug #1672702

Alexey Stupnikov (astupnikov) wrote :

Moving to invalid for newton release, as this issue isn't there. This bug is also irrelevant to ocata release.

Changed in fuel:
status: Confirmed → In Progress
Changed in fuel:
milestone: 9.x-updates → 9.2-mu-3
Alexey Stupnikov (astupnikov) wrote :

mos-maintenance team is unable to merge anything to stable/newton branch. Assigning a bug to fuel-sustaining for 10.x-updates milestone.

Reviewed: https://review.openstack.org/459387
Committed: https://git.openstack.org/cgit/openstack/fuel-library/commit/?id=0f27fc81a1cfab49647b09e9ff50f5d7d9f006c9
Submitter: Jenkins
Branch: stable/mitaka

commit 0f27fc81a1cfab49647b09e9ff50f5d7d9f006c9
Author: Alexey Stupnikov <email address hidden>
Date: Mon Apr 24 18:47:08 2017 +0300

    Remove duplicate logrotate targets

    The following duplicate logrotate targets were removed:

    - cobbler logs were removed from fuel.nodaily template since
      they fully duplicate targets shipped with cobbler package
    - httpd: same as above
    - nginx: same as above
    - rabbitmq: same as above
    - nailgun: a puppet template used to create separate logrotate
      configuration file for nailgun logs was modified to include
      all nailgun logs. Duplicate log target was removed from
      fuel.nodaily template.

    I have also removed old docker-logs targets to clean up the mess.

    Change-Id: Ie4129d1fd7dc35716530dfc3a78019e28c9d96d0
    Closes-bug: #1656305
    Closes-bug: #1631917

tags: added: in-stable-mitaka
Changed in fuel:
status: In Progress → Fix Committed
Vladimir Jigulin (vjigulin) wrote :

Verified on 9.2 + proposed

Without proposed:
[root@nailgun ~]# grep -r /var/log/nail /etc/logrotate.d
/etc/logrotate.d/nailgun:/var/log/nailgun/api.log
/etc/logrotate.d/nailgun:/var/log/nailgun/app.log
/etc/logrotate.d/fuel.nodaily:"/var/log/nailgun-agent.log"
/etc/logrotate.d/fuel.nodaily:"/var/log/nailgun/*.log"
[root@nailgun ~]# grep -r /var/log/cobb /etc/logrotate.d
/etc/logrotate.d/cobblerd:/var/log/cobbler/cobbler.log {
/etc/logrotate.d/cobblerd:/var/log/cobbler/tasks/*.log {
/etc/logrotate.d/cobblerd:/var/log/cobbler/install.log {
/etc/logrotate.d/fuel.nodaily:"/var/log/cobbler/*.log"

With proposed:
[root@nailgun ~]# grep -r /var/log/nail /etc/logrotate.d
/etc/logrotate.d/nailgun:/var/log/nailgun/*.log
/etc/logrotate.d/fuel.nodaily:"/var/log/nailgun-agent.log"
[root@nailgun ~]# grep -r /var/log/cobb /etc/logrotate.d
/etc/logrotate.d/cobblerd:/var/log/cobbler/cobbler.log {
/etc/logrotate.d/cobblerd:/var/log/cobbler/tasks/*.log {
/etc/logrotate.d/cobblerd:/var/log/cobbler/install.log {

Changed in fuel:
status: Fix Committed → Fix Released

Change abandoned by Alexey Stupnikov (<email address hidden>) on branch: stable/newton
Review: https://review.opendev.org/459391

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers