<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>16499</bug_id>
          
          <creation_ts>2026-11-14 07:16:24 +0000</creation_ts>
          <short_desc>RRS: update scripts fail at startup when TOOLS_LOG_DIR is not set</short_desc>
          <delta_ts>2026-11-15 00:46:32 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>Recipe Reporting System (RRS)</product>
          <component>Recipe Reporting System (RRS)</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>IN PROGRESS REVIEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>6.2 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tim Orling">tim.orling</reporter>
          <assigned_to name="Tim Orling">tim.orling</assigned_to>
          
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>107444</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2026-11-14 07:16:24 +0000</bug_when>
    <thetext>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 &quot;/opt/layerindex/rrs/tools/common.py&quot;, line 39, in get_logger
    handler = RotatingFileHandler(filename, maxBytes=maxBytes)
  PermissionError: [Errno 13] Permission denied: &apos;/opt/layerindex/UpstreamHistory&apos;

get_logger() always adds a log file at os.path.join(settings.TOOLS_LOG_DIR, name), but TOOLS_LOG_DIR is &quot;&quot; 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107459</commentid>
    <comment_count>1</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2026-11-15 00:46:32 +0000</bug_when>
    <thetext>Patch 1/6 of the series sent to yocto-patches, under review:
https://lore.kernel.org/all/20261115003506.53654-1-tim.orling@konsulko.com/</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>