Bug 1245035

Summary: Failed to send host/guest mapping to satellite5.7
Product: Red Hat Enterprise Linux 7 Reporter: Liushihui <shihliu>
Component: virt-whoAssignee: Radek Novacek <rnovacek>
Status: CLOSED ERRATA QA Contact: Eko <hsun>
Severity: low Docs Contact: Yehuda Zimmerman <yzimmerm>
Priority: low    
Version: 7.2CC: cww, hsun, ktordeur, ldai, ovasik, owwang, pmutha, rnovacek, sgao, yzimmerm
Target Milestone: rcKeywords: ManPageChange, Reopened
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: virt-who-0.17-4.el7 Doc Type: Enhancement
Doc Text:
New channel for registering hypervisors that are not based on Red Hat Enterprise Linux Previously, _virt-who_ consumed one Red Hat Enterprise Linux 6 subscription for each registered hypervisor, even when the registered hypervisor was not Red Hat Enterprise Linux-based. With this update, _virt-who_ creates and uses a new channel named "Hypervisor Base" for hypervisor registration on Satellite 5. As a result, _virt-who_ now uses the "Hypervisor Base" channel for newly registered hypervisors and does not consume unnecessary Red Hat Enterprise Linux 6 subscriptions.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-04 05:05:31 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1127217, 1203710, 1298337, 1313485    

Description Liushihui 2015-07-21 06:01:44 UTC
Description of problem:
No matter virt-who run at libvirt mode/rhevm mode or esx mode, it failed to send host/guest mapping to satellite5.7 as "Unable to refresh HW profile"

Version-Release number of selected component (if applicable):
virt-who-0.14-1.el7.noarch
subscription-manager-1.15.5-1.el7.x86_64
python-rhsm-1.15.3-1.el7.x86_64
Satellite5.7

How reproducible:
Always

Steps to Reproduce:
1. Register system to Satellite5.7
[root@hp-z220-05 product-default]# rhnreg_ks --username admin --password redhat
[root@hp-z220-05 product-default]# subscription-manager identity
server type: RHN Classic
2. Run virt-who to monitor local libvirt
[root@hp-z220-05 product-default]# virt-who -d -b --satellite5 --satellite-server=satellite57.July20.redhat.com --satellite-username=admin --satellite-password=redhat  --libvirt --libvirt-server=qemu://
3. Check virt-who's log
2015-07-21 13:44:37,668 [DEBUG]  @virtwho.py:152 - Starting infinite loop with 3600 seconds interval
2015-07-21 13:44:37,700 [INFO]  @libvirtd.py:115 - Libvirt path is not specified in the url, using /system
2015-07-21 13:44:37,700 [INFO]  @libvirtd.py:136 - Using libvirt url: qemu:///system?no_tty=1
2015-07-21 13:44:37,707 [DEBUG]  @libvirtd.py:215 - Virtual machine found: 6.5_Server_x86_64: 0d6a7081-5175-4fd5-98ae-1ddb9c7a9c65
2015-07-21 13:44:37,707 [DEBUG]  @libvirtd.py:215 - Virtual machine found: 5.10_Server_x86_64: 2bd4e7d9-ebfc-43e9-8b51-a1f43e84ca8b
2015-07-21 13:44:37,707 [DEBUG]  @libvirtd.py:219 - Libvirt domains found: ['0d6a7081-5175-4fd5-98ae-1ddb9c7a9c65', '2bd4e7d9-ebfc-43e9-8b51-a1f43e84ca8b']
2015-07-21 13:44:37,721 [DEBUG]  @satellite.py:72 - Initializing satellite connection to https://satellite57.July20.redhat.com/XMLRPC
2015-07-21 13:44:37,722 [INFO]  @satellite.py:78 - Initialized satellite connection
2015-07-21 13:44:37,722 [INFO]  @satellite.py:155 - Sending update in hosts-to-guests mapping: {'003ac27c-ed28-e211-8973-10604b5b2b19': [<virt.libvirtd.libvirtd.LibvirtdGuest object at 0x1ea6550>, <virt.libvirtd.libvirtd.LibvirtdGuest object at 0x1ea6590>]}
2015-07-21 13:44:37,722 [DEBUG]  @satellite.py:160 - Loading systemid for 003ac27c-ed28-e211-8973-10604b5b2b19
2015-07-21 13:44:37,722 [DEBUG]  @satellite.py:86 - Loading system id info from /var/lib/virt-who/hypervisor-systemid-003ac27c-ed28-e211-8973-10604b5b2b19
2015-07-21 13:44:38,313 [ERROR]  @satellite.py:97 - Unable to refresh HW profile:
Traceback (most recent call last):
  File "/usr/share/virt-who/manager/satellite/satellite.py", line 94, in _load_hypervisor
    "unknown", "6Server", "x86_64", self.username, self.password, {})
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1233, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1587, in __request
    verbose=self.__verbose
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1273, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1306, in single_request
    return self.parse_response(response)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1482, in parse_response
    return u.close()
  File "/usr/lib64/python2.7/xmlrpclib.py", line 794, in close
    raise Fault(**self._stack[0])
Fault: <Fault -70: '\nError Class Code: 70\nError Class Info: \n     All available subscriptions for the requested channel have been exhausted.\n     Please contact a Red Hat Satellite Sales associate.\nExplanation: \n     An error has occurred while processing your request. If this problem\n     persists please enter a bug report at bugzilla.redhat.com.\n     If you choose to submit the bug report, please be sure to include\n     details of what you were trying to do when this error occurred and\n     details on how to reproduce this problem.\n'>
2015-07-21 13:44:38,314 [ERROR]  @virtwho.py:111 - Unable to send data: Unable to refresh HW profile: <Fault -70: '\nError Class Code: 70\nError Class Info: \n     All available subscriptions for the requested channel have been exhausted.\n     Please contact a Red Hat Satellite Sales associate.\nExplanation: \n     An error has occurred while processing your request. If this problem\n     persists please enter a bug report at bugzilla.redhat.com.\n     If you choose to submit the bug report, please be sure to include\n     details of what you were trying to do when this error occurred and\n     details on how to reproduce this problem.\n'>

Actual results:
Failed to send host/guest mapping as "Unable to refresh HW profile"

Expected results:
virt-who should send host/guest mapping to satellite5.7 successfully

Additional info:
It hasn't this problem

Comment 1 Radek Novacek 2015-08-18 08:03:43 UTC
Reassigning to Satellite 5.

Can someone please explain what does the error mean? Do virt-who use the API incorrectly? Is it configuration issue? Thanks for the explanation.

Comment 2 Tomas Lestach 2015-08-21 15:50:42 UTC
Well, I have no idea, what API was called by virt-who. It's also not clear from the bug report. I do not think it's the 'refresh_hw_profile' API (according to the Unable to refresh HW profile" from the log) as that does not throw rhnFault(70).

"All available subscriptions for the requested channel have been exhausted." exception is generally thrown, if you want to register your system to a channel that is not synced/available at all or the subscription count for that channel was exceeded.

As this BZ does not describe any Satellite 5 misbehavior, I'm reassigning the BZ back to virt-who.

Comment 4 Radek Novacek 2015-08-27 14:18:43 UTC
Liushihui,

Tomas is right, I think you need to have some subscriptions available. Can you please try to add some and retest it?

Comment 5 Liushihui 2015-09-06 01:36:36 UTC
Hi Radek,

After re-deployed a Satellite5.7 and add some subscription available, This bug can't reproduced, virt-who can send host/guest mapping to satellite. Therefore, I close it.

Checked version
virt-who-0.14-4.el7.noarch
subscription-manager-1.15.9-6.el7.x86_64
python-rhsm-1.15.4-2.el7.x86_64
Satellite6.1.0-20150820.0

Checked process:
1. Register system to Satellite5.7
[root@hp-z220-05 product-default]# rhnreg_ks --username admin --password redhat
[root@hp-z220-05 product-default]# subscription-manager identity
server type: RHN Classic
2. Run virt-who to monitor local libvirt
[root@hp-z220-05 ~]# virt-who -d --satellite5 --satellite-server=sat57sep02.redhat.com --satellite-username=admin --satellite-password=redhat  --libvirt --libvirt-serve
r=qemu:// 
3. Check virt-who's log
 2015-09-06 09:13:55,190 INFO: Using configuration "env/cmdline" ("libvirt" mode)
2015-09-06 09:13:55,190 DEBUG: Starting infinite loop with 3600 seconds interval
2015-09-06 09:13:55,220 INFO: Libvirt path is not specified in the url, using /system
2015-09-06 09:13:55,221 INFO: Using libvirt url: qemu:///system?no_tty=1
2015-09-06 09:13:55,230 DEBUG: Libvirt domains found: []
2015-09-06 09:13:55,234 DEBUG: Initializing satellite connection to https://sat57sep02.redhat.com/XMLRPC
2015-09-06 09:13:55,235 INFO: Initialized satellite connection
2015-09-06 09:13:55,235 INFO: Sending update in hosts-to-guests mapping: {'hypervisors': [<virt.virt.Hypervisor object at 0x301e3d0>]}
2015-09-06 09:13:55,235 DEBUG: Loading systemid for 003ac27c-ed28-e211-8973-10604b5b2b19
2015-09-06 09:13:55,235 DEBUG: Loading system id info from /var/lib/virt-who/hypervisor-systemid-003ac27c-ed28-e211-8973-10604b5b2b19
2015-09-06 09:13:56,120 DEBUG: New system created in satellite, system id saved in /var/lib/virt-who/hypervisor-systemid-003ac27c-ed28-e211-8973-10604b5b2b19
2015-09-06 09:13:56,120 DEBUG: Building plan for hypervisor 003ac27c-ed28-e211-8973-10604b5b2b19: []
2015-09-06 09:13:56,120 DEBUG: Sending plan: [[0, 'exists', 'system', {'uuid': '0000000000000000', 'identity': 'host'}], [0, 'crawl_began', 'system', {}], [0, 'crawl_ended', 'system', {}]]
^C2015-09-06 09:17:31,068 DEBUG: virt-who shut down started

Comment 7 Radek Novacek 2015-09-08 13:30:00 UTC
It looks like you don't have some required subscriptions available. Can you please check what subscriptions do you have available in the Satellite 5.7?

Comment 9 Radek Novacek 2015-09-15 13:53:34 UTC
Nice catch, I'll add a notice about this to virt-who manual pages in next release of RHEL.

Comment 14 Radek Novacek 2016-04-21 12:06:52 UTC
I've added following error message that will appear when no available channel is found (possibly caused by satellite-sync not being run).

Unable to find channel to register to. Make sure that satellite-sync was ran on the Satellite 5 server

Comment 15 Radek Novacek 2016-05-17 13:00:52 UTC
Fixed in virt-who-0.17-1.el7.

Comment 17 Liushihui 2016-06-02 01:45:01 UTC
Reopen it on virt-who-0.17-1.el7.noarch since virt-who can't send mapping info to satellite5.7 although satellite has run "satellite-sync" successfully.

Checked version:
satellite5.7
virt-who-0.17-2.el7.noarch
subscription-manager-1.17.6-1.el7.x86_64
python-rhsm-1.17.2-1.el7.x86_64

Checked process:
1 Before sync channel on satellite5.7, register system to satellite, it will show error info.
[root@intel-canoepass-10 ~]# rhnreg_ks --username admin --password admin
Error communicating with server. The message was:

Error Class Code: 70
Error Class Info: 
     All available subscriptions for the requested channel have been exhausted.
     Please contact a Red Hat Satellite Sales associate.
Explanation: 
     An error has occurred while processing your request. If this problem
     persists please consult the Red Hat Customer Portal Knowledge Base
     landing page on common registration Error Class Codes at
     https://access.redhat.com/solutions/17036 for a possible resolution.
     If you choose to open a support case in the Red Hat Customer Portal,
     please be sure to include details of what you were trying to do when
     this error occurred and specifics on how to reproduce this problem.

2. Run "satellite-sync" on satellite
[root@sat57nosyn cdrom]# satellite-sync -c rhel-x86_64-server-7 --no-errata --no-kickstarts --no-packages --no-rpms
09:20:10 Red Hat Satellite - live synchronization
09:20:10    url: https://satellite.rhn.redhat.com
09:20:10    debug/output level: 1
09:20:12    db:  rhnuser/<password>@rhnschema
09:20:12 
09:20:12 Retrieving / parsing channel-families data
09:20:14 channel-families data complete
09:20:14 
09:20:14 Retrieving / parsing product names data
09:20:16 product names data complete
09:20:18 
09:20:18 Retrieving / parsing arches data
09:20:20 arches data complete
09:20:20 
09:20:20 Retrieving / parsing additional arches data
09:20:21 additional arches data complete
09:20:21 
09:20:21 Retrieving / parsing channel data
09:20:48    p = previously imported/synced channel
09:20:48    . = channel not yet imported/synced
09:20:48    base-channels:
09:20:48       . rhel-x86_64-server-7                     10862 
09:20:48 
09:20:54 Channel data complete
    Import complete:
        Begin time: Thu Jun  2 09:20:09 2016
        End time:   Thu Jun  2 09:20:54 2016
        Elapsed:    0 hours, 0 minutes, 45 seconds

3. Register system to satellite again,register successfully.
[root@intel-canoepass-10 ~]# rhnreg_ks --username admin --password admin
[root@intel-canoepass-10 ~]# subscription-manager  identity
server type: RHN Classic

4. Check sync channel on satellite webUI, it definitely exist on channels.

5. Run virt-who at libvirt mode
[root@intel-canoepass-10 ~]# virt-who -d -o --satellite5 --satellite-server=sat57nosyn.redhat.com --satellite-username=admin --satellite-password=admin  --libvirt --libvirt-server=qemu://
2016-06-01 21:32:50,027 [virtwho.init INFO] MainProcess(198460):MainThread @main.py:main:157 - Using configuration "env/cmdline" ("libvirt" mode)
2016-06-01 21:32:50,028 [virtwho.init INFO] MainProcess(198460):MainThread @main.py:main:159 - Using reporter_id='intel-canoepass-10.lab.bos.redhat.com-9d2345224fb845f4a308168201f333ee'
2016-06-01 21:32:50,059 [virtwho.env_cmdline DEBUG] Libvirtd-1(198466):MainThread @virt.py:run:364 - Virt backend 'env/cmdline' started
2016-06-01 21:32:50,061 [virtwho.env_cmdline INFO] Libvirtd-1(198466):MainThread @libvirtd.py:_get_url:136 - Libvirt path is not specified in the url, using /system
2016-06-01 21:32:50,061 [virtwho.env_cmdline INFO] Libvirtd-1(198466):MainThread @libvirtd.py:_connect:157 - Using libvirt url: qemu:///system?no_tty=1
2016-06-01 21:32:50,077 [virtwho.env_cmdline DEBUG] Libvirtd-1(198466):MainThread @libvirtd.py:_listDomains:245 - Libvirt domains found: 4d25d078-112d-42ad-8710-226b760ec9e5
2016-06-01 21:32:50,077 [virtwho.env_cmdline DEBUG] Libvirtd-1(198466):MainThread @virt.py:enqueue:357 - Report for config "env/cmdline" gathered, putting to queue for sending
2016-06-01 21:32:50,088 [virtwho.main DEBUG] MainProcess(198460):MainThread @satellite.py:_connect:74 - Initializing satellite connection to https://sat57nosyn.redhat.com/XMLRPC
2016-06-01 21:32:50,089 [virtwho.main DEBUG] MainProcess(198460):MainThread @satellite.py:_connect:80 - Initialized satellite connection
2016-06-01 21:32:50,089 [virtwho.main INFO] MainProcess(198460):MainThread @satellite.py:hypervisorCheckIn:162 - Sending update in hosts-to-guests mapping: 1 hypervisors and 1 guests found
2016-06-01 21:32:50,090 [virtwho.main DEBUG] MainProcess(198460):MainThread @satellite.py:hypervisorCheckIn:164 - Host-to-guest mapping: {
    "hypervisors": [
        {
            "hypervisorId": {
                "hypervisorId": "0370b9ba-59f9-45de-96d7-78f6f2eb78a4"
            }, 
            "guestIds": [
                {
                    "guestId": "4d25d078-112d-42ad-8710-226b760ec9e5", 
                    "state": 1, 
                    "attributes": {
                        "active": 1, 
                        "virtWhoType": "libvirt"
                    }
                }
            ], 
            "facts": {
                "hypervisor.type": "QEMU", 
                "cpu.cpu_socket(s)": "1", 
                "hypervisor.version": 2006000
            }
        }
    ]
}
2016-06-01 21:32:50,090 [virtwho.main DEBUG] MainProcess(198460):MainThread @satellite.py:hypervisorCheckIn:169 - Loading systemid for 0370b9ba-59f9-45de-96d7-78f6f2eb78a4
2016-06-01 21:32:50,090 [virtwho.main DEBUG] MainProcess(198460):MainThread @satellite.py:_load_hypervisor:88 - Loading system id info from /var/lib/virt-who/hypervisor-systemid-0370b9ba-59f9-45de-96d7-78f6f2eb78a4
2016-06-01 21:32:51,078 [virtwho.env_cmdline DEBUG] Libvirtd-1(198466):MainThread @virt.py:run:383 - Virt backend 'env/cmdline' stopped after sending one report
=========================Failed to send mapping info========================
2016-06-01 21:32:51,825 [virtwho.main ERROR] MainProcess(198460):MainThread @executor.py:send:143 - Unable to send data: Unable to find channel to register to. Make sure that satellite-sync was ran on the Satellite 5 server
============================================================================
nel to register to. Make sure that satellite-sync was ran on the Satellite 5 server
2016-06-01 21:32:51,825 [virtwho.main DEBUG] MainProcess(198460):MainThread @executor.py:send_report:108 - Report from "env/cmdline" failed to sent


Result:
Although run "satellite-sync" successfully, virt-who still can't send mapping info to satellite5.7.

Comment 18 Radek Novacek 2016-06-09 07:26:11 UTC
I suspect that this line might be a problem:

satellite-sync -c rhel-x86_64-server-7 --no-errata --no-kickstarts --no-packages --no-rpms

virt-who (for historic reasons) want rhel-6 server channel. Can you try to sync also rhel-6 channels?

This should be resolved once satellite 5 starts supporting registration without using any subscription. See bug 1336656 and bug 1141832.

Comment 19 Liushihui 2016-06-12 08:51:02 UTC
After sync rhel-x86_64-server-6 on satellite5.7, it will show new error info in the log when run virt-who at libvirt mode. please see detail as the following:

1. sync rhel-x86_64-server-6 channel. success to sync it.
[root@sat57nosyn cdrom]# satellite-sync -c rhel-x86_64-server-6 --no-errata --no-kickstarts --no-packages --no-rpms
14:41:34 Red Hat Satellite - live synchronization
14:41:34    url: https://satellite.rhn.redhat.com
14:41:34    debug/output level: 1
14:41:36    db:  rhnuser/<password>@rhnschema
14:41:36 
14:41:36 Retrieving / parsing channel-families data
14:41:40 channel-families data complete
14:41:40 
14:41:40 Retrieving / parsing product names data
14:41:42 product names data complete
14:41:45 
14:41:45 Retrieving / parsing arches data
14:41:47 arches data complete
14:41:47 
14:41:47 Retrieving / parsing additional arches data
14:41:48 additional arches data complete
14:41:48 
14:41:48 Retrieving / parsing channel data
14:42:18    p = previously imported/synced channel
14:42:18    . = channel not yet imported/synced
14:42:18    base-channels:
14:42:18       . rhel-x86_64-server-6                     17993 
14:42:18 
14:42:25 Channel data complete
    Import complete:
        Begin time: Sun Jun 12 14:41:34 2016
        End time:   Sun Jun 12 14:42:25 2016
        Elapsed:    0 hours, 0 minutes, 50 seconds

2. Run virt-who at libvirt mode.
[root@hp-moonshot-01-c29 ~]# virt-who -d -o --satellite5 --satellite-server=sat57nosyn.redhat.com --satellite-username=admin --satellite-password=admin  --libvirt --libvirt-server=qemu://
2016-06-12 04:18:07,998 [virtwho.init INFO] MainProcess(31293):MainThread @main.py:main:157 - Using configuration "env/cmdline" ("libvirt" mode)
2016-06-12 04:18:07,998 [virtwho.init INFO] MainProcess(31293):MainThread @main.py:main:159 - Using reporter_id='hp-moonshot-01-c29.ml3.eng.bos.redhat.com-5984d66754b44288934dbeee544460aa'
2016-06-12 04:18:08,022 [virtwho.env_cmdline DEBUG] Libvirtd-1(31299):MainThread @virt.py:run:364 - Virt backend 'env/cmdline' started
2016-06-12 04:18:08,022 [virtwho.env_cmdline INFO] Libvirtd-1(31299):MainThread @libvirtd.py:_get_url:136 - Libvirt path is not specified in the url, using /system
2016-06-12 04:18:08,023 [virtwho.env_cmdline INFO] Libvirtd-1(31299):MainThread @libvirtd.py:_connect:157 - Using libvirt url: qemu:///system?no_tty=1
2016-06-12 04:18:08,031 [virtwho.env_cmdline ERROR] Libvirtd-1(31299):MainThread @virt.py:run:377 - Virt backend 'env/cmdline' fails with exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/virtwho/virt/virt.py", line 372, in run
    self._run()
  File "/usr/lib/python2.7/site-packages/virtwho/virt/libvirtd/libvirtd.py", line 197, in _run
    report = self._get_report()
  File "/usr/lib/python2.7/site-packages/virtwho/virt/libvirtd/libvirtd.py", line 223, in _get_report
    return HostGuestAssociationReport(self.config, self._getHostGuestMapping())
  File "/usr/lib/python2.7/site-packages/virtwho/virt/libvirtd/libvirtd.py", line 286, in _getHostGuestMapping
    Hypervisor.HYPERVISOR_VERSION_FACT: self.virt.getVersion(),
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 3984, in getVersion
    if ret == -1: raise libvirtError ('virConnectGetVersion() failed', conn=self)
libvirtError: internal error: Cannot find suitable emulator for x86_64
2016-06-12 04:18:08,032 [virtwho.env_cmdline DEBUG] Libvirtd-1(31299):MainThread @virt.py:enqueue:357 - Report for config "env/cmdline" gathered, putting to queue for sending
2016-06-12 04:18:08,033 [virtwho.env_cmdline DEBUG] Libvirtd-1(31299):MainThread @virt.py:run:383 - Virt backend 'env/cmdline' stopped after sending one report
2016-06-12 04:18:08,033 [virtwho.main WARNING] MainProcess(31293):MainThread @executor.py:run:247 - Unable to collect report for config "env/cmdline"
2016-06-12 04:18:08,034 [virtwho.main DEBUG] MainProcess(31293):MainThread @__main__.py:main:19 - virt-who terminated

3. Check my rhel7.3 host:
      Beaker Test information:
                         HOSTNAME=hp-moonshot-01-c29.ml3.eng.bos.redhat.com
                            JOBID=1366773
                         RECIPEID=2787898
                    RESULT_SERVER=[::1]:7083
                           DISTRO=RHEL-7.3-2

Comment 20 Radek Novacek 2016-06-14 06:11:13 UTC
This error seems to be caused by running libvirt on computer without virtualization acceleration. Did you ran the test on real HW or virtual machine? Do you have virtualization acceleration enabled in BIOS?

Comment 21 Liushihui 2016-06-15 08:00:52 UTC
Radek, I used real HW to do this test and it is enabled "virtualization acceleration" in BIOS. 
my env is:
HW host: 10.66.144.3 root/red2015
Satellite5.7: 10.66.128.78 root/redhat  webUI: admin/redhat

(In reply to Radek Novacek from comment #20)
> This error seems to be caused by running libvirt on computer without
> virtualization acceleration. Did you ran the test on real HW or virtual
> machine? Do you have virtualization acceleration enabled in BIOS?

Comment 22 Radek Novacek 2016-06-16 13:38:01 UTC
I've just installed qemu-kvm package on the system, restarted libvirtd and the error is gone.

Comment 23 Radek Novacek 2016-06-30 07:13:58 UTC
virt-who now creates new channel called "hypervisor-base" and use that for hypervisor registration.

It means that having RHEL-6 subscription available is no longer necessary.

Please note that this only affects registration of new systems. Systems that are already registered will continue to use the same channel.

https://github.com/virt-who/virt-who/commit/e21bccaf987c6f724819011b4b44751ad60f5564

Comment 24 Radek Novacek 2016-06-30 08:22:09 UTC
Fixed in virt-who-0.17-4.el7.

Comment 25 Liushihui 2016-07-27 06:11:50 UTC
Verified it on virt-who-0.17-6.el7 since it won't generate any error info when virt-who send local libvirt mapping info to satellite5.7. Therefore, verified it.

Verified version:
virt-who-0.17-6.el7.noarch
subscription-manager-1.17.9-1.el7.x86_64 
python-rhsm-1.17.5-1.el7.x86_64

Verified process:
1. Register system to Satellite5.7
[root@hp-microservergen8-01 ~]# rhnreg_ks --username admin --password redhat
[root@hp-microservergen8-01 ~]# subscription-manager identity
server type: RHN Classic
2. Run virt-who to monitor local libvirt
[root@hp-microservergen8-01 ~]# virt-who -d -o --satellite5 --satellite-server=satellite57.July20.redhat.com --satellite-username=admin --satellite-password=redhat  --libvirt --libvirt-server=qemu://
2016-07-27 02:05:31,934 [virtwho.init INFO] MainProcess(51113):MainThread @main.py:main:160 - Using configuration "env/cmdline" ("libvirt" mode)
2016-07-27 02:05:31,934 [virtwho.init INFO] MainProcess(51113):MainThread @main.py:main:162 - Using reporter_id='hp-microservergen8-01.ml3.eng.bos.redhat.com-7f98a6f2c3d140578ed8088db627b31a'
2016-07-27 02:05:31,974 [virtwho.env_cmdline DEBUG] Libvirtd-1(51119):MainThread @virt.py:run:364 - Virt backend 'env/cmdline' started
2016-07-27 02:05:31,975 [virtwho.env_cmdline INFO] Libvirtd-1(51119):MainThread @libvirtd.py:_get_url:136 - Libvirt path is not specified in the url, using /system
2016-07-27 02:05:31,975 [virtwho.env_cmdline INFO] Libvirtd-1(51119):MainThread @libvirtd.py:_connect:157 - Using libvirt url: qemu:///system?no_tty=1
2016-07-27 02:05:32,007 [virtwho.env_cmdline DEBUG] Libvirtd-1(51119):MainThread @libvirtd.py:_listDomains:245 - Libvirt domains found: 5af1b0c0-5cda-4a56-a84a-9c60f8f85d0a
2016-07-27 02:05:32,007 [virtwho.env_cmdline DEBUG] Libvirtd-1(51119):MainThread @virt.py:enqueue:357 - Report for config "env/cmdline" gathered, putting to queue for sending
2016-07-27 02:05:32,021 [virtwho.main DEBUG] MainProcess(51113):MainThread @satellite.py:_connect:75 - Initializing satellite connection to https://sat57.jul21.redhat.com/XMLRPC
2016-07-27 02:05:32,022 [virtwho.main DEBUG] MainProcess(51113):MainThread @satellite.py:_connect:84 - Initialized satellite connection
2016-07-27 02:05:32,022 [virtwho.main INFO] MainProcess(51113):MainThread @satellite.py:hypervisorCheckIn:208 - Sending update in hosts-to-guests mapping: 1 hypervisors and 1 guests found
2016-07-27 02:05:32,022 [virtwho.main DEBUG] MainProcess(51113):MainThread @satellite.py:hypervisorCheckIn:210 - Host-to-guest mapping: {
    "hypervisors": [
        {
            "hypervisorId": {
                "hypervisorId": "33323137-3831-584d-3233-343530304341"
            }, 
            "guestIds": [
                {
                    "guestId": "5af1b0c0-5cda-4a56-a84a-9c60f8f85d0a", 
                    "state": 1, 
                    "attributes": {
                        "active": 1, 
                        "virtWhoType": "libvirt"
                    }
                }
            ], 
            "facts": {
                "hypervisor.type": "QEMU", 
                "cpu.cpu_socket(s)": "1", 
                "hypervisor.version": 1005003
            }
        }
    ]
}
2016-07-27 02:05:32,022 [virtwho.main DEBUG] MainProcess(51113):MainThread @satellite.py:hypervisorCheckIn:215 - Loading systemid for 33323137-3831-584d-3233-343530304341
2016-07-27 02:05:32,022 [virtwho.main DEBUG] MainProcess(51113):MainThread @satellite.py:_load_hypervisor:155 - Loading system id info from /var/lib/virt-who/hypervisor-systemid-33323137-3831-584d-3233-343530304341
2016-07-27 02:05:33,008 [virtwho.env_cmdline DEBUG] Libvirtd-1(51119):MainThread @virt.py:run:383 - Virt backend 'env/cmdline' stopped after sending one report
2016-07-27 02:05:34,521 [virtwho.main DEBUG] MainProcess(51113):MainThread @satellite.py:_register_system:95 - Using existing hypervisor-base channel
2016-07-27 02:05:36,906 [virtwho.main DEBUG] MainProcess(51113):MainThread @satellite.py:_register_system:146 - New system created in satellite, system id saved in /var/lib/virt-who/hypervisor-systemid-33323137-3831-584d-3233-343530304341
2016-07-27 02:05:36,906 [virtwho.main DEBUG] MainProcess(51113):MainThread @satellite.py:hypervisorCheckIn:218 - Building plan for hypervisor 33323137-3831-584d-3233-343530304341: [Guest('5af1b0c0-5cda-4a56-a84a-9c60f8f85d0a', 'libvirt', 1)]
2016-07-27 02:05:36,906 [virtwho.main DEBUG] MainProcess(51113):MainThread @satellite.py:hypervisorCheckIn:223 - Sending plan: [[0, 'exists', 'system', {'uuid': '0000000000000000', 'identity': 'host'}], [0, 'crawl_began', 'system', {}], [0, 'exists', 'domain', {'state': 'running', 'memory_size': 0, 'uuid': '5af1b0c05cda4a56a84a9c60f8f85d0a', 'virt_type': 'fully_virtualized', 'vcpus': 1, 'name': 'VM 5af1b0c0-5cda-4a56-a84a-9c60f8f85d0a from libvirt hypervisor 33323137-3831-584d-3233-343530304341'}], [0, 'crawl_ended', 'system', {}]]
2016-07-27 02:05:38,071 [virtwho.main INFO] MainProcess(51113):MainThread @satellite.py:hypervisorCheckIn:234 - Mapping for config "env/cmdline" updated
2016-07-27 02:05:38,071 [virtwho.main DEBUG] MainProcess(51113):MainThread @executor.py:send_report:101 - Report for config "env/cmdline" sent
2016-07-27 02:05:38,072 [virtwho.main DEBUG] MainProcess(51113):MainThread @__main__.py:main:19 - virt-who terminated
2016-07-27 02:05:38,072 [virtwho.main DEBUG] MainProcess(51113):MainThread @executor.py:terminate:303 - virt-who is shutting down

3. In satellite5.7 webUI, go to system page, it will show a " libvirt hypervisor 33323137-3831-584d-3233-343530304341". this system auto Subscribed Channel is "Hypervisor Base"

Comment 28 Radek Novacek 2016-09-29 14:34:42 UTC
The updated Doc Text is fine. Thanks.

Comment 30 errata-xmlrpc 2016-11-04 05:05:31 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://rhn.redhat.com/errata/RHBA-2016-2387.html