Bug 976333

Summary: Relative path for repos which I don't specify the relative path is different from that of in 2.1
Product: [Retired] Pulp Reporter: Preethi Thomas <pthomas>
Component: user-experienceAssignee: Jay Dobies <jason.dobies>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: high Docs Contact:
Priority: high    
Version: 2.2 BetaCC: jortel
Target Milestone: ---Keywords: Triaged
Target Release: 2.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-10 15:43:18 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 Preethi Thomas 2013-06-20 12:01:57 UTC
Description of problem:

relative path for repos which I don't specify the relative path is different from that of in 2.1
Version-Release number of selected component (if applicable):

[root@ibm-x3550m3-13 ~]# rpm -q pulp-server
pulp-server-2.2.0-0.4.beta.fc18.noarch

How reproducible:


Steps to Reproduce:
[root@ibm-x3550m3-13 ~]#  pulp-admin rpm repo create --repo-id rhel6-2 --feed  https://cdn.redhat.com/content/dist/rhel/rhui/server/6/6.2/x86_64/os/ --feed-ca-cert CDN/cdn.redhat.com-chain.crt --feed-cert CDN/1359391926_4512.crt  --feed-key CDN/1359391926_4512.key


After sync the I can see it in here

[root@ibm-x3550m3-13 ~]# ls -l /var/lib/pulp/published/https/repos/rhel6-2/repodata/
total 51044
-rw-r--r--. 1 apache apache  176361 Jun 18 14:17 1ca3ebbe19e57400eaf57810d83ee826a300bbc1aaf16151339938df17cc92f6-group.xml
-rw-r--r--. 1 apache apache 1463038 Jun 18 14:17 43db6e9eaee69a31acf9b005ba38325664b08644f5f25b33a188332e1b05c424-primary.sqlite.bz2
-rw-r--r--. 1 apache apache    2159 Jun 18 14:17 7b1e1e2df060d31a9af15eec907370fb5c2b09ca520a0505904311d255b5de41-productid.xml
-rw-r--r--. 1 apache apache 7140277 Jun 18 14:17 ab70bed7a08d783423eb39d1949bb1f426b38fc2299c018414f99f653ead2419-primary.xml.gz
-rw-r--r--. 1 apache apache 1572489 Jun 18 14:17 aba44a0f539aa66e21e191ad498ac598aeaa635b45b4ab7b49a1af5b0ec74564-other.xml.gz
-rw-r--r--. 1 apache apache 2120173 Jun 18 14:17 bc766aa653fadcef089ff976a9413888a7095b33a76cd0347a65a37edcac2b7e-other.sqlite.bz2
-rw-r--r--. 1 apache apache 3415229 Jun 18 14:17 c1bc6b1cd8115e59e4ac6766fb6fc455f8cbf8d4b3f5b2feb81c9bdad5f2072f-updateinfo.xml
-rw-r--r--. 1 apache apache 9788997 Jun 18 14:17 c7db74ae7b35a614eb770b97efb010b86b3d1e5df41e0d7848694a8491b1f309-filelists.xml.gz
-rw-r--r--. 1 apache apache 8058011 Jun 18 14:17 f4245151ef16a4e7fe25570e9a000d18bb3ac0e55fb0335392da2a64dabb4ecc-filelists.sqlite.bz2
-rw-r--r--. 1 apache apache    4243 Jun 18 14:17 repomd.xml
-rw-r--r--. 1 apache apache 9788819 Jun 18 14:17 temp_filelists.xml.gz
-rw-r--r--. 1 apache apache 1572430 Jun 18 14:17 temp_other.xml.gz
-rw-r--r--. 1 apache apache 7140205 Jun 18 14:17 temp_primary.xml.gz
[root@ibm-x3550m3-13 ~]# 


But in the 2.1 pulp I see the same repodata in here


[root@ibm-x3550m3-09 ~]# ls -l /var/lib/pulp/published/https/repos/content/dist/rhel/rhui/server/6/6.2/x86_64/os/repodata/
total 64904
-rw-r--r--. 1 apache apache  9791118 Jun 13 16:43 02a7738f028bbc7f5c1fb765ec3c940f4ea2e5b0-filelists.xml.gz
-rw-r--r--. 1 apache apache  1573005 Jun 13 16:43 106caff6ab2cfc33cc54d9801339cb88bfec0bce-other.xml.gz
-rw-r--r--. 1 apache apache  4463277 Jun 13 16:43 5f49fc9836f97aabc92129a734042d6bedc6133aa8e90a4cd979976c1416ee8d-updateinfo.xml
-rw-r--r--. 1 apache apache  8375678 Jun 13 16:43 72a401250ba38c27e7908f060c764fa3bb9a1668-filelists.sqlite.bz2
-rw-r--r--. 1 apache apache     2159 Jun 13 16:43 7b1e1e2df060d31a9af15eec907370fb5c2b09ca520a0505904311d255b5de41-productid.xml
-rw-r--r--. 1 apache apache  1079723 Jun 13 16:43 af0b9937cbaa355e2de826a6def512ab39eae491dcbef1cdd35a21173c9d54a9-group.xml
-rw-r--r--. 1 apache apache 13349835 Jun 13 16:43 b644a5630e3a083233342e7e0ba7871fd26d9efe-primary.sqlite.bz2
-rw-r--r--. 1 apache apache  7137564 Jun 13 16:42 de2e7cda73f0638a9638451df26f723c388c0c60-primary.xml.gz
-rw-r--r--. 1 apache apache  2156455 Jun 13 16:43 de425c7b721bb908f748a39fc6156628d990aa5b-other.sqlite.bz2
-rw-r--r--. 1 apache apache     3796 Jun 13 16:43 repomd.xml
-rw-r--r--. 1 apache apache  9790962 Jun 13 16:42 temp_filelists.xml.gz
-rw-r--r--. 1 apache apache  1572957 Jun 13 16:43 temp_other.xml.gz
-rw-r--r--. 1 apache apache  7137503 Jun 13 16:42 temp_primary.xml.gz
[root@ibm-x3550m3-09 ~]#

Actual results:


Expected results:


Additional info:

Comment 1 Jay Dobies 2013-06-20 12:52:28 UTC
The issue is that the client-side that generates the relative_url (if it's not specified) uses the feed value as the seed data. The name of that option changed for nectar (feed_url became just feed) and that code isn't entering the same branch it used to.

Comment 2 Jay Dobies 2013-06-20 12:53:08 UTC
/home/jdob/code/pulp/pulp_rpm/pulp_rpm/src/pulp_rpm/extension/admin/repo_create_update.py

Line 164:

            if 'feed_url' in importer_config:
                if importer_config['feed_url'] is None:
                    self.prompt.render_failure_message(_('Given repository feed URL is invalid.'))
                    return
                url_parse = urlparse(encode_unicode(importer_config['feed_url']))

                if url_parse[2] in ('', '/'):
                    relative_path = '/' + repo_id
                else:
                    relative_path = url_parse[2]
                yum_distributor_config['relative_url'] = relative_path
            else:
                yum_distributor_config['relative_url'] = repo_id

Comment 3 Jay Dobies 2013-06-20 13:32:07 UTC
https://github.com/pulp/pulp_rpm/pull/259

Comment 4 Jeff Ortel 2013-06-21 02:45:35 UTC
build: 2.2.0-0.5.beta

Comment 5 Preethi Thomas 2013-06-21 20:55:29 UTC
verified
[root@ibm-x3550m3-13 ~]# rpm -q pulp-server
pulp-server-2.2.0-0.5.beta.fc18.noarch
[root@ibm-x3550m3-13 ~]# 

[root@ibm-x3550m3-13 ~]# pulp-admin rpm repo sync run --repo-id rhel5-4
+----------------------------------------------------------------------+
                   Synchronizing Repository [rhel5-4]
+----------------------------------------------------------------------+

This command may be exited by pressing ctrl+c without affecting the actual
operation on the server.

Downloading metadata...
[-]
... completed

Downloading repository content...
[==================================================] 100%
RPMs:       1348/1348 items
Delta RPMs: 0/0 items

... completed

Downloading distribution files...
[==================================================] 100%
Distributions: 0/0 items
... completed

Importing errata...
[-]
... completed

Importing package groups/categories...
[\]
... completed

Publishing packages...
[==================================================] 100%
Packages: 11703/11703 items
... completed

Publishing distributions...
[==================================================] 100%
Distributions: 0/0 items
... completed

Generating metadata
[\]
... completed

Publishing repository over HTTPS
[-]
... completed

[root@ibm-x3550m3-13 ~]# /var/lib/pulp/published/https/repos/
content/ repos/   zoo/     
[root@ibm-x3550m3-13 ~]# /var/lib/pulp/published/https/repos/
content/ repos/   zoo/     
[root@ibm-x3550m3-13 ~]# ls -l /var/lib/pulp/published/https/repos/content/dist/rhel/rhui/server/5/5.9/i386/os/repodata/
total 98836
-rw-r--r--. 1 apache apache     2155 Jun 21 16:32 3e139224c9eae2bbde13f137e8057de6786a47e78791af2310fc32d2f09815b1-productid.xml
-rw-r--r--. 1 apache apache 27925516 Jun 21 16:30 42023eca336324bf77e2250c98266ff1c00edf5287b341693bde7758345b8c0e-filelists.xml.gz
-rw-r--r--. 1 apache apache  1849481 Jun 21 16:30 505a72982624ea34293d6131aec154f55e96bd0a404d21d99499520738241e1c-primary.xml.gz
-rw-r--r--. 1 apache apache  3623618 Jun 21 16:30 59319e84777da8dfc5f635728501732376b9877a804552244c4c73ed42197e18-other.sqlite.bz2
-rw-r--r--. 1 apache apache  3084500 Jun 21 16:30 7a7612d68bb07f8011577285cbf4a53400ee7168d2587e9d146909fac7a03a4d-other.xml.gz
-rw-r--r--. 1 apache apache   114879 Jun 21 16:32 92aeb292a986910eef17d51112e1c77272840a5e98a18fca13b74cdd6debcfaa-group.xml
-rw-r--r--. 1 apache apache  2137403 Jun 21 16:32 afcd279d2d096caf05e6204ab7989190818b184677ea22e73cddb8ad1704f30a-primary.sqlite.bz2
-rw-r--r--. 1 apache apache 21121644 Jun 21 16:32 d9455acb5f75742891e331e83374e800636b6eec285e0102fad02a8129c07dd9-filelists.sqlite.bz2
-rw-r--r--. 1 apache apache  8457561 Jun 21 16:32 eb4ec715ee75458fa1c8922c87b5133e88beeed55bf285a1b159310d940e1982-updateinfo.xml
-rw-r--r--. 1 apache apache     4247 Jun 21 16:32 repomd.xml
-rw-r--r--. 1 apache apache 27925404 Jun 21 16:30 temp_filelists.xml.gz
-rw-r--r--. 1 apache apache  3084409 Jun 21 16:30 temp_other.xml.gz
-rw-r--r--. 1 apache apache  1849360 Jun 21 16:30 temp_primary.xml.gz
[root@ibm-x3550m3-13 ~]#

Comment 6 Preethi Thomas 2013-09-10 15:43:18 UTC
2.2 released
http://repos.fedorapeople.org/repos/pulp/pulp/stable/2.2/