Uploaded image for project: 'Clair'
  1. Clair
  2. CLAIRDEV-170

Malformed index reports when DNF data present but repos not in repository to CPE map

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Normal Normal
    • None
    • claircore-1.5.39
    • indexer
    • None

      There is an issue when the rhel PackageScanner finds DNF repoids and tries to add them in the coalescer but the same repoids are not in the repository to CPE mapping file so the rhel RepositoryScanner does not return them. This causes an inconsistent index report as repos referenced in the repository_ids array in the environments object are not listed in the repositories array.

      Steps:

      • Repository scanner find some DNF repos, it tries to look them up in the repo2CPE map but they don't exist (should only be a problem for non-Konflux)
      • It won't return any repos (although, in my tests it did return the default "content-set" repos I assume from a different layer)
      • The Package scanner is finding a repoid and adding it to the RepositoryHint
      • The Coalescer is then finding the repoid and adding it to the environment's repository_ids section, but it doesn't relate to any repo in the "repositories" object

      Possible solution:

      Key off of the from_dnf_hint field in the content_manifest file:

      • if it's there and it's from_dnf_hint == true: go after the DNF data
      • if it's there and there's no from_dnf_hint (or it's false) go after the content_manifest/content_sets
      • if it's not there (there's no content_manifest file), not sure, look up the DNF data but check that the repoid in the RepositoryHint has a corresponding Repository during coalescing? TBD

              jcroslan@redhat.com Joseph Crosland
              jcroslan@redhat.com Joseph Crosland
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: