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 1295654 - "RestlibException: Access denied" when run virt-who with rhsm_username and rhsm_password
Summary: "RestlibException: Access denied" when run virt-who with rhsm_username and rh...
Keywords:
Status: CLOSED DUPLICATE of bug 1229235
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-who
Version: 6.8
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Radek Novacek
QA Contact: Eko
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-05 06:34 UTC by Eko
Modified: 2016-12-01 00:35 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-01-05 06:55:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Eko 2016-01-05 06:34:14 UTC
Description of problem:
configure virt-who with rhsm_username and rhsm_password option for remote libvirt mode,  virt-who can't work and show the error message as: "RestlibException: Access denied" 

Version-Release number of selected component (if applicable):
virt-who-0.16-1.el6.noarch

How reproducible:
always

Steps to Reproduce:
1. configure virt-who with rhsm_username and rhsm_password, such as:
# cat libvirt.conf 
[test-libvirt]
type=libvirt
server=10.66.144.8
username=root
password=redhat
owner=ACME_Corporation
env=Library
rhsm_username=admin
rhsm_password=admin

[Note] the rhsm_username and rhsm_password is used for satellite account.

2. restart virt-who service
# /etc/init.d/virt-who restart

3. check the rhsm.log
2016-01-05 14:31:22,376 [virtwho.init DEBUG] MainProcess(26104):MainThread @virtwho.py:__init__:144 - Using config named 'test-libvirt'
2016-01-05 14:31:22,376 [virtwho.init INFO] MainProcess(26104):MainThread @virtwho.py:main:811 - Using configuration "test-libvirt" ("libvirt" mode)
2016-01-05 14:31:22,394 [virtwho.main DEBUG] MainProcess(26106):MainThread @virtwho.py:run:287 - Starting infinite loop with 60 seconds interval
2016-01-05 14:31:22,480 [virtwho.test-libvirt DEBUG] Libvirtd-1(26114):MainThread @virt.py:run:338 - Virt backend 'test-libvirt' started
2016-01-05 14:31:22,482 [virtwho.test-libvirt INFO] Libvirtd-1(26114):MainThread @libvirtd.py:_get_url:124 - Protocol is not specified in libvirt url, using qemu+ssh://
2016-01-05 14:31:22,482 [virtwho.test-libvirt INFO] Libvirtd-1(26114):MainThread @libvirtd.py:_get_url:135 - Libvirt path is not specified in the url, using /system
2016-01-05 14:31:22,483 [virtwho.test-libvirt INFO] Libvirtd-1(26114):MainThread @libvirtd.py:_connect:156 - Using libvirt url: qemu+ssh://root.144.8/system?no_tty=1
2016-01-05 14:31:22,782 [virtwho.test-libvirt DEBUG] Libvirtd-1(26114):MainThread @libvirtd.py:_listDomains:228 - Virtual machine found: rhel7.2-satellite: 8d3f130d-b8f5-4b5e-3a3b-5d07483a615c
2016-01-05 14:31:22,788 [virtwho.test-libvirt DEBUG] Libvirtd-1(26114):MainThread @libvirtd.py:_listDomains:234 - Virtual machine found: rhel7.2: cb33ddce-fd1e-0e6a-7e7f-d3c6fca67ede
2016-01-05 14:31:22,789 [virtwho.test-libvirt DEBUG] Libvirtd-1(26114):MainThread @libvirtd.py:_listDomains:238 - Libvirt domains found: 8d3f130d-b8f5-4b5e-3a3b-5d07483a615c, cb33ddce-fd1e-0e6a-7e7f-d3c6fca67ede
2016-01-05 14:31:22,789 [virtwho.test-libvirt DEBUG] Libvirtd-1(26114):MainThread @virt.py:enqueue:331 - Report gathered, putting to queue for sending
2016-01-05 14:31:22,793 [virtwho.main DEBUG] MainProcess(26106):MainThread @virtwho.py:update_report_to_send:274 - Report for config "test-libvirt" updated
2016-01-05 14:31:22,800 [virtwho.main DEBUG] MainProcess(26106):MainThread @subscriptionmanager.py:_connect:108 - Authenticating with RHSM username admin
2016-01-05 14:31:23,013 [virtwho.main DEBUG] MainProcess(26106):MainThread @subscriptionmanager.py:hypervisorCheckIn:149 - Checking if server has capability 'hypervisor_async'
2016-01-05 14:31:23,193 [virtwho.main DEBUG] MainProcess(26106):MainThread @subscriptionmanager.py:hypervisorCheckIn:161 - Server does not have 'hypervisors_async' capability
2016-01-05 14:31:23,193 [virtwho.main INFO] MainProcess(26106):MainThread @subscriptionmanager.py:hypervisorCheckIn:170 - Sending update in hosts-to-guests mapping: 1 hypervisors and 2 guests found
2016-01-05 14:31:23,194 [virtwho.main DEBUG] MainProcess(26106):MainThread @subscriptionmanager.py:hypervisorCheckIn:171 - Host-to-guest mapping: {
    "80804c56-82fb-e111-a260-b4b52fcb471e": [
        {
            "guestId": "8d3f130d-b8f5-4b5e-3a3b-5d07483a615c", 
            "state": 1, 
            "attributes": {
                "active": 1, 
                "hypervisorVersion": "0.12.1", 
                "virtWhoType": "libvirt", 
                "hypervisorType": "QEMU"
            }
        }, 
        {
            "guestId": "cb33ddce-fd1e-0e6a-7e7f-d3c6fca67ede", 
            "state": 5, 
            "attributes": {
                "active": 0, 
                "hypervisorVersion": "0.12.1", 
                "virtWhoType": "libvirt", 
                "hypervisorType": "QEMU"
            }
        }
    ]
}
2016-01-05 14:31:23,353 [virtwho.main ERROR] MainProcess(26106):MainThread @subscriptionmanager.py:hypervisorCheckIn:185 - Communication with server failed:
Traceback (most recent call last):
  File "/usr/share/virt-who/manager/subscriptionmanager/subscriptionmanager.py", line 174, in hypervisorCheckIn
    result = self.connection.hypervisorCheckIn(config.owner, config.env, serialized_mapping, options=options)  # pylint:disable=unexpected-keyword-arg
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 918, in hypervisorCheckIn
    res = self.conn.request_post(url, host_guest_mapping)
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 657, in request_post
    return self._request("POST", method, params)
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 571, in _request
    self.validateResponse(result, request_type, handler)
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 621, in validateResponse
    raise RestlibException(response['status'], error_msg, response.get('headers'))
RestlibException: Access denied
2016-01-05 14:31:23,355 [virtwho.main ERROR] MainProcess(26106):MainThread @virtwho.py:send:228 - Unable to send data: Communication with subscription manager failed: Access denied


Actual results:
virt-who can't work and show the error message as: "RestlibException: Access denied" 

Expected results:
virt-who should work normally with rhsm_username and rhsm_password options

Additional info:

Comment 2 Eko 2016-01-05 06:55:34 UTC

*** This bug has been marked as a duplicate of bug 1229235 ***


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