Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1505286 - katello-agent disables repos when katello is unreachable
Summary: katello-agent disables repos when katello is unreachable
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: katello-agent
Version: 6.2.12
Hardware: x86_64
OS: Linux
high
high
Target Milestone: Unspecified
Assignee: Jonathon Turel
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks: 1122832
TreeView+ depends on / blocked
 
Reported: 2017-10-23 08:26 UTC by Beat Rubischon
Modified: 2021-03-11 16:03 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-01-10 16:58:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3222091 0 None None None 2017-10-23 08:38:53 UTC

Description Beat Rubischon 2017-10-23 08:26:02 UTC
Description of problem:

Running yum commands with the newly introduced katello-host-tools will disable repos when the Satellite is unreachable. While the repos seems to be reenabled on a content host, upgrading self registered Satellite impossible:

https://access.redhat.com/documentation/en-us/red_hat_satellite/6.2/html/installation_guide/updating_satellite_server_capsule_server_and_content_hosts#updating_satellite_server_to_next_minor_version

Version-Release number of selected component (if applicable):

katello-host-tools-3.0.2-1.el7sat.noarch

How reproducible:

always

Steps to Reproduce:

[root@brownie ~]# cp /etc/yum.repos.d/redhat.repo .
[root@sat62 ~]# katello-service stop

[root@brownie ~]# yum repolist
Loaded plugins: enabled_repos_upload, package_upload, product-id, search-
              : disabled-repos, subscription-manager
repo id                            repo name                              status
!rhel-7-server-rpms/7Server/x86_64 Red Hat Enterprise Linux 7 Server (RPM 17461
repolist: 17461
Uploading Enabled Repositories Report
Loaded plugins: product-id, subscription-manager
Unable to upload Enabled Repositories Report

[root@brownie ~]# diff -u redhat.repo /etc/yum.repos.d/redhat.repo
--- redhat.repo	2017-10-23 10:08:18.667713233 +0200
+++ /etc/yum.repos.d/redhat.repo	2017-10-23 10:11:54.300279883 +0200
@@ -18,7 +18,7 @@
 name = Red Hat Satellite Tools 6.2 (for RHEL 7 Server) (RPMs)
 sslclientkey = /etc/pki/entitlement/9160263376440534332-key.pem
 gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
-enabled = 1
+enabled = 0
 sslcacert = /etc/rhsm/ca/katello-server-ca.pem
 gpgcheck = 1

Actual results:

Repos are disabled, following our instructions to upgrade a self subscribed Satellite will fail.

Expected results:

Repos are available to allow yum to consume the cached content.

Additional info:

Comment 3 Jonathon Turel 2017-12-14 19:28:04 UTC
Beat,

Your reproduction steps do not quite match what is documented on access.redhat.com

To summarize what is written there:

# yum update --downloadonly
# katello-service stop
# yum update

Below those steps is this:

"On a self-registered Satellite, add the --cacheonly option to install all updated packages directly from the yum cache. If a kernel update occurs, make a note to reboot after the upgrade is complete. Do not reboot at this point."

It looks like you're missing the `--cacheonly` flag which it appears you can do on `yum update` and `yum repolist`.

Please give it a try and let me know if it works.

Comment 4 Beat Rubischon 2017-12-21 13:11:03 UTC
Hi Jonathon, luckily we got 6.2.13 today and I had to upgrade my self registered Satellite.

First I listed the repos:

[root@sat62 ~]# yum repolist
...
!rhel-7-server-rpms/7Server/x86_64             Red Hat Enterprise Linux 7 17808
!rhel-7-server-satellite-6.2-rpms/x86_64       Red Hat Satellite 6.2 (for   888
!rhel-7-server-satellite-tools-6.2-rpms/x86_64 Red Hat Satellite Tools 6.   132
!rhel-server-rhscl-7-rpms/7Server/x86_64       Red Hat Software Collectio  9309

And followed the instructions to upgrade a self registered Satellite:

[root@sat62 ~]# yum update --downloadonly
[root@sat62 ~]# katello-service stop
[root@sat62 ~]# yum update --cacheonly
...
Complete!
Uploading Enabled Repositories Report
Loaded plugins: product-id, subscription-manager
Unable to upload Enabled Repositories Report     <-- note this error

Once this error appeared, several repos are no longer enabled:

[root@sat62 ~]# yum repolist
...
!rhel-7-server-rpms/7Server/x86_64 Red Hat Enterprise Linux 7 Server (RPM 17813
repolist: 17813

Hope this helps.

BTW, the rest of the upgrade completed successful this time:

[root@sat62 ~]# satellite-installer --scenario satellite --upgrade
...
Upgrade completed!
[root@sat62 ~]# reboot 

Once the Satellite is back, the repositories are reenabled:

[root@sat62 ~]# yum repolist
...
!rhel-7-server-rpms/7Server/x86_64             Red Hat Enterprise Linux 7 17813
!rhel-7-server-satellite-6.2-rpms/x86_64       Red Hat Satellite 6.2 (for   914
!rhel-7-server-satellite-tools-6.2-rpms/x86_64 Red Hat Satellite Tools 6.   135
!rhel-server-rhscl-7-rpms/7Server/x86_64       Red Hat Software Collectio  9309

I don't know if this disabling is by intention or by accident, in any case it's confusing.

I'll check with the customer if the update is stuck once again as it was when updating to 6.2.12 and provide feedback.

Comment 5 Jonathon Turel 2018-01-02 15:28:44 UTC
Beat,

That is good news! What you're seeing with respect to the repos being disabled is a feature of yum. If Satellite is not running at the time of `yum repolist` then yum will disable the repo (if it's coming from Satellite, or otherwise unreachable). It looks like it's only temporarily based on what you are saying about the reboot.

The 'Unable to upload Enabled Repositories Report' message does not have anything to do with those repos being disabled.

In other words I think everything is normal.

Shall we close this BZ or do you think there is still some action to be taken?

Comment 6 Beat Rubischon 2018-01-05 16:01:20 UTC
Hi Jonathon,

I made some further experiments to better understand the behavior of the disabled repos. Basically it can't be yum by itself, /etc/yum.repos.d is the only source if a repo is enabled or not. In case you would disable a repo by itself, it would never remember it was on.

So far I was not able to reproduce the issue on a RHEL server attached to CDN. killing the default route triggers plenty of errors, but no disabling of repos. It seems to be something special in Satellite.

One way to keep the repos enabled when katello is off is to disable the enabled_repos_upload and subscription-manager plugins:

[root@sat62 ~]# yum repolist --disableplugin=enabled_repos_upload --disableplugin=subscription-manager
Loaded plugins: package_upload, product-id, search-disabled-repos
repo id                                        repo name                  status
!rhel-7-server-rpms/7Server/x86_64             Red Hat Enterprise Linux 7 17881
!rhel-7-server-satellite-6.2-rpms/x86_64       Red Hat Satellite 6.2 (for   914
!rhel-7-server-satellite-tools-6.2-rpms/x86_64 Red Hat Satellite Tools 6.   135
!rhel-server-rhscl-7-rpms/7Server/x86_64       Red Hat Software Collectio  9312
repolist: 28242

Enabling one of the plugins will immediately disable the repos.

So far I do not see an issue on clients attached to a Satellite. They might disable their repos when the Satellite is off, but reenable them whenever it comes back again.

The only major issue is a self subscribed Satellite, when the first command after a "katello-service stop" is something else then "yum update --cacheonly" the upgrade will fail. But I see also a further issue, in case the following "satellite-installer" requests another package (probably the case for yStream updates) it will fail.

From my point of view we might close this BZ, but we have to introduce a fundamental discussion about the supportability of self subscribed Satellites - there are several key issues which are currently unaddressed. I plan to investigate in this direction.

Comment 7 Jonathon Turel 2018-01-10 16:58:38 UTC
Beat, thank you for all the details you provided.

I maintain that the enabled_repos_upload error is a red herring. There isn't any code within that manages repo enablement. I also consulted a developer of the subscription-manager plugin who confirmed that the plugin would not be disabling any repos unless instructed to from the satellite via content overrides which would not be retrievable when the services are stopped.

Going to close this bug as we agreed.

Comment 8 Ian Tewksbury 2018-01-21 15:59:36 UTC
Since this can't be fixed, can the documentation at least be updated with the changes as per https://access.redhat.com/solutions/3222091#comments otherwise everyone is going to hit this bug while following the documentation

Comment 9 Ian Tewksbury 2018-01-21 16:06:22 UTC
I went ahead and opened a doc bug, https://bugzilla.redhat.com/show_bug.cgi?id=1536843


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