| Summary: |
RRS: update scripts fail at startup when TOOLS_LOG_DIR is not set |
| Product: |
[Yocto Project Subprojects] Recipe Reporting System (RRS)
|
Reporter: |
Tim Orling <tim.orling> |
| Component: |
Recipe Reporting System (RRS) | Assignee: |
Tim Orling <tim.orling> |
| Status: |
IN PROGRESS REVIEW
---
|
QA Contact: |
|
| Severity: |
normal
|
|
|
| Priority: |
Medium+
|
|
|
| Version: |
unspecified | |
|
| Target Milestone: |
6.2 M2 | |
|
| Hardware: |
x86 | |
|
| OS: |
Multiple | |
|
| Whiteboard: |
|
|
OS type for building Yocto:
|
---
|
Type of Regression:
|
---
|
|
Verified:
|
|
Documentation change:
|
Don't know
|
All the RRS update scripts that use rrs/tools/common.py:get_logger() (rrs_maintainer_history.py, rrs_upgrade_history.py, rrs_upstream_history.py, rrs_distros.py, rrs_upstream_email.py) fail as soon as they start in the Docker image: File "/opt/layerindex/rrs/tools/common.py", line 39, in get_logger handler = RotatingFileHandler(filename, maxBytes=maxBytes) PermissionError: [Errno 13] Permission denied: '/opt/layerindex/UpstreamHistory' get_logger() always adds a log file at os.path.join(settings.TOOLS_LOG_DIR, name), but TOOLS_LOG_DIR is "" in both settings.py and docker/settings.py, so the file is created in the current directory. In the Docker image that is /opt/layerindex, which belongs to root, while the scripts run as the layers user. On a test instance this made the daily RRS update fail within a second every day without updating anything. Separately, on layers.openembedded.org the RRS pages show no upstream status for any milestone from 5.3 M1 onwards (all 0%), and in a copy of its database the latest RecipeUpstreamHistory is from 2024-12-28 and the latest RecipeUpgrade from 2025-06-16, while RecipeMaintainerHistory is current. That may have a different cause; I will add what I find once these scripts run. Fix: when TOOLS_LOG_DIR is not set, only log to the console (which systemd, cron or docker logs collect) instead of writing a file into the current directory.