Bug 1156099 - rhui-disconnected - wrong repo URL after install configuration rpm on client
Summary: rhui-disconnected - wrong repo URL after install configuration rpm on client
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Update Infrastructure for Cloud Providers
Classification: Red Hat
Component: Tools
Version: 2.1.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: John Matthews
QA Contact: Pavlina Bartikova
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-23 14:48 UTC by Pavlina Bartikova
Modified: 2017-03-01 22:09 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-01 22:09:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
screen log (19.76 KB, text/plain)
2014-10-29 16:16 UTC, Pavlina Bartikova
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0367 0 normal SHIPPED_LIVE Red Hat Update Infrastructure 3.0 Release 2017-03-02 03:05:22 UTC

Description Pavlina Bartikova 2014-10-23 14:48:23 UTC
Description of problem:
After install config rpm on client, there is an error: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found".

[root@rhua]# pulp-admin -u admin  -p admin repo info --id rhel-6-server-rhui-rpms-6Server-x86_64

Id                 	rhel-6-server-rhui-rpms-6Server-x86_64
Name               	Red Hat Enterprise Linux 6 Server from RHUI (RPMs) (6Server-x86_64)
Repo URL           	https://localhost.localdomain/pulp/repos/rhel-6-server-rhui-rpms-6Server-x86_64/
Feed URL           	file:///mnt/export//content/dist/rhel/rhui/server/6/6Server/x86_64/os
Feed Type          	local                    
Content Type       	yum                      
Feed Certs         	CA:Yes   Cert:Yes
Consumer Certs     	CA:Yes   Cert:Yes
Architecture       	noarch                   
Sync Schedule      	2014-10-22T18:07:52-04:00/PT6H
Packages           	12948                    
Files              	0                        
Distributions      	None                     
Publish            	True                     
Clones             	[]                       
Groups             	[u'redhat', u'rhel-6-server-rhui-rpms']
Filters            	[]                       
Notes              	{}                       
Preserve Metadata  	True                     
Checksum Type      	sha256

The Repo URL doesn't fit with certificate on client:
[root@cli6 ~]# openssl x509 -in /etc/pki/rhui/product/content.crt -noout -text  | grep content
.9/content/dist/rhel/rhui/server/6/$releasever/$basearch/os


Version-Release number of selected component (if applicable):
RHEL-6.4-RHUI-2.1.3-20131212.0-Server-x86_64-DVD1.iso
rh-rhui-tools-2.1.39-1.el6_5.noarch

How reproducible:


Steps to Reproduce:
1. set rhui-disconnected
2. add entitlement, add RH repo, sync repo, associate to cluster, sync cluster, generate a client entitlement, create client config rpm
3. install config rpm on client
4. run yum command (f.e. yum repolist)

Actual results:
[root@cli6 ~]# yum repolist
https://cds1.example.com/pulp/repos///content/dist/rhel/rhui/server/6/6Server/i386/os/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"

Expected results:
[root@cli6 ~]# yum repolist
List of enabled repositories.


Additional info:

Comment 3 John Matthews 2014-10-24 20:17:07 UTC
Issue is the relative_path of the repos was set to the repo-id and not the relative path we expected.

This happened because the pulp code saw the repo was 'local' and no relative_path was set, so it defaulted to the repo-id.

Fix is to explicitly set the relative_path.

I've built new RPMs with the patch:
  https://brewweb.devel.redhat.com/buildinfo?buildID=395909

For a quick test, you may:
1) re-use your existing RHUA and upgrade the rh-rhui-tools RPM to:
  rh-rhui-tools-2.1.39-4.disconnected.el6.noarch
2) run rhui-manager and delete existing repos
3) verify repos were deleted
4) add new repos 
5) sync
6) verify the published directory looks correct
   check under /var/lib/pulp/repos/

Comment 5 Pavlina Bartikova 2014-10-29 16:16:42 UTC
Created attachment 951841 [details]
screen log

Comment 6 Pavlina Bartikova 2014-10-29 16:17:36 UTC
Screen log is attached.

[root@rhua os]# pwd
/var/lib/pulp/repos/content/dist/rhel/rhui/server/6/6Server/i386/os

[root@cli6 ~]# rpm -Uvh client_rpm-2.0-1.noarch.rpm 
Preparing...                ########################################### [100%]
   1:client_rpm             ########################################### [100%]
enabled = 0
[root@cli6 ~]# yum repolist
Loaded plugins: rhui-lb, security
rhui-rhel-6-server-rhui-rpms                                                                  | 2.1 kB     00:00     
rhui-rhel-6-server-rhui-rpms/primary                                                          |  15 MB     00:00     
rhui-rhel-6-server-rhui-rpms                                                                               9871/9871
repo id                                     repo name                                                         status
rhui-rhel-6-server-rhui-rpms                Red Hat Enterprise Linux 6 Server from RHUI (RPMs)                9,871
repolist: 9,871

Note: After upgrade the rh-rhui-tools RPM is needed update server_url in /etc/rhui/rhui-tools.conf

Moving bug to VERIFIED.

Comment 8 errata-xmlrpc 2017-03-01 22:09:22 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:0367


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