This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 470335 - virt_state.cache causes python PickleError
virt_state.cache causes python PickleError
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Virtualization (Show other bugs)
unspecified
All Linux
medium Severity medium
: ---
: ---
Assigned To: Pradeep Kilambi
Michael Mráka
:
Depends On:
Blocks: 456985 507280
  Show dependency treegraph
 
Reported: 2008-11-06 14:18 EST by Mike McCune
Modified: 2010-10-23 01:40 EDT (History)
9 users (show)

See Also:
Fixed In Version: sat530
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-10 14:29:33 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mike McCune 2008-11-06 14:18:28 EST
Description of problem:

RHEL5.2 x86_64

The poller.py script is runned as a cron job when the client connects to RHN. Recently the job fails resulting in numerous emails to root, containing the following trace:

X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/root>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=root>
X-Cron-Env: <USER=root>

Traceback (most recent call last):
 File "/usr/share/rhn/virtualization/poller.py", line 213, in ?
   debug = options and options.debug)
 File "/usr/share/rhn/virtualization/poller_state_cache.py", line 50, in __init__
   self._load_state()
 File "/usr/share/rhn/virtualization/poller_state_cache.py", line 123, in _load_state
   except PickleError, pe:
NameError: global name 'PickleError' is not defined

How reproducible:

Always.

Steps to Reproduce:

On any RHEL5.2 dom0 (i386/x86_64):

[root@clovertown03 ~]# rm /var/cache/rhn/virt_state.cache
rm: remove regular file `/var/cache/rhn/virt_state.cache'? y
[root@clovertown03 ~]# touch /var/cache/rhn/virt_state.cache
[root@clovertown03 ~]# ls -l /var/cache/rhn/virt_state.cache
-rw-r--r-- 1 root root 0 Nov  4 21:58 /var/cache/rhn/virt_state.cache
[root@clovertown03 ~]# python /usr/share/rhn/virtualization/poller.py
Traceback (most recent call last):
 File "/usr/share/rhn/virtualization/poller.py", line 213, in ?
   debug = options and options.debug)
 File "/usr/share/rhn/virtualization/poller_state_cache.py", line 50, in __init__
   self._load_state()
 File "/usr/share/rhn/virtualization/poller_state_cache.py", line 123, in _load_state
   except PickleError, pe:
NameError: global name 'PickleError' is not defined
[root@clovertown03 ~]#

Actual results:

Trace, bug and piling number of emails from the failing cron job.

Expected results:

No trace, script runs with no errors.

Additional info:

Simply removing the file and re issuing a rhn-profile-sync to re create a consistent cache file fixes the issue.
Comment 1 Mike McCune 2008-11-06 14:19:41 EST
We should figure out why user is getting a zero byte length cache file and also fix client code to not stacktrace while trying to throw an exception.
Comment 4 Rick Beldin 2008-11-19 12:31:39 EST
Had this same problem for months.  

Workaround: 

-  rm /var/cache/rhn/virt_state.cache
- python /usr/share/rhn/virtualization/poller.py

non-zero file created, no more errors.
Comment 5 Dane Butler 2009-01-29 19:58:53 EST
I started getting the issue after upgrading a guest to RHEL5.3 crashed
Rick's workaround has appeared to stop the email alerts
Comment 13 Steve Salevan 2009-08-03 14:47:09 EDT
RELEASE_PENDING from 7/24 build.
Comment 14 Brandon Perkins 2009-09-10 14:29:33 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2009-1434.html

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