Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 759632 - virt-who debugging output going to stderr always
virt-who debugging output going to stderr always
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: ovirt-node (Show other bugs)
5.8
Unspecified Unspecified
high Severity high
: rc
: ---
Assigned To: Mike Burns
Virtualization Bugs
:
Depends On:
Blocks: 759635
  Show dependency treegraph
 
Reported: 2011-12-02 16:23 EST by Mike Burns
Modified: 2016-04-26 11:05 EDT (History)
7 users (show)

See Also:
Fixed In Version: ovirt-node-1.0-79
Doc Type: Bug Fix
Doc Text:
mburns reviewed -- no tech note needed temporary workaround for bug in a separate package that was reverted in the same release
Story Points: ---
Clone Of: 759631
Environment:
Last Closed: 2012-02-21 00:05:20 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch (1.62 KB, patch)
2011-12-04 09:54 EST, Mike Burns
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:0168 normal SHIPPED_LIVE Important: rhev-hypervisor5 security and bug fix update 2012-02-21 05:01:32 EST

  None (edit)
Description Mike Burns 2011-12-02 16:23:20 EST
+++ This bug was initially created as a clone of Bug #759631 +++

Description of problem:
A machine that is not registered but has virt-who installed and running will spawn a stack trace every minute to stderr.

Unable to read certificate, system is not registered or you are not root
1
Traceback (most recent call last):
  File "/usr/share/virt-who/virt-who.py", line 126, in _send
  File "/usr/share/virt-who/virt-who.py", line 104, in checkConnections
  File "/usr/share/virt-who/virt-who.py", line 81, in initSM
SystemExit: 1
Unexcepted error occurs, trying to recover
Unable to read certificate, system is not registered or you are not root
1
Traceback (most recent call last):
  File "/usr/share/virt-who/virt-who.py", line 126, in _send
  File "/usr/share/virt-who/virt-who.py", line 104, in checkConnections
  File "/usr/share/virt-who/virt-who.py", line 81, in initSM
SystemExit: 1
Unable to recover, retry in 60 seconds.

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

How reproducible:
Always

Actual results:
Stack trace

Expected results:
virt-who either dumps only to a log or silently ignores the error if not registered.  

Additional info:

Found using RHEV-H 5.8.  Simply boot the machine and wait, you'll get the above stack trace every minute.

Traced this to virt-who.py

    # Print debugging output to stderr too
    logger.addHandler(logging.StreamHandler())

this should probably either be removed or indented to only be active if running in debug mode:


diff --git a/virt-who.py b/virt-who.py
index 32be133..9c3a310 100644
--- a/virt-who.py
+++ b/virt-who.py
@@ -194,8 +194,8 @@ if __name__ == '__main__':
         # Enable debugging output to be writen in /var/log
         logger.setLevel(logging.DEBUG)

-    # Print debugging output to stderr too
-    logger.addHandler(logging.StreamHandler())
+        # Print debugging output to stderr too
+        logger.addHandler(logging.StreamHandler())

     env = os.getenv("VIRTWHO_BACKGROUND", "0").strip().lower()
     if env in ["1", "true"]:
Comment 1 Mike Burns 2011-12-02 16:33:59 EST
Fix is to apply the above patch in common-el5.ks of ovirt-node
Comment 2 Mike Burns 2011-12-04 09:54:35 EST
Created attachment 540342 [details]
Patch
Comment 5 Mike Burns 2012-01-12 19:45:34 EST
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
mburns reviewed -- no tech note needed

temporary workaround for bug in a separate package that was reverted in the same release
Comment 6 errata-xmlrpc 2012-02-21 00:05:20 EST
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/RHSA-2012-0168.html

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