Incorrect cobbler's logrotate configuration

Bug #1656834 reported by Alexey Stupnikov on 2017-01-16
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
High
MOS Linux
Mitaka
High
MOS Linux
Newton
High
MOS Linux
Ocata
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
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)
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

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)

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

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

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

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

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

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

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

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

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

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

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

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

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

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.

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

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

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

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
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  Edit
Everyone can see this information.

Other bug subscribers