Bug 1096883 - No error is raised if fake rpm is uploaded to a repo
Summary: No error is raised if fake rpm is uploaded to a repo
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: rpm-support
Version: unspecified
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
: 2.4.0
Assignee: Barnaby Court
QA Contact: Ina Panova
URL:
Whiteboard:
Depends On: 1096886
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-12 15:12 UTC by Ina Panova
Modified: 2014-08-09 06:57 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-08-09 06:57:04 UTC
Embargoed:


Attachments (Terms of Use)

Description Ina Panova 2014-05-12 15:12:54 UTC
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:

Comment 1 Michael Hrivnak 2014-05-13 13:26:02 UTC
What behavior did you expect? This all looks normal. You uploaded an RPM, and it worked.

Comment 2 Ina Panova 2014-05-13 14:39:36 UTC
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

Comment 3 Barnaby Court 2014-05-15 21:04:28 UTC
PR: https://github.com/pulp/pulp/pull/969

Comment 4 Barnaby Court 2014-05-16 15:05:16 UTC
PR: https://github.com/pulp/pulp_rpm/pull/491

Comment 5 Randy Barlow 2014-05-29 18:07:28 UTC
This was fixed in pulp-2.4.0-0.19.beta.

Comment 6 Ina Panova 2014-06-03 09:40:39 UTC
# 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

Comment 7 Randy Barlow 2014-08-09 06:57:04 UTC
This has been fixed in Pulp 2.4.0-1.


Note You need to log in before you can comment on or make changes to this bug.