Description of problem: # touch some.rpm [root@ec2-54-220-72-88 ~]# pulp-admin -u admin -p admin rpm repo uploads rpm --repo-id m2 --file ~/some.rpm +----------------------------------------------------------------------+ Unit Upload +----------------------------------------------------------------------+ Extracting necessary metadata for each request... [==================================================] 100% Analyzing: some.rpm ... completed Creating upload requests on the server... [==================================================] 100% Initializing: some.rpm ... completed Starting upload of selected units. If this process is stopped through ctrl+c, the uploads will be paused and may be resumed later using the resume command or cancelled entirely using the cancel command. Uploading: some.rpm ... completed Importing into the repository... This command may be exited via ctrl+c without affecting the request. [\] Running... Task Succeeded Deleting the upload request... ... completed Version-Release number of selected component (if applicable): pulp-2.4.0-0.13.beta How reproducible: always Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
What behavior did you expect? This all looks normal. You uploaded an RPM, and it worked.
I did not upload an rpm, it was just file with '.rpm' extension. I think more correct behaviour would be to check the if it is a real rpm and instead of this: Creating upload requests on the server... [==================================================] 100% Initializing: some.rpm ... completed Uploading: some.rpm ... completed Task Succeeded Have something like: "Not an rpm" Task Failed. In addition no error is raised if I do the iso upload to an rpm repo type: # pulp-admin -u admin -p admin rpm repo uploads rpm --repo-id xxx --file /root/test.iso +----------------------------------------------------------------------+ Unit Upload +----------------------------------------------------------------------+ Extracting necessary metadata for each request... [==================================================] 100% Analyzing: test.iso ... completed Creating upload requests on the server... [==================================================] 100% Initializing: test.iso ... completed Starting upload of selected units. If this process is stopped through ctrl+c, the uploads will be paused and may be resumed later using the resume command or cancelled entirely using the cancel command. Uploading: test.iso ... completed Importing into the repository... This command may be exited via ctrl+c without affecting the request. [\] Running... Task Succeeded Deleting the upload request... ... completed
PR: https://github.com/pulp/pulp/pull/969
PR: https://github.com/pulp/pulp_rpm/pull/491
This was fixed in pulp-2.4.0-0.19.beta.
# pulp-admin -u admin -p admin rpm repo uploads rpm --repo-id m2 --file ~/some.rpm +----------------------------------------------------------------------+ Unit Upload +----------------------------------------------------------------------+ Extracting necessary metadata for each request... [==================================================] 100% Analyzing: some.rpm ... completed Creating upload requests on the server... [==================================================] 100% Initializing: some.rpm ... completed Starting upload of selected units. If this process is stopped through ctrl+c, the uploads will be paused and may be resumed later using the resume command or cancelled entirely using the cancel command. Uploading: some.rpm ... completed Importing into the repository... This command may be exited via ctrl+c without affecting the request. [\] Running... Task Failed metadata for the given package could not be extracted Deleting the upload request... ... completed # pulp-admin -u admin -p admin rpm repo uploads rpm --repo-id m2 --file ~/some.iso +----------------------------------------------------------------------+ Unit Upload +----------------------------------------------------------------------+ Extracting necessary metadata for each request... [==================================================] 100% Analyzing: some.iso ... completed Creating upload requests on the server... [==================================================] 100% Initializing: some.iso ... completed Starting upload of selected units. If this process is stopped through ctrl+c, the uploads will be paused and may be resumed later using the resume command or cancelled entirely using the cancel command. Uploading: some.iso ... completed Importing into the repository... This command may be exited via ctrl+c without affecting the request. [\] Running... Task Failed metadata for the given package could not be extracted Deleting the upload request... ... completed Now the error is raised if a fake rpm is being uploaded or the the unit content type does not match the repo type
This has been fixed in Pulp 2.4.0-1.