Bug 864645 - local sync of packages doesn't fetch packages
local sync of packages doesn't fetch packages
Status: CLOSED WONTFIX
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Content Management (Show other bugs)
6.0.1
Unspecified Unspecified
unspecified Severity medium (vote)
: Unspecified
: --
Assigned To: David Davis
Corey Welton
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-09 16:41 EDT by Mike McCune
Modified: 2014-09-18 11:32 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-09-04 14:22:06 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mike McCune 2012-10-09 16:41:36 EDT
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 11:15:46 EDT
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 08:25:36 EDT
Mike,

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

Thanks.
Comment 6 David Davis 2012-11-02 15:20:43 EDT
Moving back to new as I've not looked into this at all.
Comment 8 Mike McCune 2013-08-16 14:24:05 EDT
getting rid of 6.0.0 version since that doesn't exist
Comment 9 Mike McCune 2014-09-04 14:22:06 EDT
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 14:24:04 EDT
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.