Description of problem: When pulp syncs a repo, if the SRC package is not found in the Repo, this will cause the repo sync task to complete, but end with a warning. In Satellite 5.x, there was a deliberate change to ignore the warnings when SRC rpms could not be found (BZ#626749) Version-Release number of selected component (if applicable): Satellite 6.2.0 (Beta) and earlier. How reproducible: Always Steps to Reproduce: 1. Add several rpm files to a web server that will be accessible to Satellite 6 for syncing # find test_repo/ -type f test_repo/rpm/src/yum-3.4.3-0.src.rpm test_repo/rpm/noarch/yum-3.4.3-0.noarch.rpm 2. Create the repo metadata # createrepo -v test_repo/ 3. Ensure the metadata contains the location for both rpms # zcat test_repo/repodata/primary.xml.gz | grep "location" <location href="rpm/noarch/yum-3.4.3-0.noarch.rpm"/> <location href="rpm/src/yum-3.4.3-0.src.rpm"/> 4. Remove the source rpm from the filesystem # rm test_repo/rpm/src/yum-3.4.3-0.src.rpm # find test_repo/ -type f test_repo/rpm/noarch/yum-3.4.3-0.noarch.rpm test_repo/repodata/primary.xml.gz test_repo/repodata/other.xml.gz test_repo/repodata/repomd.xml test_repo/repodata/filelists.xml.gz 5. Add the repo to a product in Satellite 6 New product -> test_repo_sync 6. Add the repo to the new product New repository name: test_repo type: yum url: http://satellite.example.com/repo/custom/test_repo 7. Sync the repo Product Test_repo_sync -> repositories -> test_repo -> sync now Errors: Failed to download 1 package An error occurred during the sync {"url"=>"http://satellite.example.com/repo/custom/test_repo/rpm/src/yum-3.4.3-0.src.rpm", "errors"=>["Not Found"]} Actual results: Repo sync task completes, but with a Result = Warning and backtraces in the Error tab and an exception similar to ..... RuntimeError: An error occurred during the sync {"url"=>"http://satellite.example.com/bash-4.1.2-33.el6.src.rpm", "errors"=>["Not Found"]} Expected results: No Result = Warning if the SRC rpm is 404 Not Found. (Though it is expected if this happens for a non-Src rpm. Additional info: In using Satellite in conjunction with some 3rd party repos (For example SuSE's SMT application), the option to not sync src RPMs is given. When Satellite then syncs against these repos, all tasks syncing against a repo like this end with Result == Warning. Whereas in Satellite 5.x, this appears to have deliberately changed to ignore missing SRC rpms with BZ#626749
Pulp's rpm importer has a "skip" feature that would resolve this. You can tell it which types of content to skip during sync, and "srpm" is one of the choices. Katello could make that setting available. http://pulp-rpm.readthedocs.io/en/2.8-release/tech-reference/yum-plugins.html#configuration-parameters If you want to try downloading srpms, and just silence any errors in case any are not found, that is not something pulp can do. My recommendation would be for the user interface (katello in this case) to just now show the warnings for those files.
Regarding comment #3 I do not see a "srpm" skip option available for yum repos. Even according to the documentation https://docs.pulpproject.org/plugins/pulp_rpm/tech-reference/yum-plugins.html#yum-importer the skip option is listed without srpm "" skip List of content types to be skipped during the repository synchronization. If unspecified, all types will be synchronized. Valid values are: rpm, drpm, distribution, erratum; default is []. "" more over pulp wont even accept that in pulp-admin "" $ pulp rpm repo create --repo-id=j123 --feed=http://<fqdn>/upstream-repo --skip=srpm Validation failed for argument [--skip]: Types must be a comma-separated list using only the following values: rpm, drpm, distribution, erratum "" I was able to set "srpm" as importer option via runcible which directly interacts with the pulp api. Even then the sync call on the repo synced srpm instead of skipping.
Connecting redmine issue http://projects.theforeman.org/issues/22802 from this bug
Connecting redmine issue http://projects.theforeman.org/issues/22803 from this bug
The Pulp upstream bug status is at NEW. Updating the external tracker on this bug.
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.
The Pulp upstream bug status is at ASSIGNED. Updating the external tracker on this bug.
The Pulp upstream bug status is at POST. Updating the external tracker on this bug.
The Pulp upstream bug status is at MODIFIED. Updating the external tracker on this bug.
The Pulp upstream bug status is at ON_QA. Updating the external tracker on this bug.
The Pulp upstream bug status is at CLOSED - CURRENTRELEASE. Updating the external tracker on this bug.
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/22803 has been resolved.
*** Bug 1591358 has been marked as a duplicate of this bug. ***
Verified in Satellite 6.5.0 Snap 11 The feature introduced was to add the ability to skip syncing of specified content types. for this bug, I have selected source rpms. Setup: 1. Download rpms and source rpms into one directory # wgetdir http://my.secret.host/x86_64/baseos/os/Packages/ # wgetdir http://my.secret.host/x86_64/baseos/source/SRPMS/ # ls | grep .rpm | wc -l 5006 # ls | grep src.rpm | wc -l 961 This results in 4045 regular rpms. 2. Turn the rpms and source rpms into a repository # createrepo . 3. Host the repository podman run -d -p 1337:80 -v $(pwd):/usr/local/apache2/htdocs/:Z httpd 4. Create a new repository set the content type to yum set the url as http://<my.repo.host>:1337/ select source rpms to be ignored. 5. Synchronize the repository Results: The repo sync'd correctly ignoring all source rpms The number of rpms were 4045 with 0 source rpms after sync. See attached screenshot for verification.
Created attachment 1521114 [details] verification screenshot
test2
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2019:1222
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days