Bug 864645 - local sync of packages doesn't fetch packages
Summary: local sync of packages doesn't fetch packages
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Management
Version: 6.0.1
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: David Davis
QA Contact: Corey Welton
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-09 20:41 UTC by Mike McCune
Modified: 2014-09-18 15:32 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-04 18:22:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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.


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