Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-4560

osbuild-composer cache never expires for custom repositories

Linking RHIVOS CVEs to...Migration: Automation ...Sync from "Extern...XMLWordPrintable

    • None
    • Low
    • rhel-sst-image-builder
    • ssg_front_door
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • If docs needed, set a value
    • None
    • 57,005

      Description of problem:
      After configuring a custom repository as explained in the upstream documentation [0], it looks like the metadata related to this repository does not expire.
      Adding a package to this repository (and updating the repodata) is never seen by the composer.

      Adding "metadata_expire = 300" (`man dnf.conf`) in the toml file used to add a repository through composer-cli did not help to have this package "depsolvable".

      [0] https://www.osbuild.org/guides/user-guide/managing-repositories.html#custom-3rd-party-repositories

      Version-Release number of selected component (if applicable):
      osbuild-composer-33.2-1.el8.x86_64
      osbuild-35-3.el8.noarch

      How reproducible:
      Always

      Steps to Reproduce:
      1. Create a repository named 'repotest' shared via http with pkg1.rpm and pkg2.rpm

      2. Create a toml file to define this repo
      id = "repotest"
      name = "repotest"
      type = "yum-baseurl"
      url = "http://192.168.122.1/repotest"
      check_gpg = false
      check_ssl = false
      system = false

      3. Add this repo

      1. composer-cli sources add repotest.toml

      4. Run a depsolve with a blueprint containing pkg

      {1,2,3}
      1. composer-cli blueprints depsolve myimage
        2021-11-24 12:07:21,589: myimage: DNF error occured: MarkingErrors: Error occurred when marking packages for installation: Problems in request:
        missing packages: pkg3

      5. Add the missing pkg3.rpm to the custom repository (update it with createrepo -u...)

      6. Run a new depsolve and observe the issue - which was expected in a first time - still occurs.

      Expected results:
      The ability to use metadata_expire from the composer sources, and possibly a composer command to clear the cache.

      Additional info:
      Removing the cache in /var/cache/osbuild-composer/* and restarting the daemon fixed the issue.

              osbuilders Osbuilders Bot Account
              rhn-support-cbesson Christophe Besson
              Osbuilders Bot Account Osbuilders Bot Account
              RH Bugzilla Integration RH Bugzilla Integration
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: