Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 962667

Summary: [Windows Guest Tools] TypeError: encode() argument 1 must be string, not Non - 3.2.7 Guest Agent does not report data
Product: Red Hat Enterprise Virtualization Manager Reporter: Jiri Belka <jbelka>
Component: ovirt-guest-agentAssignee: Vinzenz Feenstra [evilissimo] <vfeenstr>
Status: CLOSED ERRATA QA Contact: Jiri Belka <jbelka>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 3.2.0CC: acathrow, bazulay, dyasny, iheim, italkohe, jbiddle, michal.skrivanek, mkenneth, Rhev-m-bugs, ykaul
Target Milestone: ---Keywords: Regression, TestBlocker, ZStream
Target Release: 3.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: virt
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 963787 (view as bug list) Environment:
Last Closed: 2013-06-10 20:51: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: 963787, 964195    
Attachments:
Description Flags
vdsm logs none

Description Jiri Belka 2013-05-14 08:07:04 UTC
Description of problem:
3.2.7 Guest Agent doest not report data.

Version-Release number of selected component (if applicable):
3.2.7/sf16.1 - Windows XP SP3 as guest OS
vdsm-4.10.2-18.0.el6ev.x86_64

How reproducible:
100%

Steps to Reproduce:
1. install above version of GA
2. check log, check getVmStats on host
3.
  
Actual results:
GA does not report data

Expected results:
GA should report the data

Additional info:

Install.rhev-agent-servece log:
===============================

Dummy-1::INFO::2013-05-12 21:04:54,983::ovirtguestservice::50::root::Starting OVirt Guest Agent service
Dummy-2::INFO::2013-05-12 21:04:54,983::ovirtagentlogic::139::root::Received an external command: refresh...
Dummy-2::ERROR::2013-05-12 21:04:54,983::ovirtagentlogic::135::root::Error while reading the virtio-serial channel.
Traceback (most recent call last):
  File "OVirtAgentLogic.pyc", line 133, in doListen
  File "OVirtAgentLogic.pyc", line 163, in parseCommand
  File "OVirtAgentLogic.pyc", line 180, in sendUserInfo
  File "VirtIoChannel.pyc", line 144, in write
  File "VirtIoChannel.pyc", line 83, in _filter_object
  File "VirtIoChannel.pyc", line 74, in filt
  File "VirtIoChannel.pyc", line 78, in filt
  File "VirtIoChannel.pyc", line 80, in filt
  File "VirtIoChannel.pyc", line 42, in _string_check
TypeError: encode() argument 1 must be string, not None
Dummy-1::INFO::2013-05-12 21:18:34,342::ovirtguestservice::50::root::Starting OVirt Guest Agent service
Dummy-1::INFO::2013-05-13 00:01:13,312::ovirtguestservice::50::root::Starting OVirt Guest Agent service
Dummy-2::INFO::2013-05-13 00:01:13,953::ovirtagentlogic::139::root::Received an external command: refresh...
Dummy-2::ERROR::2013-05-13 00:01:13,953::ovirtagentlogic::135::root::Error while reading the virtio-serial channel.
Traceback (most recent call last):
  File "OVirtAgentLogic.pyc", line 133, in doListen
  File "OVirtAgentLogic.pyc", line 163, in parseCommand
  File "OVirtAgentLogic.pyc", line 180, in sendUserInfo
  File "VirtIoChannel.pyc", line 144, in write
  File "VirtIoChannel.pyc", line 83, in _filter_object
  File "VirtIoChannel.pyc", line 74, in filt
  File "VirtIoChannel.pyc", line 78, in filt
  File "VirtIoChannel.pyc", line 80, in filt
  File "VirtIoChannel.pyc", line 42, in _string_check
TypeError: encode() argument 1 must be string, not None
Dummy-2::INFO::2013-05-13 00:06:22,483::ovirtagentlogic::139::root::Received an external command: refresh...
Dummy-2::ERROR::2013-05-13 00:06:22,500::ovirtagentlogic::135::root::Error while reading the virtio-serial channel.
Traceback (most recent call last):
  File "OVirtAgentLogic.pyc", line 133, in doListen
  File "OVirtAgentLogic.pyc", line 163, in parseCommand
  File "OVirtAgentLogic.pyc", line 180, in sendUserInfo
  File "VirtIoChannel.pyc", line 144, in write
  File "VirtIoChannel.pyc", line 83, in _filter_object
  File "VirtIoChannel.pyc", line 74, in filt
  File "VirtIoChannel.pyc", line 78, in filt
  File "VirtIoChannel.pyc", line 80, in filt
  File "VirtIoChannel.pyc", line 42, in _string_check
TypeError: encode() argument 1 must be string, not None
Dummy-2::INFO::2013-05-13 02:09:49,983::ovirtagentlogic::139::root::Received an external command: refresh...
Dummy-2::ERROR::2013-05-13 02:09:49,983::ovirtagentlogic::135::root::Error while reading the virtio-serial channel.
Traceback (most recent call last):
  File "OVirtAgentLogic.pyc", line 133, in doListen
  File "OVirtAgentLogic.pyc", line 163, in parseCommand
  File "OVirtAgentLogic.pyc", line 180, in sendUserInfo
  File "VirtIoChannel.pyc", line 144, in write
  File "VirtIoChannel.pyc", line 83, in _filter_object
  File "VirtIoChannel.pyc", line 74, in filt
  File "VirtIoChannel.pyc", line 78, in filt
  File "VirtIoChannel.pyc", line 80, in filt

vdsClient -s0 getVmStats $UUID
==============================

# vdsClient -s 0 getVmStats 5e20c541-aaca-4627-bbc5-cd0d19d5e893

5e20c541-aaca-4627-bbc5-cd0d19d5e893
        Status = Up
        username = Unknown
        memUsage = 0
        acpiEnable = true
        session = Unknown
        displaySecurePort = 5901
        timeOffset = -43202
        balloonInfo = {'balloon_max': 1048576, 'balloon_cur': 1048576}
        pauseCode = NOERR
        network = {'vnet0': {'macAddr': '00:1a:4a:e0:3f:c3', 'rxDropped': '0', 'txDropped': '0', 'rxErrors': '0', 'txRate': '0.0', 'rxRate': '0.0', 'txErrors': '0', 'state': 'unknown', 'speed': '1000', 'name': 'vnet0'}}
        vmType = kvm
        cpuUser = 0.75
        elapsedTime = 63202
        displayType = qxl
        cpuSys = 2.80
        appsList = []
        hash = -2296788189011250522
        pid = 23918
        displayIp = 10.34.63.222
        displayPort = 5900
        guestIPs = 
        kvmEnable = true
        disks = {'vda': {'readLatency': '0', 'apparentsize': '2117140480', 'writeLatency': '2299999', 'imageID': '8d92254e-c574-4919-8be1-7178bbce912e', 'flushLatency': '0', 'readRate': '0.00', 'truesize': '2118074368', 'writeRate': '2029.48'}, 'hdc': {'readLatency': '0', 'apparentsize': '0', 'writeLatency': '0', 'flushLatency': '0', 'readRate': '0.00', 'truesize': '0', 'writeRate': '0.00'}}
        monitorResponse = 0
        statsAge = 0.70
        clientIp = 10.34.131.103

Comment 1 Jiri Belka 2013-05-14 08:09:45 UTC
Created attachment 747550 [details]
vdsm logs

Comment 2 Vinzenz Feenstra [evilissimo] 2013-05-15 09:43:44 UTC
Note: Affected are all windows OS because sys.stdout.encoding is not available and set to None when the guest agent runs as a service.

Comment 6 Vinzenz Feenstra [evilissimo] 2013-05-17 06:20:16 UTC
Merged u/s to master as:
http://gerrit.ovirt.org/gitweb?p=ovirt-guest-agent.git;a=commit;h=fec9cb42a0bc193071b7be0d473c1b5418d5c3ef

Comment 8 Jiri Belka 2013-05-21 09:56:10 UTC
OK, 3.2.8.

Comment 13 errata-xmlrpc 2013-06-10 20:51: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.

http://rhn.redhat.com/errata/RHSA-2013-0925.html