Bug 1011877

Summary: Increase log level of "Sending update ..." log entry to INFO
Product: Red Hat Enterprise Linux 6 Reporter: Liushihui <shihliu>
Component: virt-whoAssignee: Radek Novacek <rnovacek>
Status: CLOSED ERRATA QA Contact: gaoshang <sgao>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.6CC: bkearney, liliu, ovasik, qianzhan, rbalakri, sgao, shihliu
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: virt-who-0.10-1.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-14 07:13:09 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: 971511    

Description Liushihui 2013-09-25 10:08:41 UTC
Description of problem:
 virt-who running in hyper-V mode normally, Check the /etc/rhsm/rhsm.log, everytime before "Sending update in hosts-to-guests mapping",it will generate two line of "Using NTLM authentication" and "NTLM authentication successful" 

Version-Release number of selected component (if applicable):
subscription-manager-1.9.6-1.el6.x86_64
python-rhsm-1.9.6-1.el6.x86_64
virt-who-0.8-9.el6.noarch
katello-headpin-1.4.3-15.el6sam_splice.noarch
candlepin-0.8.26-1.el6sam.noarch

How reproducible:
Always

Steps to Reproduce:
1. Prepare RHEL6.5 with latest virt-who installed. 
2. Configure virt-who in Hyper-V mode as the following:
[root@hp-z220-03 ~]# cat /etc/sysconfig/virt-who 
    VIRTWHO_BACKGROUND=1
    # Enable debugging output.
    VIRTWHO_DEBUG=1
    VIRTWHO_INTERVAL=5
    # Register ESX machines using vCenter
    VIRTWHO_HYPERV=1
    # Option for ESX mode
	VIRTWHO_HYPERV_OWNER=ACME_Corporation
	VIRTWHO_HYPERV_ENV=Library
	VIRTWHO_HYPERV_SERVER=10.66.13.22
	VIRTWHO_HYPERV_USERNAME=administrator
	VIRTWHO_HYPERV_PASSWORD=qwer1234P
3.Start virt-who service
[root@hp-z220-03 ~]# service virt-who start
[root@hp-z220-03 ~]# service virt-who status
virt-who (pid  15975) is running...
4. Register the RHEL6.5 to SAM server
# Subscription-manager register --username=admin --password=admin
5. Monitor the rhsm log :
# tail -f /var/log/rhsm/rhsm.log 

Actual results:
it will generate the duplicate log info as the following:
2013-09-25 14:00:42,392 [DEBUG]  @virt-who.py:522 - Starting infinite loop with 5 seconds interval and event handling
2013-09-25 14:00:42,396 [DEBUG]  @hyperv.py:215 - Using NTLM authentication
2013-09-25 14:00:42,404 [DEBUG]  @hyperv.py:242 - NTLM authentication successful
2013-09-25 14:00:43,239 [DEBUG]  @subscriptionmanager.py:89 - Sending update in hosts-to-guests mapping: {'60527517-6284-7593-6AAB-75BF2A6375EF': []}
2013-09-25 14:00:44,036 [INFO]  @virt-who.py:217 - Created host: 60527517-6284-7593-6AAB-75BF2A6375EF with guests: []
2013-09-25 14:00:49,044 [DEBUG]  @hyperv.py:215 - Using NTLM authentication
2013-09-25 14:00:49,051 [DEBUG]  @hyperv.py:242 - NTLM authentication successful
2013-09-25 14:00:49,916 [DEBUG]  @subscriptionmanager.py:89 - Sending update in hosts-to-guests mapping: {'60527517-6284-7593-6AAB-75BF2A6375EF': []}
2013-09-25 14:00:55,112 [DEBUG]  @hyperv.py:215 - Using NTLM authentication
2013-09-25 14:00:55,119 [DEBUG]  @hyperv.py:242 - NTLM authentication successful
2013-09-25 14:00:55,985 [DEBUG]  @subscriptionmanager.py:89 - Sending update in hosts-to-guests mapping: {'60527517-6284-7593-6AAB-75BF2A6375EF': []}
2013-09-25 14:01:01,226 [DEBUG]  @hyperv.py:215 - Using NTLM authentication
2013-09-25 14:01:01,233 [DEBUG]  @hyperv.py:242 - NTLM authentication successful
2013-09-25 14:01:02,084 [DEBUG]  @subscriptionmanager.py:89 - Sending update in hosts-to-guests mapping: {'60527517-6284-7593-6AAB-75BF2A6375EF': []}

Expected results:
it shouldn't  generate two line of "Using NTLM authentication" and "NTLM authentication successful" before "Sending update in hosts-to-guests mapping" everytime.

Additional info:
virt-who running in the ESX , libvirt mode hasn't this problem.

Comment 2 Radek Novacek 2014-04-16 06:12:29 UTC
I don't consider this as a bug. These two lines can be quite useful for debugging and since the messages are only on the DEBUG level, I think it's OK to have them there.

On the other hand, it could be useful to increase the level of "Sending update..." log message to INFO.

Do you agree with suggested solution?

Comment 3 Liushihui 2014-04-16 06:21:57 UTC
Yes, I agree with you , increase the level of "Sending update..." log message to INFO should be more clear.

(In reply to Radek Novacek from comment #2)
> I don't consider this as a bug. These two lines can be quite useful for
> debugging and since the messages are only on the DEBUG level, I think it's
> OK to have them there.
> 
> On the other hand, it could be useful to increase the level of "Sending
> update..." log message to INFO.
> 
> Do you agree with suggested solution?

Comment 4 Radek Novacek 2014-06-02 17:41:36 UTC
This bug is fixed upstream and will be resolved by rebase of virt-who, see bug 1002640.

Comment 5 Radek Novacek 2014-06-18 07:26:02 UTC
This bug is fixed by rebase to virt-who-0.10-1.el6.

Comment 7 Liushihui 2014-08-01 09:00:00 UTC
Verified on virt-who-0.10-4.el6.noarch.

Comment 8 errata-xmlrpc 2014-10-14 07:13:09 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.

http://rhn.redhat.com/errata/RHBA-2014-1513.html