prod sync socorro logs to cm-vpn01:/var/log/clusterlogs

VERIFIED WONTFIX

Status

Socorro
General
--
minor
VERIFIED WONTFIX
8 years ago
6 years ago

People

(Reporter: ozten, Assigned: laura)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

8 years ago
Please sync the following logs from production to the shared logs storage.

webapp-php/application/logs/*.logs.php
scripts/*.log
This can't be done with application specific logs.  If you want app logs to go there, you will have to log stuff to syslog.  Please re-assign this to us when thats been done.
Assignee: server-ops → nobody
Component: Server Operations → Socorro
Product: mozilla.org → Webtools
QA Contact: mrz → socorro
Could you explain why this is impossible?

Comment 3

8 years ago
There are a few options:
1. Log to syslog (best option, because you'll get everything instantaneously)
2. We can run rsync on cron, so the logs will show up eventually
3. We can log directly to shared storage, but given how slow nfs is if there is even one write per request it could seriously impact pageload performance.

Wil has experience implementing syslog stuff if you want to go down that route.

Comment 4

8 years ago
If the app were using normal error_log facilities everything would just work. Why isn't the app just using http://us3.php.net/manual/en/function.error-log.php?
(Reporter)

Comment 5

8 years ago
(In reply to comment #3)
I don't think rsync lag will be a problem.

(In reply to comment #4)
We're using the Kohana php framework which does not use error_log. We want info, alert, and error level info for debugging production issue.

Comment 6

8 years ago
Kohana already made this really easy to do by adding a system.log event (http://dev.kohanaphp.com/projects/kohana2/repository/revisions/3557/diff/trunk/system/classes/kohana.php).

So the only app change you'd need is:

Event::add('system.log', 'log_function');
function log_function($msg) { error_log($msg); }

Comment 7

8 years ago
Comment 6 would be the best solution, because:
* you get the logs instantaneously
* we don't need to cron an rsync job
* all the kohana error levels will still work

Comment 8

8 years ago
Note you'd have to upgrade to at least 2.2.1.
if the python part of Socorro needs to do syslogging, it is available in the logging package: http://www.python.org/doc/2.4.3/lib/module-logging.html (look for SysLogHandler). Would require minor work to update and handle a config option
Hmmm. Wonder how terribad upgrading to 2.2.1 would be.  Will investigate.  Thanks oremj!
(In reply to comment #9)
> if the python part of Socorro needs to do syslogging, it is available in the
> logging package: http://www.python.org/doc/2.4.3/lib/module-logging.html (look
> for SysLogHandler). Would require minor work to update and handle a config
> option

It looks like this bug is about the kohana code.

(In reply to comment #10)
> Hmmm. Wonder how terribad upgrading to 2.2.1 would be.  Will investigate. 
> Thanks oremj!
Looks like you are at 2.2 right now, so it should be a really tiny bump.
Assignee: nobody → ozten.bugs
Target Milestone: --- → 1.5
Assignee: ozten.bugs → morgamic
Target Milestone: 1.5 → 1.6
Assignee: morgamic → laura
(Assignee)

Comment 12

8 years ago
Testing out the 2.2 -> 2.2.1 upgrade - it's not as trivial as I had hoped, the pg driver has been rewritten and a bunch of other stuff breaks.  Shouldn't be a big job I imagine, but morgamic says this one is ok to push to 1.7 so I'm doing that.
Target Milestone: 1.6 → 1.7
(Assignee)

Comment 13

8 years ago
The other thing I should mention is that 2.2.1 isn't current - I grabbed it from http://source.kohanaphp.com/svn/kohana2/tags/2.2.1/
but if we're going to spend slightly more time on this, we should upgrade to the newest (2.3.4) while we're at it.
(Reporter)

Comment 14

8 years ago
(In reply to comment #13)
Ya, we should shoot for 2.3.4. If it is much work, we should also evaluate the next version 3.0, currently under development.
(Assignee)

Updated

8 years ago
Depends on: 556828
(Assignee)

Comment 15

8 years ago
Depends on a 1.8 bug
Target Milestone: 1.7 → 1.8
(Assignee)

Comment 16

7 years ago
Blocker moved to 2.0; newer versions of Kohana don't have PG support.
Target Milestone: 1.8 → 2.0
(Assignee)

Comment 17

7 years ago
We can now log into prod to just look at these logs - wontfix.
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → WONTFIX
Component: Socorro → General
Product: Webtools → Socorro

Updated

6 years ago
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.