Hide Forgot
Description of problem: SRPMs should not be allowed to upload in a satellite product. Version-Release number of selected component (if applicable): Satellite 6.2 How reproducible: 1. Go to Content -> Products and create a New Product. 2. In the new Product, create a new Repository using "Type: yum". 3. In the new Repository, click 'Browse...' in the "Upload Package" box. 4. Select any SRPM package file (for convenience, I'll attach an example). 5. Click the 'Upload' button in the "Upload Package" box. You should see an error like the following appear: Error during upload: Task 4ffb5391-32f6-4a55-9ab1-3ab6de6e4e13: Katello::Errors::PulpError: PLP0047: The importer yum_importer indicated a failed response when uploading rpm unit to repository BSB-RHEL_MAX_CustomPkgs-RHEL7_MAX_CustomPkgs. 6. If you then go to Monitor -> Tasks and search for paused tasks, you should see the failed UploadFiles task that generated the above error. If you click on the Errors tab in the task, you should see the error from my previous comment. If you look in /var/log/foreman/production.log you should see the log messages listed in my previous comment. 7. Due to the lock held by this paused task, all subsequent attempts to upload any package (either an RPM or an SRPM) will fail. To correct this problem and allow further upload attempts, you will need to manually delete the failed task using a slightly modified version of the commands listed on https://access.redhat.com/solutions/2089951 Actual results: While uploading SRPMs system is throwing below error- Pulp requires the file type to be specified when uploading content, but Satellite uploads both RPMs and SRPMs as file type "rpm". Expected results: Satellite should render a proper message to educate user that it's SRPMs cannot be uploaded.
Created redmine issue http://projects.theforeman.org/issues/17746 from this bug
Vishwanath submitted this on my behalf. I was actually expecting Satellite to submit SRPMs to pulp with file type "srpm", not to render a message indicating that SRPMs cannot be uploaded. When I build custom RPMs, I'd like to keep the SRPMs in Satellite with the custom RPMs. I currently have to keep SRPMs in a completely separate system, and I have to manually add/remove SRPMs from that other system as we add/remove RPMs in Satellite. I would much prefer to keep the SRPMs and RPMs all in the same place. Pulp does support SRPMs, so this should be possible. The real issue here is that Satellite uploads both RPMs and SRPMs as the file type "rpm", while pulp requires SRPMs to be uploaded as file type "srpm". From /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.73/app/models/katello/glue/pulp/repo.rb : 710 def unit_type_id 711 case content_type 712 when Repository::YUM_TYPE 713 "rpm" 714 when Repository::PUPPET_TYPE 715 "puppet_module" 716 when Repository::DOCKER_TYPE 717 "docker_manifest" 718 when Repository::OSTREE_TYPE 719 "ostree" 720 when Repository::FILE_TYPE 721 "iso" 722 end 723 end I believe that adjusting this logic so that it checks the actual file type in addition to checking the repository type would solve this problem.
Thank you for your interest in Satellite 6. We have evaluated this request, and we do not expect this to be implemented in the product in the foreseeable future. We are therefore closing this out as WONTFIX. If you have any concerns about this, please feel free to contact Rich Jerrido or Bryan Kearney. Thank you.