RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 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 "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". 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 "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-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 1722560 - When rhsm credentials are wrong then host-to-guest mapping is not gathered
Summary: When rhsm credentials are wrong then host-to-guest mapping is not gathered
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-who
Version: 7.7
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: 7.8
Assignee: Jiri Hnidek
QA Contact: Eko
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-06-20 15:58 UTC by Jiri Hnidek
Modified: 2020-03-31 19:09 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-31 19:09:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github candlepin virt-who pull 224 0 'None' 'closed' '1722560: Make heartbeat more robust' 2019-12-06 07:15:47 UTC
Red Hat Product Errata RHBA-2020:0990 0 None None None 2020-03-31 19:09:12 UTC

Description Jiri Hnidek 2019-06-20 15:58:27 UTC
Description of problem:
When rhsm credentials (rhsm_username, rhsm_password, etc.) for one destination is wrong, then gathering host-to-guest mapping is terminated. This bug is related to new heartbeat REST API call and other problems with connection (too many requests, etc.) causes termination of gathering guest-to-host mapping too.

Version-Release number of selected component (if applicable):
virt-who-0.24.7-1.el7

How reproducible:
100%

Steps to Reproduce:
1. Create configuration file with wrong credentials. Something like this:

[local_libvirt]
type=libvirt
server=qemu:///system
owner=admin

rhsm_hostname=svice
rhsm_port=8443
rhsm_username=admin
rhsm_password=wrong_password
rhsm_org=admin
rhsm_prefix=/candlepin
rhsm_insecure=1

2. Try to run virt-who

[root@localhost ~]# virt-who -d -o -c /path/to/config/file.conf

Actual results:

2019-06-20 17:49:48,603 [virtwho.destination_1059304658735338682 ERROR] MainProcess(8171):Thread-3 @virt.py:run:421 - Thread 'destination_1059304658735338682' fails with exception:
Traceback (most recent call last):
  File "virtwho/virt/virt.py", line 412, in run
    self._run()
  File "virtwho/virt/virt.py", line 368, in _run
    self._send_data(data_to_send)
  File "virtwho/virt/virt.py", line 604, in _send_data
    self.dest.hypervisorHeartbeat(config=self.config, options=self.options)
  File "virtwho/manager/subscriptionmanager/subscriptionmanager.py", line 264, in hypervisorHeartbeat
    result = connection.hypervisorHeartbeat(config['owner'], named_options)
  File "/home/jiri/github/candlepin/subscription_manager/src/rhsm/connection.py", line 1063, in hypervisorHeartbeat
    return self.conn.request_put(url)
  File "/home/jiri/github/candlepin/subscription_manager/src/rhsm/connection.py", line 735, in request_put
    return self._request("PUT", method, params, headers=headers)
  File "/home/jiri/github/candlepin/subscription_manager/src/rhsm/connection.py", line 752, in _request
    info=info, headers=headers)
  File "/home/jiri/github/candlepin/subscription_manager/src/rhsm/connection.py", line 627, in _request
    self.validateResponse(result, request_type, handler)
  File "/home/jiri/github/candlepin/subscription_manager/src/rhsm/connection.py", line 689, in validateResponse
    raise RestlibException(response['status'], error_msg, response.get('headers'))
RestlibException: HTTP error (401 - Unauthorized): Invalid Credentials
2019-06-20 17:49:48,604 [virtwho.destination_1059304658735338682 INFO] MainProcess(8171):Thread-3 @virt.py:_send_data:615 - Error report received
2019-06-20 17:49:48,604 [virtwho.destination_1059304658735338682 DEBUG] MainProcess(8171):Thread-3 @virt.py:run:435 - Thread 'destination_1059304658735338682' stopped after running once
2019-06-20 17:49:49,564 [virtwho.main DEBUG] MainProcess(8171):MainThread @__main__.py:main:25 - virt-who terminated
2019-06-20 17:49:49,564 [virtwho.main DEBUG] MainProcess(8171):MainThread @executor.py:terminate:225 - virt-who is shutting down

Expected results:
Log message with error (traceback) is printed and Host-to-guest mapping is gathered and can be used for other destination with valid credentials.

Additional info:

Comment 8 errata-xmlrpc 2020-03-31 19:09:00 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-2020:0990


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