Bug 798656

Summary: Packages conflicting when signed with different gpg key
Product: [Retired] Pulp Reporter: Ivan Necas <inecas>
Component: user-experienceAssignee: Pradeep Kilambi <pkilambi>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: high Docs Contact:
Priority: unspecified    
Version: 1.1.0CC: jortel, skarmark
Target Milestone: ---Keywords: Triaged
Target Release: Sprint 34   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 916326 (view as bug list) Environment:
Last Closed: 2012-05-25 14:15:35 UTC Type: ---
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: 798301, 916326, 921250    
Attachments:
Description Flags
Script to reproduce conflict issue none

Description Ivan Necas 2012-02-29 14:10:48 UTC
Created attachment 566552 [details]
Script to reproduce conflict issue

Description of problem:
When we synchronize two repositories, with roughly the same content, but signed with different gpg keys (e.g. one is official CDN, and second is a Brew repo), there might occur conflicts: two packages with the same checksum prefix (Pulp uses first 3 characters of checksum to distinguish them.) It seemed improbable to hit the conflict, but we just did in Katello.

It results links to point to different package, than repodata says. And this then causes another issue, like one described in steps to reproduce

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


How reproducible:


Steps to Reproduce: (script attached):

pulp-admin repo create --id rh-repo --name rh-repo --feed http://inecas.fedorapeople.org/fakerepos/rh-repo --relativepath=rh-repo
pulp-admin repo sync --id rh-repo -F
pulp-admin repo clone --id rh-repo --clone_id=rh-repo-clone -F

pulp-admin repo create --id brew-repo --name brew-repo --feed http://inecas.fedorapeople.org/fakerepos/brew-repo --relativepath=brew-repo
pulp-admin repo sync --id brew-repo -F
pulp-admin repo sync --id rh-repo-clone -F
  
Actual results:
error:  Error: `/var/lib/pulp//repos/rh-repo/PackageKit-gstreamer-plugin-0.5.8-19.el6.x86_64.rpm` and `/var/lib/pulp//packages/PackageKit-gstreamer-plugin/0.5.8/19.el6/x86_64/838/PackageKit-gstreamer-plugin-0.5.8-19.el6.x86_64.rpm` are the same file

link pointing to package from another repo

Expected results:
Links pointing to packages with right checksum

Comment 2 Pradeep Kilambi 2012-03-19 19:54:13 UTC
commit 8d788f4849369b1f116edb368384ec4f8267bf1

The fix also includes a migration script that needs to be run taking pulp server offline. See wiki page for more info

https://fedorahosted.org/pulp/wiki/PackagePathUpdate

Comment 3 Jeff Ortel 2012-03-20 18:47:52 UTC
build: 1.0.0-6

Comment 4 Preethi Thomas 2012-03-23 15:10:25 UTC
verified
[root@pulp-v1-server ~]# rpm -q pulp
pulp-1.0.0-6.el6.noarch
[root@pulp-v1-server ~]# 

[root@pulp-v1-server ~]# pulp-admin repo create --id rh-repo --name rh-repo --feed http://inecas.fedorapeople.org/fakerepos/rh-repo --relativepath=rh-repo
Successfully created repository [ rh-repo ]

[root@pulp-v1-server ~]# pulp-admin repo sync --id rh-repo -F
Sync for repository rh-repo started
Sync: Finished
0/1 new items downloaded
1/1 existing items processed

Item Details: 
RPMs: 1/1

[root@pulp-v1-server ~]# pulp-admin repo clone --id rh-repo --clone_id=rh-repo-clone -F
Repository [rh-repo] is being cloned as [rh-repo-clone]
Clone: Finished
Item Details: 
RPMs: 1/1

[root@pulp-v1-server ~]# pulp-admin repo create --id brew-repo --name brew-repo --feed http://inecas.fedorapeople.org/fakerepos/brew-repo --relativepath=brew-repo
Successfully created repository [ brew-repo ]

[root@pulp-v1-server ~]# pulp-admin repo sync --id brew-repo -F
Sync for repository brew-repo started
Sync: Finished
1/1 new items downloaded
0/1 existing items processed

Item Details: 
RPMs: 1/1

[root@pulp-v1-server ~]# pulp-admin repo sync --id rh-repo-clone -F
Sync for repository rh-repo-clone started
Sync: Finished
0/1 new items downloaded
1/1 existing items processed

Item Details: 
RPMs: 1/1

[root@pulp-v1-server ~]# pulp-admin repo sync --id rh-repo-clone -F
Sync for repository rh-repo-clone started
Sync: Finished
0/1 new items downloaded
1/1 existing items processed

Item Details: 
RPMs: 1/1


root@pulp-v1-server ~]# 

Also verified the package migrate script  and all the different suggested tests as per the wiki page

https://fedorahosted.org/pulp/wiki/PackagePathUpdate

Comment 5 Preethi Thomas 2012-05-25 14:15:35 UTC
Pulp v1.1 Release