Uploaded image for project: 'R10K'
  1. R10K
  2. RK-319

R10k Does not clean up tmp directories when downloading forge modules

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: r10k 2.6.2
    • Fix Version/s: None
    • Component/s: None
    • Environment:

      R10k using forge modules

    • Template:
    • Acceptance Criteria:
      Hide

      The temp folders have been cleaned up.

      Show
      The temp folders have been cleaned up.
    • Team:
      Froyo
    • Method Found:
      Customer Feedback
    • CS Priority:
      Reviewed
    • Zendesk Ticket IDs:
      39421,41902
    • Zendesk Ticket Count:
      2
    • QA Risk Assessment:
      Needs Assessment

      Description

      When using r10k to deploy forge modules, it does not clean up the temporary directories that are created during the download of the module. This can result in thousands of empty folders being created in `/tmp` and could result in inode exhaustion over a long period of time.

      The temporary directory is created in https://github.com/puppetlabs/r10k/blob/master/lib/r10k/forge/module_release.rb#L61. The archive is moved to the cache in https://github.com/puppetlabs/r10k/blob/master/lib/r10k/forge/module_release.rb#L99, but the temp folder is not removed at https://github.com/puppetlabs/r10k/blob/master/lib/r10k/forge/module_release.rb#L190 because @download_path = Pathname.new(Dir.mktmpdir) + (tarball_name) and @unpack_path = Pathname.new(Dir.mktmpdir) + @forge_release.slug.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              jarret.lavallee Jarret Lavallee
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support