Bug 864645

Summary: local sync of packages doesn't fetch packages
Product: Red Hat Satellite Reporter: Mike McCune <mmccune>
Component: Content ManagementAssignee: David Davis <daviddavis>
Status: CLOSED WONTFIX QA Contact: Corey Welton <cwelton>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.0.1CC: bkearney, daviddavis, omaciel
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-04 18:22:06 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:

Description Mike McCune 2012-10-09 20:41:36 UTC
1) Create a directory on your local Katello server with just a series of packages:

$ ls /var/tmp/fakepackages

boar-0.1.3-1.elfake.noarch.rpm
camel-4.10.5-1.elfake.noarch.rpm
canary-2.7.10-1.elfake.noarch.rpm
chicken-7.5.7-1.elfake.noarch.rpm
chipmunk-2.9.2-1.elfake.noarch.rpm
cow-1.3.9-1.elfake.noarch.rpm
cow-1.7.8-1.elfake.noarch.rpm
cow-6.7.4-1.elfake.noarch.rpm
deer-10.9.4-1.elfake.noarch.rpm
dog-7.6.0-1.elfake.noarch.rpm


2) do not run createrepo on this directory, just leave it to be a pile of packages.

3) Setup a custom repository in CFSE pointed at the local directory on the CFSE server:

# katello repo create --name local3 --product=local1 --org ACME_Corporation --url file:///var/tmp/fakepackages/

4) Sync the repo:  

# katello repo synchronize --name local3 --product=local1 --org ACME_Corporation 

5) Note that the repo shows 0 packages:

# katello repo info --name local3 --product=local1 --org ACME_Corporation  --env Library

--------------------------------------------------
          Information About Repo 14
--------------------------------------------------

Id:            14
Name:          local3
Package Count: 0
Arch:          noarch
Url:           file:///var/tmp/fakepackages/
Last Sync:     2012/10/09 16:31:15
Progress:      Finished
GPG key:

Comment 3 Mike McCune 2012-10-11 15:15:46 UTC
Unfortunately Pulp (the process that handles our package syncing and publishing) requires that existing metadata already exist in the directory if you are doing a local sync.  We would need to add in package upload capability into Katello's CLI to support he model where you want to import packages that are *not* part of an existing yum repository.

A short term workaround would be to run 'createrepo /var/tmp/fakepackages/' or wherever your packages are located before you do your sync.  That way Katello would would be able to sync from your local dir.  An updated workflow would be:

# katello repo create --name local3 --product=local1 --org ACME_Corporation --url file:///var/tmp/fakepackages/

# createrepo /var/tmp/fakepackages/
33/33 - acme-6.9.6-1.elfake.noarch.rpm                                        
Saving Primary metadata
Saving file lists metadata
Saving other metadata


# katello repo synchronize --name local3 --product=local1 --org ACME_Corporation  
Repo [ local3 ] synced            

# katello repo info --name local3 --product=local1 --org ACME_Corporation  --env Library
--------------------------------------------------
                                                                                           Information About Repo 14
--------------------------------------------------

Id:            14
Name:          local3
Package Count: 33
Arch:          noarch
Url:           file:///var/tmp/fakepackages/
Last Sync:     2012/10/11 11:14:24
Progress:      Finished

Comment 4 David Davis 2012-10-22 12:25:36 UTC
Mike,

Any updates on this? Do we need to start working on it?

Thanks.

Comment 6 David Davis 2012-11-02 19:20:43 UTC
Moving back to new as I've not looked into this at all.

Comment 8 Mike McCune 2013-08-16 18:24:05 UTC
getting rid of 6.0.0 version since that doesn't exist

Comment 9 Mike McCune 2014-09-04 18:22:06 UTC
If users wish to get packages from a directory with no repodata they should use the upload feature.

If they wish to sync a directory of packages using a feed mechanism they should run createrepo on the directory.


CLOSING:WONTFIX

Comment 10 Bryan Kearney 2014-09-04 18:24:04 UTC
Users should either (1) use hammer to unload the files or (2) run create repo. We will not support slurping up a directory. If you disagree, please feel free to re-open this.