Bug 1318288

Summary: [RFE] subscription manager should skip unrelated repos
Product: [Community] Candlepin Reporter: Miroslav Vadkerti <mvadkert>
Component: candlepinAssignee: candlepin-bugs
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: 0.9.54CC: bcourt, dgregor, jsefler, mvadkert, redakkan
Target Milestone: ---Keywords: FutureFeature, Reopened, Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1349976 (view as bug list) Environment:
Last Closed: 2016-04-25 19:34:58 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:
Bug Depends On:    
Bug Blocks: 1257671, 1349976    
Attachments:
Description Flags
rhsm-debug system tarball on a 7.1.z x86_64 machine none

Description Miroslav Vadkerti 2016-03-16 12:44:27 UTC
Description of problem:
While testing RHEL-7.1 EUS via live RHSM account I have found that after auto-attach the system gets also aus repos enabled, which are empty [1]. When doing update the yum will fail on these empty repos with 404.

I contacted release-engineering with the issue and I got this response:

""" It is correct that the 7.1 AUS repo does not exist.  We wouldn't want to create  an empty one just to avoid the 404 as it may give a false impression that 7.1  AUS is supported.  If we want to avoid the 404, I would suggest an RFE against the subscription-manager yum plugin.  It could detect that 7.1 does not apply to AUS and provide some kind of a warning. """

Thus I am filling this bug to get this annoying issue fixed. I am not sure also our customers see this, if so, this could be really unpleasant for them.

Version-Release number of selected component (if applicable):
subscription-manager-1.15.9-15.el7

How reproducible:
100%

Steps to Reproduce:
1. Install RHEL7.1 GA machine
2. Subscribe via qa on live RHSM, auto-attach
3. yum update

Actual results:
https://cdn.redhat.com/content/aus/rhel/server/7/7.1/x86_64/os/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.

Expected results:
Empty AUS repos skipped

Additional info:
I see these issues only on x86_64 RHEL7.1

[1] 
# yum repolist
Loaded plugins: product-id, subscription-manager
https://cdn.redhat.com/content/aus/rhel/server/7/7.1/x86_64/os/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
https://cdn.redhat.com/content/aus/rhel/server/7/7.1/x86_64/os/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
repo id                     repo name                                                            status
rhel-7-server-aus-rpms/x86_64                     Red Hat Enterprise Linux 7 Server - AUS (RPMs)                                                            0
repolist: 0

Comment 1 Barnaby Court 2016-03-17 19:13:05 UTC
Please attach the contents from "rhsm-debug system"to this bug. This is likely a misconfigured product or pool but I need those details to be able to tell for sure.

Comment 2 Miroslav Vadkerti 2016-03-23 12:56:54 UTC
(In reply to Barnaby Court from comment #1)
> Please attach the contents from "rhsm-debug system"to this bug. This is
> likely a misconfigured product or pool but I need those details to be able
> to tell for sure.

I would do that, but it looks like in the mean time somebody deleted those repos!

[SNIP]
[+ rhsm] disabling empty AUS repos for RHEL7.1 x86_64
error in rhsm: (3 retries) command "subscription-manager repos --disable rhel-7-server-aus-rpms --disable rhel-7-server-aus-optional-rpms --disable rhel-sjis-for-rhel-7-server-rpms --disable rhel-7-server-htb-rpms" failed unexpectedly with 1
command output:
Error: rhel-7-server-aus-rpms is not a valid repository ID. Use --list option to see valid repositories.
Error: rhel-7-server-aus-optional-rpms is not a valid repository ID. Use --list option to see valid repositories.
Error: rhel-sjis-for-rhel-7-server-rpms is not a valid repository ID. Use --list option to see valid repositories.
Error: rhel-7-server-htb-rpms is not a valid repository ID. Use --list option to see valid repositories.
[SNIP]

So looks like this issue is now fixed. Kudos to the unknown savior.

Comment 3 Miroslav Vadkerti 2016-04-25 11:24:47 UTC
Reopening ... the issue appeared again

Comment 4 Miroslav Vadkerti 2016-04-25 11:34:12 UTC
(In reply to Barnaby Court from comment #1)
> Please attach the contents from "rhsm-debug system"to this bug. This is
> likely a misconfigured product or pool but I need those details to be able
> to tell for sure.

I am attaching the tarball generated with "rhsm-debug system" ...

Comment 5 Miroslav Vadkerti 2016-04-25 11:34:57 UTC
Created attachment 1150410 [details]
rhsm-debug system tarball on a 7.1.z x86_64 machine

Comment 6 Barnaby Court 2016-04-25 19:34:58 UTC
subscription-manager & candlepin have no way of knowing which repos are valid or invalid between minor versions of RHEL.

Comment 18 Lubos Kocman 2017-01-04 14:38:17 UTC
Hello Miroslav,

comments by Dennis are actually sugesting that this should be fixed by candlepin itself, which is not owned by rel-eng, moving to candlepin.

Lubos