-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable log file support #672
Enable log file support #672
Conversation
4b66990
to
754a504
Compare
Staging seems working and creating log files for pipeline services:
@nuclearcat Let me know if the file naming convention needs to be tweaked. |
@nuclearcat We also need to add some kind of purge service that will discard the log files older than some decided number of days. Otherwise, It will create storage issues on VM. |
ce9426c
to
28092c3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I must be missing something obvious - please help me understand:
Currently config/logger.conf
handles 11 services even though there are 16 overall [1]. Are the potentially missing ones (lava-callback, patchset, scheduler-{docker,k8s,lava}) already covered implicitly somehow?
I also don't get the convention for passing service name as an argument - it's used like that for schedulers, other services have it set by their constructor parameter or even hardcoded directly in the constructor (e.g. timeout-
s: 1, 2, 3).
Any additional pointers will be much appreciated.
[1] Compose files in use for staging deployment converted to a single configuration file for inspection:
$ docker-compose -f docker-compose.yaml -f docker-compose-kcidb.yaml -f docker-compose-lava.yaml -f docker-compose-production.yaml config > staging.yaml
Create a file handler to dump logs to files. Use stream and file handlers for all the pipeline services to redirect logs to both the streams including `stdout` and log file. Signed-off-by: Jeny Sadadia <jeny.sadadia@collabora.com>
As `notifier` service has been renamed to `monitor`, update its logger configurations accordingly. Also, add section for `result_summary` service. Signed-off-by: Jeny Sadadia <jeny.sadadia@collabora.com>
Create a directory named `logs` to dump log files to. Mount the directory for all the services in `docker-compose.yaml`. Signed-off-by: Jeny Sadadia <jeny.sadadia@collabora.com>
Fix the below error for `patchset` service: ``` FileNotFoundError: [Errno 2] No such file or directory: '/home/kernelci/logs/tarball_2024_07_04-06:24:16.log' ``` Signed-off-by: Jeny Sadadia <jeny.sadadia@collabora.com>
Add `name` docker argument to provide service name to scheduler services. Without it, all 4 container i.e `scheduler`, `scheduler-docker`, `scheduler-lava`, and `scheduler-k8s` were using the same log file. That was leading in-accessbility of log files and raised the below error: `PermissionError: [Errno 13] Permission denied: '/home/kernelci/logs/scheduler_2024_07_04-06:42:21.log'` Signed-off-by: Jeny Sadadia <jeny.sadadia@collabora.com>
Add logger config sections for remaining pipeline services. Signed-off-by: Jeny Sadadia <jeny.sadadia@collabora.com>
Hey,
Thanks for pointing this out. Whenever a logger section is not found with the particular name, it simply uses
For |
062e4a3
to
5099c67
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I was going to ask, is it going to work in kubernetes? as likely logs directory wont be created yet (it needs some changes in pipeline yaml specifications), as i planned production update today |
Oh, sorry. I already merged it. |
Just make sure fallback scenario - if directory doesn't exist - it should not crash service, and in such case it just wont log to file, only to console, for example, so i can plan log volume properly during this week. |
PR kernelci#672 introduced new mandatory option. Except docker-compose such options should be added to k8s manifests too. Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
PR #672 introduced new mandatory option. Except docker-compose such options should be added to k8s manifests too. Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
Closes kernelci/kernelci-project#334
Enable multiple log streams for
Logger
.Create a file handler to dump logs to files. Use stream and file handlers for all the pipeline services to redirect logs to both the streams including
stdout
and log file.Update the logger config file.