Bug 1822039 - Get HTTP error when deploying the virt-who configure plugin
Summary: Get HTTP error when deploying the virt-who configure plugin
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Subscription Management
Version: 6.7.0
Hardware: Unspecified
OS: Unspecified
high
high vote
Target Milestone: 6.8.0
Assignee: Jonathon Turel
QA Contact: Kunxin Huang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-08 06:25 UTC by Kunxin Huang
Modified: 2021-07-27 07:33 UTC (History)
17 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1832936 1851160 (view as bug list)
Environment:
Last Closed: 2020-10-27 13:01:16 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 29521 0 Normal Closed HTTP error when deploying the virt-who configure plugin 2021-02-08 20:08:43 UTC
Red Hat Knowledge Base (Solution) 5022121 0 None None None 2020-04-28 09:42:42 UTC
Red Hat Product Errata RHSA-2020:4366 0 None None None 2020-10-27 13:01:47 UTC

Description Kunxin Huang 2020-04-08 06:25:05 UTC
Description of problem:
Get error when deploying the virt-who configure plugin:
------
2020-04-07 01:57:39,190 [virtwho.destination_2186207709773877717 ERROR] MainProcess(25413):Thread-3 @virt.py:_send_data:609 - Error during heartbeat: Communication with subscription manager failed with code 404: HTTP error (404 - Not Found): 
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/virtwho/virt/virt.py", line 604, in _send_data
    self.dest.hypervisorHeartbeat(config=self.config, options=self.options)
  File "/usr/lib/python2.7/site-packages/virtwho/manager/subscriptionmanager/subscriptionmanager.py", line 274, in hypervisorHeartbeat
    raise ManagerError("Communication with subscription manager failed with code %d: %s" % (e.code, str(e)))
ManagerError: Communication with subscription manager failed with code 404: HTTP error (404 - Not Found): 
------



Version-Release number of selected component (if applicable):
Sat6.7 Snap20.0
virt-who-0.26.5-1.el7.noarch
satellite-6.7.0-7.el7sat.noarch
tfm-rubygem-foreman_virt_who_configure-0.5.2-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_virt_who_configure-0.0.5.1-1.el7sat.noarch



How reproducible:
100%



Steps to Reproduce:
1.Create and deploy the virt-who configure plugin
2.Check the rhsm log



Actual results:
Got error in the rhsm log:
------
2020-04-07 01:57:39,190 [virtwho.destination_2186207709773877717 ERROR] MainProcess(25413):Thread-3 @virt.py:_send_data:609 - Error during heartbeat: Communication with subscription manager failed with code 404: HTTP error (404 - Not Found): 
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/virtwho/virt/virt.py", line 604, in _send_data
    self.dest.hypervisorHeartbeat(config=self.config, options=self.options)
  File "/usr/lib/python2.7/site-packages/virtwho/manager/subscriptionmanager/subscriptionmanager.py", line 274, in hypervisorHeartbeat
    raise ManagerError("Communication with subscription manager failed with code %d: %s" % (e.code, str(e)))
ManagerError: Communication with subscription manager failed with code 404: HTTP error (404 - Not Found): 
------



Additional info:
The plugin can be deployed successfully. It seems the issue came up after Rhel7.8GA as it is the first time we tested the new package(virt-who-0.26.5-1.el7.noarch) in satellite6.7

Comment 5 Mike McCune 2020-04-09 15:13:03 UTC
Kunxin, can you provide the virt-who configuration file you used? This is hard to debug without the configuration file.

Comment 6 Mike McCune 2020-04-09 15:18:42 UTC
I received the same connection refused (but no 404) error on a 6.6 Satellite:

virt-who --one-shot -c /etc/virt-who.d/virt-who-config-2.conf 
2020-04-09 11:17:40,969 [virtwho.rhsm_log INFO] MainProcess(2944):MainThread @config.py:init_config:1493 - Using configuration passed in by -c/--configs; ignoring configuration files in '/etc/virt-who.d/'
2020-04-09 11:17:40,970 [virtwho.rhsm_log INFO] MainProcess(2944):MainThread @config.py:init_config:1532 - [virt-who-config-2]: The original server URL was incomplete. It has been enhanced to https://rhevm1.example.com:8443/
2020-04-09 11:17:40,970 [virtwho.rhsm_log WARNING] MainProcess(2944):MainThread @config.py:init_config:1532 - [virt-who-config-2]: Ignoring unknown configuration option "env"
2020-04-09 11:17:40,970 [virtwho.rhsm_log INFO] MainProcess(2944):MainThread @executor.py:__init__:54 - Using config named 'virt-who-config-2'
2020-04-09 11:17:40,970 [virtwho.rhsm_log INFO] MainProcess(2944):MainThread @main.py:main:162 - Using configuration "virt-who-config-2" ("rhevm" mode)
2020-04-09 11:17:40,970 [virtwho.rhsm_log INFO] MainProcess(2944):MainThread @main.py:main:164 - Using reporter_id='sat-r220-09.lab.eng.rdu2.redhat.com-f4c66e6b9a1b43df9e16c68a746b8612'
2020-04-09 11:17:40,989 [virtwho.main ERROR] MainProcess(2944):Thread-2 @virt.py:run:416 - Thread 'virt-who-config-2' fails with error: Unable to connect to RHEV-M server: ('Connection aborted.', error(111, 'Connection refused'))
2020-04-09 11:17:40,989 [virtwho.main INFO] MainProcess(2944):Thread-2 @virt.py:_send_data:981 - Report for config "virt-who-config-2" gathered, placing in datastore
2020-04-09 11:17:41,981 [virtwho.destination_2773781750832431088 INFO] MainProcess(2944):Thread-3 @subscriptionmanager.py:_connect:155 - X-Correlation-ID: c2ea945b1d7a4e36acac6d6b8cbd757c

Comment 7 Eko 2020-04-10 02:28:20 UTC
Hey Mike, I'm afraid it's the not same issue for your #comment6, according to your comment, virt-who failed to connect RHEV-M, but Kunxin's error log is about the Communication with satellite.

(In reply to Mike McCune from comment #6)
> I received the same connection refused (but no 404) error on a 6.6 Satellite:

> 2020-04-09 11:17:40,989 [virtwho.main ERROR] MainProcess(2944):Thread-2
> @virt.py:run:416 - Thread 'virt-who-config-2' fails with error: Unable to
> connect to RHEV-M server: ('Connection aborted.', error(111, 'Connection
> refused'))

Comment 9 Kunxin Huang 2020-04-10 02:57:04 UTC
(In reply to Mike McCune from comment #5)
> Kunxin, can you provide the virt-who configuration file you used? This is
> hard to debug without the configuration file.

Sure, see comment #8 pls :)

Comment 12 Jonathon Turel 2020-04-13 16:58:47 UTC
Created redmine issue https://projects.theforeman.org/issues/29521 from this bug

Comment 13 Harshad More 2020-04-21 05:38:26 UTC
One of my customers is facing the same error after upgrading satellite to 6.7

2020-04-20 10:36:03,259 [virtwho.destination_-4249964308791227276 ERROR] MainProcess(8544):Thread-4 @virt.py:_send_data:609 - Error during heartbeat: Communication with subscription manager failed with code 404: HTTP error (404 - Not Found):
=======

$ egrep 'virt-who|subscription-manager' installed-rpms 
subscription-manager-1.24.26-1.el7.x86_64                   Fri Apr 17 16:04:43 2020
subscription-manager-rhsm-1.24.26-1.el7.x86_64              Fri Apr 17 16:04:38 2020
subscription-manager-rhsm-certificates-1.24.26-1.el7.x86_64 Fri Apr 17 16:04:38 2020
virt-who-0.26.5-1.el7.noarch                                Fri Apr 17 16:04:43 2020
================================================

Downgrading the virt-who package helped.

# satellite-maintain packages unlock

# yum clean all && yum repolist

# yum downgrade virt-who

# service virt-who restart
# systemctl status virt-who -l

Once the package is downgraded successfully, then run

# satellite-maintain packages lock

# satellite-maintain packages status

# yum clean all && yum repolist
==========================================


no more error observed when run $ systemctl status virt-who -l

Comment 14 Thomas Juberg 2020-04-21 08:29:44 UTC
I can confirm the same issue after upgrading to Satellite 6.7.

The workaround posted by Harshad More solved the issue for us.

Comment 21 errata-xmlrpc 2020-10-27 13:01:16 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 (Important: Satellite 6.8 release), 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/RHSA-2020:4366

Comment 22 John 2021-07-27 04:47:55 UTC
Downgrade to what version?
Fixed in satellite 6.8 release?
What about if I am running foreman/katello.

EVERYTHING RED HAT DOES IS A PITA.

Comment 23 John 2021-07-27 04:49:49 UTC
I am now seeing this error on foreman 2.4.1/katello 4.0.1.2

Why?

Because Red Hat never, ever fixes ANYTHING properly.

Comment 24 Marek Hulan 2021-07-27 07:33:37 UTC
According to the related issues, this has been fixed in Satellite 6.8.0. Please note that this was caused by the change in virt-who package, Katello added the new endpoint the virt-who started to rely on.

If you're running upstream Foreman+Katello projects and not Satellite, please use the upstream projects forum or issue tracker for getting help, not the Satellite issue tracker. The Satellite versions don't map 1:1 to the upstream. Satellite 6.8 is closest to the Katello 3.16.0. Especially in this case, it's really about the combination of versions. If you decide to report this in upstream, please attach your rhsm.log, your virt-who version and other important details, otherwise it's hard to help.

The upstream forum - https://community.theforeman.org/
The upstream issue tracker - https://projects.theforeman.org/


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