Incorrect cobbler's logrotate configuration

Bug #1656834 reported by Alexey Stupnikov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
High
MOS Linux
Mitaka
Fix Released
High
MOS Linux
Newton
Fix Released
High
MOS Linux
Ocata
Fix Committed
High
MOS Linux

Bug Description

There is incorrect postrotate script in /etc/logrotate.d/cobblerd file:

   postrotate
      if [ -f /var/lock/subsys/cobblerd ]; then
         /etc/init.d/cobblerd condrestart > /dev/null
      fi
   endscript

It looks like we need to use another approach to restart cobblerd after logs are rotated.

Affected packages:
- cobbler-2.6.9-1.el7~mos12.noarch
- cobbler-2.6.9-1.el7~mos11.noarch

description: updated
Revision history for this message
Vitaly Sedelnik (vsedelnik) wrote :

Alexey, please provide expected and actual result. Why we need to use another approach?

Changed in fuel:
status: New → Incomplete
assignee: MOS Linux (mos-linux) → Alexey Stupnikov (astupnikov)
Revision history for this message
Alexey Stupnikov (astupnikov) wrote :

We switched from init scripts to systemd. There is no /etc/init.d/cobblerd file in recent MOS releases. This command doesn't work:

[root@localhost ~]# /etc/init.d/cobblerd condrestart > /dev/null
-bash: /etc/init.d/cobblerd: No such file or directory

Revision history for this message
Alexey Stupnikov (astupnikov) wrote :

Moving back to Confirmed, assigning to linux team.

Changed in fuel:
status: Incomplete → Confirmed
assignee: Alexey Stupnikov (astupnikov) → MOS Linux (mos-linux)
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix proposed to packages/centos7/cobbler (9.0)

Fix proposed to branch: 9.0
Change author: Ivan Suzdal <email address hidden>
Review: https://review.fuel-infra.org/30239

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix proposed to packages/centos7/cobbler (10.0/newton)

Fix proposed to branch: 10.0/newton
Change author: Ivan Suzdal <email address hidden>
Review: https://review.fuel-infra.org/30240

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix proposed to packages/centos7/cobbler (master)

Fix proposed to branch: master
Change author: Ivan Suzdal <email address hidden>
Review: https://review.fuel-infra.org/30241

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Change abandoned on packages/centos7/cobbler (10.0/newton)

Change abandoned by Ivan Suzdal <email address hidden> on branch: 10.0/newton
Review: https://review.fuel-infra.org/30240

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Change restored on packages/centos7/cobbler (10.0/newton)

Change restored by Ivan Suzdal <email address hidden> on branch: 10.0/newton
Review: https://review.fuel-infra.org/30240

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Change abandoned on packages/centos7/cobbler (9.0)

Change abandoned by Ivan Suzdal <email address hidden> on branch: 9.0
Review: https://review.fuel-infra.org/30239

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Change restored on packages/centos7/cobbler (9.0)

Change restored by Ivan Suzdal <email address hidden> on branch: 9.0
Review: https://review.fuel-infra.org/30239

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Change abandoned on packages/centos7/cobbler (10.0/newton)

Change abandoned by Ivan Suzdal <email address hidden> on branch: 10.0/newton
Review: https://review.fuel-infra.org/30240

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix proposed to packages/centos7/cobbler (10.0/newton)

Fix proposed to branch: 10.0/newton
Change author: Ivan Suzdal <email address hidden>
Review: https://review.fuel-infra.org/30256

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Change abandoned on packages/centos7/cobbler (10.0/newton)

Change abandoned by Ivan Suzdal <email address hidden> on branch: 10.0/newton
Review: https://review.fuel-infra.org/30256

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Change restored on packages/centos7/cobbler (10.0/newton)

Change restored by Ivan Suzdal <email address hidden> on branch: 10.0/newton
Review: https://review.fuel-infra.org/30256

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix merged to packages/centos7/cobbler (9.0)

Reviewed: https://review.fuel-infra.org/30239
Submitter: Pkgs Jenkins <email address hidden>
Branch: 9.0

Commit: 66a437ca4139431a48168f9b0b1addbc81bec2b7
Author: Ivan Suzdal <email address hidden>
Date: Mon Feb 13 17:53:35 2017

Fix logrotate postrotate command

Change-Id: Ia562039084c23756bf1aa6745e9232f688486087
Closes-Bug: #1656834

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix proposed to packages/centos7/cobbler (10.0/newton)

Fix proposed to branch: 10.0/newton
Change author: Ivan Suzdal <email address hidden>
Review: https://review.fuel-infra.org/31018

Revision history for this message
Alexey Stupnikov (astupnikov) wrote :

There is a blocking bug #1664635 that locks review process. Ivan will push patches to newton and master as soon as blocker will be fixed.

Revision history for this message
Alexey Stupnikov (astupnikov) wrote :
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix merged to packages/centos7/cobbler (master)

Reviewed: https://review.fuel-infra.org/30241
Submitter: Pkgs Jenkins <email address hidden>
Branch: master

Commit: 5b50bdc3accde46a6856e683a6ac286a021f1720
Author: Ivan Suzdal <email address hidden>
Date: Mon Feb 27 13:50:30 2017

Fix logrotate postrotate command

Change-Id: I86cfc57953ed9748875b6e23a924b73384e0ea38
Closes-Bug: #1656834

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Change abandoned on packages/centos7/cobbler (10.0/newton)

Change abandoned by Alexey Stupnikov <email address hidden> on branch: 10.0/newton
Review: https://review.fuel-infra.org/31018
Reason: duplicate

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix merged to packages/centos7/cobbler (10.0/newton)

Reviewed: https://review.fuel-infra.org/30256
Submitter: Pkgs Jenkins <email address hidden>
Branch: 10.0/newton

Commit: 48684761ab35c252f516e5b75b16ef387e2e7a99
Author: Ivan Suzdal <email address hidden>
Date: Mon Feb 27 13:50:49 2017

Fix logrotate postrotate command

Change-Id: I86cfc57953ed9748875b6e23a924b73384e0ea38
Closes-Bug: #1656834

tags: added: on-verification
Revision history for this message
TatyanaGladysheva (tgladysheva) wrote :

Verified on 9.2 + MU1 updates.

Actual results:
Currently postrotate script is correct in /etc/logrotate.d/cobblerd file:
   postrotate
      systemctl try-restart cobblerd
   endscript

tags: removed: on-verification
Revision history for this message
Ilya Bumarskov (ibumarskov) wrote :

Verified on Fuel 10 build #1575:

[root@nailgun ~]# cat /etc/logrotate.d/cobblerd
/var/log/cobbler/cobbler.log {
   missingok
   notifempty
   rotate 4
   weekly
   postrotate
      systemctl try-restart cobblerd
   endscript
}
...

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.