Bug 824915 - Catalog will allow duplicate package uploads when using the call home feature in v7
Catalog will allow duplicate package uploads when using the call home feature...
Product: Red Hat Hardware Certification Program
Classification: Red Hat
Component: Hardware Catalog (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Wei Shen
Depends On:
Blocks: 733411
  Show dependency treegraph
Reported: 2012-05-24 11:18 EDT by Rob Landry
Modified: 2014-06-22 21:33 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-07-12 05:11:14 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Rob Landry 2012-05-24 11:18:05 EDT
Description of problem:

The catalog will accept the same package twice from the v7 command line

Version-Release number of selected component (if applicable):


How reproducible:

Every time

Steps to Reproduce:
1. v7 submit with upload to catalog
2. do not clean the results
3. v7 submit with upload to catalog
Actual results:

The 2nd upload is accepted by the catalog

Expected results:

The package should be rejected as duplicate.

Additional info:
Comment 1 Wei Shen 2012-05-31 04:08:31 EDT
I don't know how it happens, but the uploaded packages have different md5.

e.g. http://hwcert-web2-test.devel.redhat.com/show.cgi?id=731551

[wshen@wshen ~]$ md5sum v7-results-weishen-20120531074018.xml.gz 
9c614295c33a112db2052c7f7b496c4a  v7-results-weishen-20120531074018.xml.gz
[wshen@wshen ~]$ md5sum v7-results-weishen-20120531074018.2.xml.gz 
77907cf6839df75f43c0c288059e777e  v7-results-weishen-20120531074018.2.xml.gz
[wshen@wshen ~]$ gunzip v7-results-weishen-20120531074018.2.xml.gz
[wshen@wshen ~]$ gunzip v7-results-weishen-20120531074018.xml.gz
[wshen@wshen ~]$ diff -u v7-results-weishen-20120531074018.xml v7-results-weishen-20120531074018.2.xml
[wshen@wshen ~]$ diff -u v7-results-weishen-20120531074018.xml v7-results-weishen-20120531074018.2.xml
[wshen@wshen ~]$ md5sum v7-results-weishen-20120531074018.xml
426428c42972e251bfff7a0cd6e685f6  v7-results-weishen-20120531074018.xml
[wshen@wshen ~]$ md5sum v7-results-weishen-20120531074018.2.xml 
426428c42972e251bfff7a0cd6e685f6  v7-results-weishen-20120531074018.2.xml
Comment 2 Wei Shen 2012-05-31 04:24:53 EDT
discussed this bug with caspar, 'v7 submit' will repack packages, which results in packages with different md5 values. it is caused by gzip program I think,
continued with the above example:

[wshen@wshen ~]$ gzip v7-results-weishen-20120531074018.xml
[wshen@wshen ~]$ md5sum v7-results-weishen-20120531074018.xml.gz 
1a30b8cc2d6e416f76677fa935e53dce  v7-results-weishen-20120531074018.xml.gz
[wshen@wshen ~]$ gzip v7-results-weishen-20120531074018.2.xml
[wshen@wshen ~]$ md5sum v7-results-weishen-20120531074018.2.xml.gz 
905ec57e712b2885c2cf16e70814da84  v7-results-weishen-20120531074018.2.xml.gz
Comment 3 Rob Landry 2012-05-31 10:22:53 EDT
v7 1.5-31 will be updated to use "-n" on gzip which resolves the md5sum issue in comment 2.

compressing and encoding results...
uploading results...
Error: could not submit certification results:
    Fault code: -32000
    Fault string: Results package already submitted. Matching md5sum found for results in the following certification(s). Cert ID Attach ID File Name 731552 518871 v7-results-unused-20120531133213.xml.gz
[root@unused v7]# 

Can we improve the error message to put the values next to their labels?
Comment 4 Wei Shen 2012-06-01 01:39:51 EDT
(In reply to comment #3) 
> Can we improve the error message to put the values next to their labels?

we should open a new bug for this, fix it after hybrid4 release
Comment 5 Wei Shen 2012-06-04 03:11:09 EDT
verified on partner

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