Bug 1181937

Summary: [3.5_6.6]OSError: [Errno 30] Read-only file system: '/var/cache/rhn' when executing cron job 'python /usr/share/rhn/virtualization/poller.pyc'
Product: Red Hat Enterprise Virtualization Manager Reporter: haiyang,dong <hadong>
Component: ovirt-nodeAssignee: Fabian Deutsch <fdeutsch>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 3.5.0CC: cshao, ecohen, eedri, fdeutsch, gklein, gouyang, hadong, huiwa, iheim, leiwang, lsurette, sherold, ycui
Target Milestone: ---   
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: node
Fixed In Version: ovirt-node-3.2.1-5.el6 ovirt-node-3.2.1-5.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-11 21:08:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Node RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description haiyang,dong 2015-01-14 07:16:34 UTC
Description of problem:
OSError: [Errno 30] Read-only file system: '/var/cache/rhn'  when executing cron job 'python  /usr/share/rhn/virtualization/poller.pyc'.

Version-Release number of selected component (if applicable):
rhev-hypervisor6-6.6-20150112.0
ovirt-node-3.1.0-0.42.20150109gitd06b7c5.el6.noarch

How reproducible:
100%

Steps to Reproduce:
1. [root@dhcp-9-150 admin]# cat /etc/cron.d/rhn-virtualization.cron 
0-59/2 * * * * root python  /usr/share/rhn/virtualization/poller.pyc
2. [root@dhcp-9-150 admin]# python /usr/share/rhn/virtualization/poller.pyc
Traceback (most recent call last):
  File "/usr/share/rhn/virtualization/poller.py", line 327, in <module>
  File "/usr/share/rhn/virtualization/poller_state_cache.py", line 72, in save
  File "/usr/share/rhn/virtualization/poller_state_cache.py", line 165, in _save_state
  File "/usr/lib64/python2.6/os.py", line 157, in makedirs
OSError: [Errno 30] Read-only file system: '/var/cache/rhn'

Actual results:
After step2,OSError: [Errno 30] Read-only file system: '/var/cache/rhn'  when executing cron job 'python  /usr/share/rhn/virtualization/poller.pyc'.

Expected results:
No error was happen when executing cron job 'python  /usr/share/rhn/virtualization/poller.pyc'.

Additional info:

Comment 1 Fabian Deutsch 2015-01-15 07:35:17 UTC
I am not sure about the functional impact, at worst this can break any RHN usage.

Comment 3 haiyang,dong 2015-01-20 05:31:08 UTC
Test version:
rhev-hypervisor6-6.6-20150119.0.1.iso
ovirt-node-3.2.1-5.el6.noarch

Test steps:
1. [root@dhcp-66-73-174 log]# cat /etc/cron.d/rhn-virtualization.cron 
0-59/2 * * * * root python  /usr/share/rhn/virtualization/poller.pyc

2. [root@dhcp-66-73-174 log]# python /usr/share/rhn/virtualization/poller.pyc
Traceback (most recent call last):
  File "/usr/share/rhn/virtualization/poller.py", line 327, in <module>
  File "/usr/share/rhn/virtualization/poller_state_cache.py", line 72, in save
  File "/usr/share/rhn/virtualization/poller_state_cache.py", line 165, in _save_state
  File "/usr/lib64/python2.6/os.py", line 157, in makedirs
OSError: [Errno 30] Read-only file system: '/var/cache/rhn'
[root@dhcp-66-73-174 log]# 

so this bug wasn't fixed, change the status into "assigned".

Comment 4 Fabian Deutsch 2015-01-20 08:02:43 UTC
The directory was created at runtime, and that failed. Now we create the dir at build time.

Comment 7 Fabian Deutsch 2015-01-26 09:39:15 UTC
This was actually already included in a build, because we respun RHEV-H, thus moving back to 3.5.0.

Comment 9 haiyang,dong 2015-01-28 11:49:36 UTC
Test version:
rhev-hypervisor6-6.6-20150123.2.iso
ovirt-node-3.2.1-6.el6.noarch

Test steps:
[root@dhcp-66-73-174 admin]# cat /etc/cron.d/rhn-virtualization.cron 
0-59/2 * * * * root python  /usr/share/rhn/virtualization/poller.pyc
[root@dhcp-66-73-174 admin]# python  /usr/share/rhn/virtualization/poller.pyc
[root@dhcp-66-73-174 admin]# echo $?
0

Test result:
No error was happen when executing cron job 'python  /usr/share/rhn/virtualization/poller.pyc'. so this bug has been fixed, changed the status into "VERIFIED".

Comment 11 errata-xmlrpc 2015-02-11 21:08:01 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.

https://rhn.redhat.com/errata/RHEA-2015-0160.html