Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1548098 - After logrotate the smart_proxy_dynflow_core service points to the deleted/orphan log file which results into current log being empty and hence not rotating log further
Summary: After logrotate the smart_proxy_dynflow_core service points to the deleted/or...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Remote Execution
Version: 6.2.13
Hardware: x86_64
OS: Linux
urgent
high
Target Milestone: 6.4.0
Assignee: satellite6-bugs
QA Contact: Nikhil Kathole
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-22 17:33 UTC by Gauravi
Modified: 2021-12-10 15:42 UTC (History)
7 users (show)

Fixed In Version: rubygem-smart_proxy_dynflow-0.2.1-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-16 19:12:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 19224 0 Normal Closed smart_proxy_dynflow_core.log not reopened during logrotate 2020-08-21 13:46:29 UTC
Foreman Issue Tracker 24821 0 Normal Closed Smart proxy dynflow core should reopen logfiles immediately after log rotation 2020-08-21 13:46:30 UTC
Red Hat Bugzilla 1459686 0 medium CLOSED logrorate complains on duplicate log entry for /var/log/foreman-proxy/smart_proxy_dynflow_core.log 2021-02-22 00:41:40 UTC
Red Hat Knowledge Base (Solution) 3433771 0 None None None 2018-05-07 08:37:41 UTC

Internal Links: 1459686

Description Gauravi 2018-02-22 17:33:11 UTC
Description of problem:
/var/log/foreman-proxy/smart_proxy_dynflow_core.log does not get rotated without manually restarting the service.

This behaviour is observed when log file is open even after getting deleted and archived post log rotation. 
System points to this deleted open log file and does not point to the newly generated log file to write further logs hence no logs getting written in newly generated log file. Which results into newly generated log file being an empty forever and empty log file does not get rotated so log rotation is stopped. After manually restarting the service, system then starts pointing to newly generated log file and then things starts behaving in a way they should be.

Version-Release number of selected component (if applicable):
Satellite 6.2.13

How reproducible:
Always

Steps to Reproduce:
1. See the running process for smart_proxy, list of open files that process is accessing and available log files under /var/log/foreman-proxy directory:
# ps -ewwf | grep smart_proxy
root      1926  1908  0 17:13 pts/3    00:00:00 grep --color=auto smart_proxy
foreman+ 22177     1  0 Feb16 ?        00:00:11 ruby /usr/bin/smart_proxy_dynflow_core -d -p /var/run/foreman-proxy/smart_proxy_dynflow_core.pid

# lsof -p  22177 | grep log
ruby    22177 foreman-proxy    7w   REG    253,0         0 498779190 /var/log/foreman-proxy/smart_proxy_dynflow_core.log

# ll /var/log/foreman-proxy/ | grep smart_proxy
-rw-r--r--. 1 foreman-proxy foreman-proxy    77 Feb 15 03:33 smart_proxy_dynflow_core.log
-rw-r--r--. 1 foreman-proxy foreman-proxy  366 Jan 15 10:40 smart_proxy_dynflow_core.log-20180116.gz
-rw-r--r--. 1 foreman-proxy foreman-proxy  367 Jan 26 16:04 smart_proxy_dynflow_core.log-20180127.gz
-rw-r--r--. 1 foreman-proxy foreman-proxy 1552 Jan 31 02:01 smart_proxy_dynflow_core.log-20180131.gz
-rw-r--r--. 1 foreman-proxy foreman-proxy  332 Feb  6 17:17 smart_proxy_dynflow_core.log-20180207.gz



2. Rotate the complete log manually and can see that current file got archived and deleted and new empty log file has been generated again as smart_proxy_dynflow_core.log, till this point everything is as expected:
#  logrotate /etc/logrotate.conf  -f 

# ll /var/log/foreman-proxy/ | grep smart_proxy
-rw-r--r--. 1 foreman-proxy foreman-proxy    0 Feb 16 03:33 smart_proxy_dynflow_core.log
-rw-r--r--. 1 foreman-proxy foreman-proxy  366 Jan 15 10:40 smart_proxy_dynflow_core.log-20180116.gz
-rw-r--r--. 1 foreman-proxy foreman-proxy  367 Jan 26 16:04 smart_proxy_dynflow_core.log-20180127.gz
-rw-r--r--. 1 foreman-proxy foreman-proxy 1552 Jan 31 02:01 smart_proxy_dynflow_core.log-20180131.gz
-rw-r--r--. 1 foreman-proxy foreman-proxy  332 Feb  6 17:17 smart_proxy_dynflow_core.log-20180207.gz
-rw-r--r--. 1 foreman-proxy foreman-proxy   77 Feb 15 23:11 smart_proxy_dynflow_core.log-20180216.gz


3. Newly generated smart_proxy_dynflow_core.log log file will be empty. No logs getting written in current file even after some tasks have been performed. 
   A bad/fake request can be done to check the same. Ex: run command # wget --no-check-certificate https://localhost:8008/
   Current log file will continue to be empty even after bad actions performed which should actually end up generating bunch of lines in current log file.
# wget --no-check-certificate https://localhost:8008/

# ll /var/log/foreman-proxy/ | grep smart_proxy
-rw-r--r--. 1 foreman-proxy foreman-proxy    0 Feb 16 03:33 smart_proxy_dynflow_core.log                                                        <<<<< Current log file is empty whereas it should be written with logs
-rw-r--r--. 1 foreman-proxy foreman-proxy  366 Jan 15 10:40 smart_proxy_dynflow_core.log-20180116.gz
-rw-r--r--. 1 foreman-proxy foreman-proxy  367 Jan 26 16:04 smart_proxy_dynflow_core.log-20180127.gz
-rw-r--r--. 1 foreman-proxy foreman-proxy 1552 Jan 31 02:01 smart_proxy_dynflow_core.log-20180131.gz
-rw-r--r--. 1 foreman-proxy foreman-proxy  332 Feb  6 17:17 smart_proxy_dynflow_core.log-20180207.gz
-rw-r--r--. 1 foreman-proxy foreman-proxy   77 Feb 15 23:11 smart_proxy_dynflow_core.log-20180216.gz


4. smart_proxy_dynflow_core service is referring to previously deleted log file to write the logs instead of current log file.
# lsof -p  22177 | grep log
ruby    22177 foreman-proxy    7w   REG    253,0        77 498779190 /var/log/foreman-proxy/smart_proxy_dynflow_core.log.20180216 (deleted)     <<<<< Deleted file is still referred to write logs instead of newly generated log file 
                                                                                                                                                      which results into current log file being empty forever


5. Restart the smart_proxy service and again make a bad request to deliberately generate the logs to confirm messages are getting logged in the log file and current file is getting referred to write the log and not deleted one.
# wget --no-check-certificate https://localhost:8008/

# ll /var/log/foreman-proxy/ | grep smart_proxy
-rw-r--r--. 1 foreman-proxy foreman-proxy    60 Feb 16 03:33 smart_proxy_dynflow_core.log                                                       <<<<< Current log file is started filling with logs
-rw-r--r--. 1 foreman-proxy foreman-proxy  366 Jan 15 10:40 smart_proxy_dynflow_core.log-20180116.gz
-rw-r--r--. 1 foreman-proxy foreman-proxy  367 Jan 26 16:04 smart_proxy_dynflow_core.log-20180127.gz
-rw-r--r--. 1 foreman-proxy foreman-proxy 1552 Jan 31 02:01 smart_proxy_dynflow_core.log-20180131.gz
-rw-r--r--. 1 foreman-proxy foreman-proxy  332 Feb  6 17:17 smart_proxy_dynflow_core.log-20180207.gz
-rw-r--r--. 1 foreman-proxy foreman-proxy   77 Feb 15 23:11 smart_proxy_dynflow_core.log-20180216.gz

# ps -ewwf | grep smart_proxy
root      1926  1908  0 17:13 pts/3    00:00:00 grep --color=auto smart_proxy
foreman+ 32167     1  0 Feb16 ?        00:00:11 ruby /usr/bin/smart_proxy_dynflow_core -d -p /var/run/foreman-proxy/smart_proxy_dynflow_core.pid

# lsof -p  321617 | grep log
ruby    32167 foreman-proxy    7w   REG    253,0         0 498779190 /var/log/foreman-proxy/smart_proxy_dynflow_core.log                        <<<<< Current log file getting referred to write the logs which is expected



Actual results:
Deleted file is still being referred by the smart_proxy_dynflow_core service and actual log file "smart_proxy_dynflow_core.log" remain blank. 


Expected results:
After log rotation the smart_proxy_dynflow_core service should point to the newly generated log file to write the logs instead of pointing to the deleted/orphan file after it gets archived post log rotation. 


Additional info:

Comment 3 Ivan Necas 2018-02-27 08:51:54 UTC
Connecting redmine issue http://projects.theforeman.org/issues/19224 from this bug

Comment 4 Ivan Necas 2018-02-27 08:53:15 UTC
This has been fixed in upstream and the fix has been delivered as part of the 6.3 release.

Comment 5 Ashish Humbe 2018-02-27 09:56:55 UTC
The issue still persists on Satellite v 6.3 GA, so reopening bugzilla. 

Here are the details from the local reproducer:

# ps -elf | grep smart_proxy
1 S foreman+  7953     1  0  80   0 - 237608 poll_s Feb22 ?       00:00:37 ruby /usr/bin/smart_proxy_dynflow_core -d -p /var/run/foreman-proxy/smart_proxy_dynflow_core.pid
0 S root     24849 14111  0  80   0 - 28166 pipe_w 15:22 pts/0    00:00:00 grep --color=auto smart_proxy

# lsof -p 7953 | grep smart_proxy
ruby    7953 foreman-proxy    7w   REG    253,0       141   1225171 /var/log/foreman-proxy/smart_proxy_dynflow_core.log

# ll /var/log/foreman-proxy
total 8
-rw-r--r--. 1 foreman-proxy foreman-proxy    0 Feb 22 19:30 cron.log
-rw-r--r--. 1 foreman-proxy foreman-proxy    0 Feb 23 03:19 proxy.log
-rw-r--r--. 1 foreman-proxy foreman-proxy 2625 Feb 22 19:05 proxy.log-20180223.gz
-rw-r--r--. 1 foreman-proxy foreman-proxy  141 Feb 27 15:22 smart_proxy_dynflow_core.log


# logrotate -f /etc/logrotate.conf 


# ll /var/log/foreman-proxy
total 8
-rw-r--r--. 1 foreman-proxy foreman-proxy    0 Feb 22 19:30 cron.log
-rw-r--r--. 1 foreman-proxy foreman-proxy    0 Feb 23 03:19 proxy.log
-rw-r--r--. 1 foreman-proxy foreman-proxy 2625 Feb 22 19:05 proxy.log-20180223.gz
-rw-r--r--. 1 foreman-proxy foreman-proxy    0 Feb 27 15:23 smart_proxy_dynflow_core.log
-rw-r--r--. 1 foreman-proxy foreman-proxy  144 Feb 27 15:22 smart_proxy_dynflow_core.log-20180227.gz

# lsof -p 7953 | grep smart_proxy
ruby    7953 foreman-proxy    7w   REG    253,0       141   1225171 /var/log/foreman-proxy/smart_proxy_dynflow_core.log-20180227 (deleted)

Comment 6 Ashish Humbe 2018-02-27 10:10:22 UTC
Installed packages on Sat6.3: 

satellite-6.3.0-23.0.el7sat.noarch
tfm-rubygem-smart_proxy_dynflow_core-0.1.10-1.fm1_15.el7sat.noarch

Comment 7 Satellite Program 2018-02-27 11:08:11 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/19224 has been resolved.

Comment 8 Ivan Necas 2018-02-28 09:08:16 UTC
The verification step you used is not correct: the process is informed about the need for re-opening the file, but it happens at the first attempt to writing to the file, rather than automatically (due to thread-safe reasons).

To finish the verification steps, one can simulate a request to the process like this:

curl -k --key /etc/foreman-proxy/foreman_ssl_key.pem --cert /etc/foreman-proxy/foreman_ssl_cert.pem https://localhost:8008/console

And then verify the lsof again.

@Ashish - can you verify this and in case it works, put it back to closed/current release?

Comment 9 Ashish Humbe 2018-04-25 14:18:03 UTC
Hi Ivan, 

I checked today on my local satellite and I see that the log files are not getting rotated properly for smart_proxy_dynflow_core because of the issue reported here.

Below is the output from my local Satellite v 6.3.1: 

- The smart_proxy_dynflow_core service was last time restarted on 20 April and till 25 April there are no logs generated because the process is still referring to the incorrect log file and since 21 April there are no logs rotated. 

# ps -elf | grep smart_proxy
1 S foreman+ 22294     1  0  80   0 - 64330 poll_s Apr20 ?        00:00:40 ruby /usr/bin/smart_proxy_dynflow_core -d -p /var/run/foreman-proxy/smart_proxy_dynflow_core.pid


# lsof -p 22294 | grep smart_proxy
ruby    22294 foreman-proxy    7w   REG     253,0      1041   1083571 /var/log/foreman-proxy/smart_proxy_dynflow_core.log-20180421 (deleted)


# ll -h /var/log/foreman-proxy/smart_proxy_dynflow_core.log*
-rw-r--r--. 1 foreman-proxy foreman-proxy   0 Apr 21 03:48 /var/log/foreman-proxy/smart_proxy_dynflow_core.log
-rw-r--r--. 1 foreman-proxy foreman-proxy 144 Feb 27 15:22 /var/log/foreman-proxy/smart_proxy_dynflow_core.log-20180227.gz
-rw-r--r--. 1 foreman-proxy foreman-proxy 476 Mar 21 20:34 /var/log/foreman-proxy/smart_proxy_dynflow_core.log-20180322.gz
-rw-r--r--. 1 foreman-proxy foreman-proxy 336 Apr 12 20:06 /var/log/foreman-proxy/smart_proxy_dynflow_core.log-20180413.gz
-rw-r--r--. 1 foreman-proxy foreman-proxy 390 Apr 16 18:44 /var/log/foreman-proxy/smart_proxy_dynflow_core.log-20180417.gz
-rw-r--r--. 1 foreman-proxy foreman-proxy 335 Apr 20 19:46 /var/log/foreman-proxy/smart_proxy_dynflow_core.log-20180421.gz

- As suggested I tried to run the command followed by the lsof command, there is no change. 

# curl -k --key /etc/foreman-proxy/foreman_ssl_key.pem --cert /etc/foreman-proxy/foreman_ssl_cert.pem https://localhost:8008/console
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="icon" href="https://localhost:8008/console/images/logo-square.png" type="image/x-icon">

    <title>Dynflow Console</title>

    <link rel="stylesheet" type="text/css" href="https://localhost:8008/console/vendor/bootstrap/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="https://localhost:8008/console/stylesheets/application.css">

    <script src="https://localhost:8008/console/vendor/jquery/jquery.js"></script>
    <script src="https://localhost:8008/console/vendor/bootstrap/js/bootstrap.js"></script>
    <script src="https://localhost:8008/console/javascripts/application.js"></script>
</head>
<body>

<nav class="navbar navbar-inverse navbar-fixed-top">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
                    aria-expanded="false" aria-controls="navbar">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="https://localhost:8008/console/">
              <img src="https://localhost:8008/console/images/logo-square.png"/>
              Dynflow
            </a>
        </div>
        <div id="navbar" class="collapse navbar-collapse">
            <ul class="nav navbar-nav">
              <li><a href="https://localhost:8008/console/">Execution plans</a></li>
              <li><a href="https://localhost:8008/console/status">Status</a></li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
            </ul>
        </div>
    </div>
</nav>

<div class="container">

  <div class="row">
    <h1>Listing execution plans</h1>

<form action="https://localhost:8008/console/" method="GET">
  <p>state: <input type="checkbox" name="filters[state][]" value="pending" checked/>pending <input type="checkbox" name="filters[state][]" value="scheduled" checked/>scheduled <input type="checkbox" name="filters[state][]" value="planning" checked/>planning <input type="checkbox" name="filters[state][]" value="planned" checked/>planned <input type="checkbox" name="filters[state][]" value="running" checked/>running <input type="checkbox" name="filters[state][]" value="paused" checked/>paused <input type="checkbox" name="filters[state][]" value="stopped" />stopped</p>
  <input type="submit" value="Filter"/>
</form>

<table class="table">
  <thead>
    <tr>
      <th>Id</th>
      <th><a href="https://localhost:8008/console/?order_by=label&desc=false">  Label</a></th>
      <th><a href="https://localhost:8008/console/?order_by=state&desc=false">  State</a></th>
      <th><a href="https://localhost:8008/console/?order_by=result&desc=false">  Result</a></th>
      <th><a href="https://localhost:8008/console/?order_by=started_at&desc=false"> &#9660; Started at</a></th>
      <th></th>
    </tr>
  </thead>

</table>
  <ul class="pagination">
    <li><a href="https://localhost:8008/console/?page=0">&laquo; Prev</a></li>
    <li><a href="https://localhost:8008/console/?page=1">Next &raquo;</a></li>
  </ul>

  </div>
</div>
</body>
</html>



# lsof -p 22294 | grep smart_proxy
ruby    22294 foreman-proxy    7w   REG     253,0      1115   1083571 /var/log/foreman-proxy/smart_proxy_dynflow_core.log-20180421 (deleted)

Comment 10 jcallaha 2018-06-21 20:21:58 UTC
Verified in Satellite 6.4 Snap 8. After log rotate, the correct log file is being written to.

-bash-4.2# ll /var/log/foreman-proxy/ | grep smart_proxy
-rw-r--r--. 1 foreman-proxy foreman-proxy   21 Jun 21 15:56 smart_proxy_dynflow_core.log
-rw-r--r--. 1 foreman-proxy foreman-proxy  113 Jun 18 10:21 smart_proxy_dynflow_core.log-20180619.gz


-bash-4.2# logrotate /etc/logrotate.conf  -f


-bash-4.2# ll /var/log/foreman-proxy/ | grep smart_proxy
-rw-r--r--. 1 foreman-proxy foreman-proxy    0 Jun 21 15:57 smart_proxy_dynflow_core.log
-rw-r--r--. 1 foreman-proxy foreman-proxy  113 Jun 18 10:21 smart_proxy_dynflow_core.log-20180619.gz
-rw-r--r--. 1 foreman-proxy foreman-proxy   39 Jun 21 15:56 smart_proxy_dynflow_core.log-20180621.gz


-bash-4.2# wget --no-check-certificate https://localhost:8008/
--2018-06-21 16:18:26--  https://localhost:8008/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:8008... failed: Connection refused.
Connecting to localhost (localhost)|127.0.0.1|:8008... connected.
WARNING: no certificate subject alternative name matches
	requested host name ‘localhost’.
HTTP request sent, awaiting response... 403 Forbidden
2018-06-21 16:18:27 ERROR 403: Forbidden.


-bash-4.2# ll /var/log/foreman-proxy/ | grep smart_proxy
-rw-r--r--. 1 foreman-proxy foreman-proxy  142 Jun 21 16:18 smart_proxy_dynflow_core.log
-rw-r--r--. 1 foreman-proxy foreman-proxy  113 Jun 18 10:21 smart_proxy_dynflow_core.log-20180619.gz
-rw-r--r--. 1 foreman-proxy foreman-proxy   39 Jun 21 15:56 smart_proxy_dynflow_core.log-20180621.gz


-bash-4.2# curl -k --key /etc/foreman-proxy/foreman_ssl_key.pem --cert /etc/foreman-proxy/foreman_ssl_cert.pem https://localhost:8008/console
<html>
... <snipped> ...
</html>


-bash-4.2# ll /var/log/foreman-proxy/ | grep smart_proxy
-rw-r--r--. 1 foreman-proxy foreman-proxy  216 Jun 21 16:19 smart_proxy_dynflow_core.log
-rw-r--r--. 1 foreman-proxy foreman-proxy  113 Jun 18 10:21 smart_proxy_dynflow_core.log-20180619.gz
-rw-r--r--. 1 foreman-proxy foreman-proxy   39 Jun 21 15:56 smart_proxy_dynflow_core.log-20180621.gz

Comment 18 Patrick Creech 2018-09-24 14:43:11 UTC
snap 23, not 63

Comment 19 Nikhil Kathole 2018-09-25 09:21:58 UTC
VERIFIED

Version tested:
Satellite 6.4 snap 23

# ll /var/log/foreman-proxy/ | grep smart_proxy
-rw-r--r--. 1 foreman-proxy foreman-proxy    0 Sep 25 03:36 smart_proxy_dynflow_core.log
-rw-r--r--. 1 foreman-proxy foreman-proxy  325 Sep 22 13:11 smart_proxy_dynflow_core.log-20180923.gz
-rw-r--r--. 1 foreman-proxy foreman-proxy  260 Sep 24 03:16 smart_proxy_dynflow_core.log-20180924.gz
# ps -elf | grep smart_proxy
1 S foreman+  68199      1  0  80   0 - 1165214 poll_s 03:36 ?      00:00:00 ruby /usr/bin/smart_proxy_dynflow_core -d -p /var/run/foreman-proxy/smart_proxy_dynflow_core.pid
0 S root      69009  57650  0  80   0 - 28176 pipe_w 03:42 pts/0    00:00:00 grep --color=auto smart_proxy
# lsof -p 68199 | grep smart_proxy
ruby    68199 foreman-proxy    9w   REG   253,0         0 637670876 /var/log/foreman-proxy/smart_proxy_dynflow_core.log

Tested scenarios:

1. WHEN Log file is empty, logrorate wont make changes.

# tail /var/log/foreman-proxy/smart_proxy_dynflow_core.log

# logrotate /etc/logrotate.conf  -f 
# lsof -p 68199 | grep smart_proxy
ruby    68199 foreman-proxy    9w   REG   253,0         0 637670876 /var/log/foreman-proxy/smart_proxy_dynflow_core.log
# ll /var/log/foreman-proxy/ | grep smart_proxy
-rw-r--r--. 1 foreman-proxy foreman-proxy    0 Sep 25 03:36 smart_proxy_dynflow_core.log
-rw-r--r--. 1 foreman-proxy foreman-proxy  325 Sep 22 13:11 smart_proxy_dynflow_core.log-20180923.gz
-rw-r--r--. 1 foreman-proxy foreman-proxy  260 Sep 24 03:16 smart_proxy_dynflow_core.log-20180924.gz

2. WHEN log file is not empty and performed logrotate, created new empty smart_proxy_dynflow_core.log and log points to correct location.

# tail /var/log/foreman-proxy/smart_proxy_dynflow_core.log127.0.0.1 - - [25/Sep/2018:03:46:02 EDT] "GET /console HTTP/1.1" 200 3433

# logrotate /etc/logrotate.conf  -f
# lsof -p 68199 | grep smart_proxy
ruby    68199 foreman-proxy    9w   REG   253,0         0 637671073 /var/log/foreman-proxy/smart_proxy_dynflow_core.log
# ll /var/log/foreman-proxy/ | grep smart_proxy
-rw-r--r--. 1 foreman-proxy foreman-proxy    0 Sep 25 03:46 smart_proxy_dynflow_core.log
-rw-r--r--. 1 foreman-proxy foreman-proxy  325 Sep 22 13:11 smart_proxy_dynflow_core.log-20180923.gz
-rw-r--r--. 1 foreman-proxy foreman-proxy  260 Sep 24 03:16 smart_proxy_dynflow_core.log-20180924.gz
-rw-r--r--. 1 foreman-proxy foreman-proxy   91 Sep 25 03:46 smart_proxy_dynflow_core.log-20180925.gz


3. Performing again logrotate, wont make any changes as smart_proxy_dynflow_core.log was empty and points to correct location.
# logrotate /etc/logrotate.conf  -f
# lsof -p 68199 | grep smart_proxy
ruby    68199 foreman-proxy    9w   REG   253,0        74 637671073 /var/log/foreman-proxy/smart_proxy_dynflow_core.log

4. If .gz file already exists for same day, and performed logroate it wont create new file/update existing smart_proxy_dynflow_core.log.

5. Destructive test: Removed smart_proxy_dynflow_core.log

# lsof -p 68199 | grep smart_proxy
ruby    68199 foreman-proxy    9w   REG   253,0        74 637671073 /var/log/foreman-proxy/smart_proxy_dynflow_core.log (deleted)

# logrotate /etc/logrotate.conf  -f
# lsof -p 68199 | grep smart_proxy
ruby    68199 foreman-proxy    9w   REG   253,0        74 637671073 /var/log/foreman-proxy/smart_proxy_dynflow_core.log (deleted)

In this case, performing logrotate wont help, servce restart is needed.

Comment 21 Bryan Kearney 2018-10-16 19:12:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:2927


Note You need to log in before you can comment on or make changes to this bug.