Bug 824915

Summary: Catalog will allow duplicate package uploads when using the call home feature in v7
Product: [Retired] Red Hat Hardware Certification Program Reporter: Rob Landry <rlandry>
Component: Hardware CatalogAssignee: Wei Shen <wshen>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.2CC: hwcert-catalog, junwang, wshen
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: http://partner-hwcert.redhat.com
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-12 09:11:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 733411    

Description Rob Landry 2012-05-24 15:18:05 UTC
Description of problem:

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

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

hwcert-3.2rh-20120522.1


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 08:08:31 UTC
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 08:24:53 UTC
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 14:22:53 UTC
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 05:39:51 UTC
(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 07:11:09 UTC
verified on partner