Bug 1313238

Summary: virt-who can't support multi-mode/multi-server when it report mapping info to satellite5.7
Product: Red Hat Enterprise Linux 6 Reporter: Liushihui <shihliu>
Component: virt-whoAssignee: Radek Novacek <rnovacek>
Status: CLOSED DUPLICATE QA Contact: Eko <hsun>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.8CC: gxing, ovasik, rbalakri, sgao
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-10 15:18:37 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:

Description Liushihui 2016-03-01 08:50:10 UTC
Description of problem:
When virt-who send host/guest mapping info to satellite5.7, it can't support config in /etc/virt-who.d/XXX. Therefore, virt-who can't support multi-mode/multi-server. 

Version-Release number of selected component (if applicable):
virt-who-0.16-5.el6.noarch
subscription-manager-1.16.8-3.el6.x86_64
python-rhsm-1.16.6-1.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Register system to satellite5.7
[root@sgi-xe500-01 virt-who.d]# rhnreg_ks --username admin  --password redhat
2. Configure virt-who run at default mode:
[root@sgi-xe500-01 virt-who.d]# cat /etc/sysconfig/virt-who  | grep -v ^# | grep -v ^$
VIRTWHO_DEBUG=1
VIRTWHO_SATELLITE5=1
VIRTWHO_SATELLITE_SERVER=10.66.128.78
VIRTWHO_SATELLITE_USERNAME=admin
VIRTWHO_SATELLITE_PASSWORD=redhat
[root@hp-z220-07 run]# cat /etc/virt-who.d/rhevm 
[test-rhevm1]
type=rhevm
server=https://dell-pesc430-01.rhts.eng.bos.redhat.com:443
username=admin@internal
#encrypted_password=43f282d679adb816f2bb1cf9c18949ec
password=redhat
owner=ACME_Corporation
env=Library
3. Restart virt-who and virt-who log:
2016-03-01 16:46:35,952 [virtwho.main DEBUG] MainProcess(2774):MainThread @virtwho.py:terminate:352 - virt-who is shutting down
2016-03-01 16:46:36,955 [virtwho.main DEBUG] MainProcess(2774):MainThread @virtwho.py:<module>:814 - virt-who terminated
2016-03-01 16:46:37,119 [virtwho.init INFO] MainProcess(2818):MainThread @virtwho.py:parseOptions:630 - Using reporter_id='hp-z220-07.qe.lab.eng.nay.redhat.com'
2016-03-01 16:46:37,121 [virtwho.init DEBUG] MainProcess(2818):MainThread @virtwho.py:__init__:125 - Using config named 'test-rhevm1'
2016-03-01 16:46:37,121 [virtwho.init INFO] MainProcess(2818):MainThread @virtwho.py:main:722 - Using configuration "test-rhevm1" ("rhevm" mode)
2016-03-01 16:46:37,141 [virtwho.main DEBUG] MainProcess(2820):MainThread @virtwho.py:run:229 - Starting infinite loop with 60 seconds interval
2016-03-01 16:46:37,241 [virtwho.test-rhevm1 DEBUG] RhevM-1(2829):MainThread @virt.py:run:358 - Virt backend 'test-rhevm1' started
2016-03-01 16:46:45,619 [virtwho.test-rhevm1 DEBUG] RhevM-1(2829):MainThread @virt.py:enqueue:351 - Report gathered, putting to queue for sending
2016-03-01 16:46:45,633 [virtwho.main DEBUG] MainProcess(2820):MainThread @subscriptionmanager.py:_connect:121 - Authenticating with certificate: /etc/pki/consumer/cert.pem
2016-03-01 16:46:45,634 [virtwho.main ERROR] MainProcess(2820):MainThread @virtwho.py:_main:751 - Fatal error:
Traceback (most recent call last):
  File "/usr/share/virt-who/virtwho.py", line 748, in _main
    result = virtWho.run()
  File "/usr/share/virt-who/virtwho.py", line 333, in run
    self.send_current_report()
  File "/usr/share/virt-who/virtwho.py", line 153, in send_current_report
    if self.send(report):
  File "/usr/share/virt-who/virtwho.py", line 197, in send
    self._sendGuestAssociation(report)
  File "/usr/share/virt-who/virtwho.py", line 224, in _sendGuestAssociation
    manager.hypervisorCheckIn(report, self.options)
  File "/usr/share/virt-who/manager/subscriptionmanager/subscriptionmanager.py", line 161, in hypervisorCheckIn
    self._connect(report.config)
  File "/usr/share/virt-who/manager/subscriptionmanager/subscriptionmanager.py", line 124, in _connect
    "Unable to read certificate, system is not registered or you are not root")
SubscriptionManagerUnregisteredError: Unable to read certificate, system is not registered or you are not root
2016-03-01 16:46:45,635 [virtwho.main INFO] MainProcess(2820):MainThread @virtwho.py:_main:753 - Waiting for reload signal

Actual results:
Virt-who can't get host/guest mapping info which config in /etc/virt-who.d/XXX since virt-who go to satellite6/SAM's check logic 

Expected results:
Virt-who can support multi-mode/multi-server when registered to satellite5.7

Additional info:

Comment 1 Radek Novacek 2016-03-10 15:18:37 UTC
This seems to be duplicate of bug 1313197, VIRTWHO_SATELLITE5=1 is not honored.

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