Project

General

Profile

Bug #19224

smart_proxy_dynflow_core.log not reopened during logrotate

Added by Jason Nance over 4 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

After the LogRotate script runs the old smart_proxy_dynflow_core.log file is held open by the Smart Proxy and is not reopened to start logging to the new file:

[root@sl2mmgplsat0001 ~]# lsof /var/log | grep deleted
ruby      121892 foreman-proxy    7w   REG  253,5      1043 1049919 /var/log/foreman-proxy/smart_proxy_dynflow_core.log-20170407 (deleted)
ruby      122001 foreman-proxy    7w   REG  253,5     13744 1049879 /var/log/foreman-proxy/proxy.log-20170407 (deleted)

[root@sl2mmgplsat0001 ~]# /bin/systemctl kill --signal=SIGUSR1 foreman-proxy

[root@sl2mmgplsat0001 ~]# wget -O- --no-check-certificate https://localhost:9090/version
--2017-04-06 16:42:23--  https://localhost:9090/version
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:9090... failed: Connection refused.
Connecting to localhost (localhost)|127.0.0.1|:9090... connected.
WARNING: no certificate subject alternative name matches
        requested host name ‘localhost’.
HTTP request sent, awaiting response... 200 OK
Length: 185 [application/json]
Saving to: ‘STDOUT’

 0% [                                       ] 0           --.-K/s              {"version":"1.13.4","modules":{"pulp":"1.3.0","openscap":"0.6.0","dynflow":"0.1.5","ssh":"0.1.4","tftp":"1.13.4","puppetca":"1.13.4","puppet":"1.13.4","realm":"1100%[======================================>] 185         --.-K/s   in 0.04s

2017-04-06 16:42:23 (4.60 KB/s) - written to stdout [185/185]

[root@sl2mmgplsat0001 ~]# lsof /var/log | grep deleted
ruby      121892 foreman-proxy    7w   REG  253,5      1043 1049919 /var/log/foreman-proxy/smart_proxy_dynflow_core.log-20170407 (deleted)

System is a CentOS 7 host with released updates as of 2017-4-7.

foreman-1.13.4-1.el7.noarch
katello-3.2.2-1.el7.noarch
logrotate-3.8.6-12.el7.x86_64
rubygem-smart_proxy_dynflow-0.1.5-1.el7.noarch


Related issues

Related to Smart Proxy - Bug #12295: Smart proxy stops listening on HTTPS port after log rotateClosed2015-10-23
Related to Packaging - Bug #19521: Smart_proxy_dynflow_core doesn't deploy its logrotate configClosed2017-05-11
Related to Packaging - Bug #21032: logrotate conflict: foreman-proxy and tfm-rubygem-smart_proxy_dynflow_coreClosed
Blocked by Foreman Remote Execution - Bug #19439: Smart proxy dynflow core uses wrong logger for webrickClosed2017-05-03
Copied from SELinux - Bug #19053: Proxy continues to write to deleted file after log rotationClosed

Associated revisions

Revision 0dd4556d (diff)
Added by adamruzicka over 4 years ago

Fixes #19224 - Reopen logs on SIGUSR1 (#30)

  • Fixes #19224 - Reopen logs on SIGUSR1

History

#1 Updated by Jason Nance over 4 years ago

  • Copied from Bug #19053: Proxy continues to write to deleted file after log rotation added

#2 Updated by Dominic Cleal over 4 years ago

  • Project changed from Smart Proxy to foreman-tasks

#3 Updated by Ivan Necas over 4 years ago

Thanks for reporting, the problem is the log-rotation is done on smart proxy, and the different services that log to the /var/log/foreman-proxy, are not notified about the rotation to reopen it's files. We need to add the link between the proxy and the next service to make sure we reopen the logger on smart proxy dynflow core.

#4 Updated by Ivan Necas over 4 years ago

  • Related to Bug #12295: Smart proxy stops listening on HTTPS port after log rotate added

#5 Updated by Ivan Necas over 4 years ago

  • Target version set to 1.12.4

#6 Updated by Adam Ruzicka over 4 years ago

  • Status changed from New to Assigned
  • Assignee set to Adam Ruzicka
  • Pull request https://github.com/theforeman/smart_proxy_dynflow/pull/30 added

#7 Updated by Ivan Necas over 4 years ago

  • Blocked by Bug #19439: Smart proxy dynflow core uses wrong logger for webrick added

#8 Updated by Anonymous over 4 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

#9 Updated by Ivan Necas over 4 years ago

  • Status changed from Closed to Assigned

Putting back to assigned as change on packaging side need to be done as well.

#10 Updated by Adam Ruzicka over 4 years ago

  • Project changed from foreman-tasks to Packaging

#11 Updated by The Foreman Bot over 4 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman-packaging/pull/1646 added

#12 Updated by Dominic Cleal over 4 years ago

  • Project changed from Packaging to foreman-tasks
  • Pull request deleted (https://github.com/theforeman/foreman-packaging/pull/1646)

#13 Updated by Adam Ruzicka over 4 years ago

  • Related to Bug #19521: Smart_proxy_dynflow_core doesn't deploy its logrotate config added

#14 Updated by Adam Ruzicka over 4 years ago

  • Status changed from Ready For Testing to Closed

#15 Updated by Lukas Zapletal about 4 years ago

  • Related to Bug #21032: logrotate conflict: foreman-proxy and tfm-rubygem-smart_proxy_dynflow_core added

#16 Updated by Ivan Necas over 3 years ago

  • Bugzilla link set to 1548098

Also available in: Atom PDF