Bug 470335 - virt_state.cache causes python PickleError
Summary: virt_state.cache causes python PickleError
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Virtualization
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Pradeep Kilambi
QA Contact: Michael Mráka
URL:
Whiteboard:
Depends On:
Blocks: 456985 507280
TreeView+ depends on / blocked
 
Reported: 2008-11-06 19:18 UTC by Mike McCune
Modified: 2018-10-20 03:53 UTC (History)
9 users (show)

Fixed In Version: sat530
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-10 18:29:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Mike McCune 2008-11-06 19:18:28 UTC
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 19:19:41 UTC
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 17:31:39 UTC
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-30 00:58:53 UTC
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 18:47:09 UTC
RELEASE_PENDING from 7/24 build.

Comment 14 Brandon Perkins 2009-09-10 18:29:33 UTC
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.