Bug 1123910

Summary: yum repolist refers to incorrect URL due to incorrect version
Product: Red Hat Satellite Reporter: Andrew Schofield <andrew.schofield>
Component: Subscription ManagementAssignee: Katello Bug Bin <katello-bugs>
Status: CLOSED NOTABUG QA Contact: Katello QA List <katello-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: UnspecifiedCC: mmccune
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-12 17:31:12 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:
Attachments:
Description Flags
release version screenshot none

Description Andrew Schofield 2014-07-28 15:36:42 UTC
Description of problem:

# subscription-manager unregister
# subscription-manager clean
# subscription-manager register --org="MyOrg"
Username: admin
Password:
The system has been registered with ID: 475ef13b-73a8-4a89-8163-85c17466f68a

Now add subscriptions via Content Hosts on Satellite master.

Enable repos:

# subscription-manager repos --enable rhel-server-6-satellite-6-beta-rpms
Repo rhel-server-6-satellite-6-beta-rpms is enabled for this system.
# subscription-manager repos --enable rhel-server-rhscl-6-rpms
Repo rhel-server-rhscl-6-rpms is enabled for this system.

# yum repolist
This system is receiving updates from Red Hat Subscription Management.
This system is not registered with RHN Classic or Red Hat Satellite.
You can use rhn_register to register.
Red Hat Satellite or RHN Classic support will be disabled.
https://satellite/pulp/repos/MyOrg/GPS_Unix/GPS_Unix_Content/content/dist/rhel/server/6/6Server/x86_64/os/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
rhel-server-6-satellite-6-beta-rpms             | 2.5 kB     00:00
rhel-server-6-satellite-6-beta-rpms/primary     |  93 kB     00:00
rhel-server-6-satellite-6-beta-rpms                   334/334
https://satellite/pulp/repos/MyOrg/GPS_Unix/GPS_Unix_Content/content/dist/rhel/server/6/6Server/x86_64/rhscl/1/os/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
repo id                              repo name                                           status
rhel-6-server-rpms                   Red Hat Enterprise Linux 6 Server (RPMs)                                         12733
rhel-server-6-satellite-6-beta-rpms  Red Hat Satellite 6.0 Beta (for RHEL 6 Server) (RPMs)                                 334
rhel-server-rhscl-6-rpms             Red Hat Software Collections RPMs for Red Hat Enterprise Linux 6 Server                  0
repolist: 13067


This is incorrect:
https://satellite/pulp/repos/MyOrg/GPS_Unix/GPS_Unix_Content/content/dist/rhel/server/6/6Server/x86_64/os/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 

The actual location is 

repos/MyOrg/GPS_Unix/GPS_Unix_Content/content/dist/rhel/server/6.5/x86_64/os/repodata/repomd.xml

Changing the version manually in Content Hosts -> Detail -> Release Version to 6.5 resolves this but this should be auto detected correctly.

How reproducible:
Repeatable following the steps above every time.

Comment 1 RHEL Program Management 2014-07-28 16:04:17 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 3 Mike McCune 2014-08-12 17:31:12 UTC
This is caused by your Content Host not having the right "Release Version"

In the Content Host details page there is an option to set the "Release Version" as seen in the attachment I uploaded to this bug.

Set that to 6.5 and yum should work.  If that is not the case feel free to re-open the bug.

Comment 4 Mike McCune 2014-08-12 17:31:33 UTC
Created attachment 926173 [details]
release version screenshot