Bug 694591

Summary: Creating a repo without a feed should have blank metadata so it still acts like a repo
Product: [Retired] Pulp Reporter: Jay Dobies <jason.dobies>
Component: z_otherAssignee: Pradeep Kilambi <pkilambi>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: skarmark
Target Milestone: ---Keywords: Triaged
Target Release: Sprint 23   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-16 14:02:43 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: 641987, 688298    

Description Jay Dobies 2011-04-07 17:49:10 UTC
When a feed-less repo is created, it's completely empty. The metadata isn't generated until the first time a package is added.

This is misleading if a consumer is bound to the repo before any packages are added. Yum will show an error with the repo that repomd.xml doesn't exist. Really though, the repo is there, it's just empty.

We should generate empty metadata to make that use case cleaner so that the client doesn't see an error.

In the RHUI case, it's possible the provider will want to make a repository accessible to clients as a future-looking thing, with the intention of putting update RPMs in it. In such a case, the repo will likely be empty at image creation time (i.e. when the .repo file is created) but we don't want clients to see yum errors every time until that repo is used.

Comment 1 Pradeep Kilambi 2011-04-20 14:39:21 UTC
commit 8681ffd82f15aa73c130ec764d6b88e061c3da93

$ sudo pulp-admin repo create --id=test_empty
Successfully created repository [ test_empty ]

$ ls -l /var/lib/pulp/repos/test_empty/
total 4
drwxr-xr-x. 2 apache apache 4096 Apr 20 10:42 repodata

$ ls -l /var/lib/pulp/repos/test_empty/repodata/
total 28
-rw-r--r--. 1 apache apache  594 Apr 20 10:42 filelists.sqlite.bz2
-rw-r--r--. 1 apache apache  179 Apr 20 10:42 filelists.xml.gz
-rw-r--r--. 1 apache apache  575 Apr 20 10:42 other.sqlite.bz2
-rw-r--r--. 1 apache apache  175 Apr 20 10:42 other.xml.gz
-rw-r--r--. 1 apache apache 1144 Apr 20 10:42 primary.sqlite.bz2
-rw-r--r--. 1 apache apache  188 Apr 20 10:42 primary.xml.gz
-rw-r--r--. 1 apache apache 2681 Apr 20 10:42 repomd.xml

Comment 2 Jeff Ortel 2011-04-21 21:30:08 UTC
build: 0.170

Comment 3 Preethi Thomas 2011-05-24 18:45:21 UTC
verified
[root@preethi ~]# rpm -q pulp
pulp-0.0.179-1.fc14.noarch

[root@preethi ~]# pulp-admin repo create --id=test_empty
Successfully created repository [ test_empty ]

[root@preethi ~]# ls -l /var/lib/pulp/repos/test_empty/
total 4
drwxr-sr-x. 2 apache apache 4096 May 24 14:56 repodata
[root@preethi ~]# ls -l /var/lib/pulp/repos/test_empty/repodata/
total 28
-rw-r--r--. 1 apache apache  583 May 24 14:56 filelists.sqlite.bz2
-rw-r--r--. 1 apache apache  179 May 24 14:56 filelists.xml.gz
-rw-r--r--. 1 apache apache  560 May 24 14:56 other.sqlite.bz2
-rw-r--r--. 1 apache apache  175 May 24 14:56 other.xml.gz
-rw-r--r--. 1 apache apache 1242 May 24 14:56 primary.sqlite.bz2
-rw-r--r--. 1 apache apache  188 May 24 14:56 primary.xml.gz
-rw-r--r--. 1 apache apache 2684 May 24 14:56 repomd.xml

Comment 4 Preethi Thomas 2011-08-16 14:02:43 UTC
Closing with Community Release 15

pulp-0.0.223-4.