Description of problem: Putting non-existent file to pythong, as bonus there's no sendmail so output cannot be sent. # tail cron | grep CROND Apr 9 13:02:01 dell-r210ii-04 CROND[6206]: (root) CMD (python < /usr/share/rhn/virtualization/poller.py) Apr 9 13:02:01 dell-r210ii-04 CROND[6208]: (CRON) EXEC FAILED (/usr/sbin/sendmail): No such file or directory Apr 9 13:02:01 dell-r210ii-04 CROND[6204]: (root) MAIL (mailed 76 bytes of output but got status 0x0001#012) Apr 9 13:04:01 dell-r210ii-04 CROND[6223]: (root) CMD (python < /usr/share/rhn/virtualization/poller.py) Apr 9 13:04:01 dell-r210ii-04 CROND[6225]: (CRON) EXEC FAILED (/usr/sbin/sendmail): No such file or directory Apr 9 13:04:01 dell-r210ii-04 CROND[6221]: (root) MAIL (mailed 76 bytes of output but got status 0x0001#012) Apr 9 13:06:01 dell-r210ii-04 CROND[6233]: (root) CMD (python < /usr/share/rhn/virtualization/poller.py) Apr 9 13:06:01 dell-r210ii-04 CROND[6235]: (CRON) EXEC FAILED (/usr/sbin/sendmail): No such file or directory Apr 9 13:06:01 dell-r210ii-04 CROND[6231]: (root) MAIL (mailed 76 bytes of output but got status 0x0001#012) # cat /etc/cron.d/rhn-virtualization.cron 0-59/2 * * * * root python < /usr/share/rhn/virtualization/poller.py # ls -l /usr/share/rhn/virtualization/poller.py* -rw-r--r--. 1 root root 7679 2012-08-10 09:33 /usr/share/rhn/virtualization/poller.pyc # python < /usr/share/rhn/virtualization/poller.pyc File "<stdin>", line 1 SyntaxError: Non-ASCII character '\xd1' in file <stdin> on line 1, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details Version-Release number of selected component (if applicable): # cat /etc/rhev-hypervisor-release Red Hat Enterprise Virtualization Hypervisor release 6.5 (20140408.0.el6ev) How reproducible: 100% Steps to Reproduce: 1. check /var/log/cron and check /etc/cron.d/rhn-virtualization.cron 2. 3. Actual results: wrong path in cron job, spamming cron log Expected results: ?? Additional info:
It's not clear to me if this is a result of our code, or a problem in an rhn package.
I could reproduce this bug in Red Hat Enterprise Virtualization Hypervisor release 6.5 (20140408.0.el6ev)
(In reply to Fabian Deutsch from comment #1) > It's not clear to me if this is a result of our code, or a problem in an rhn > package. Multiple: We remove the uncompiled poller.py, so the cronjob can't find it. We remove sendmail, so cron can't mail anything (In reply to Jiri Belka from comment #0) > # python < /usr/share/rhn/virtualization/poller.pyc > File "<stdin>", line 1 > SyntaxError: Non-ASCII character '\xd1' in file <stdin> on line 1, but no > encoding declared; see http://www.python.org/peps/pep-0263.html for details > Python will spit this out if you try to push byte-compiled files through stdin. python /usr/share/rhn/virtualization/poller.pyc (with no stdin redirection) works, however, as can be observed if with: python /usr/share/rhn/virtualization/poller.pyc -d
This is a mass change, moving bugs of merged patches into MODIFIED. Please correct the state, if you think that the move was not justified.
Test version: rhev-hypervisor6-6.6-20150112.0 ovirt-node-3.1.0-0.42.20150109gitd06b7c5.el6.noarch Test steps: 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]# ls -l /usr/share/rhn/virtualization/poller.py* -rw-r--r--. 1 root root 7904 2014-09-29 07:28 /usr/share/rhn/virtualization/poller.pyc 3. [root@dhcp-9-150 admin]# tail /var/log/cron |grep poller Jan 14 07:18:01 localhost CROND[17625]: (root) CMD (python /usr/share/rhn/virtualization/poller.pyc) Jan 14 07:20:01 localhost CROND[17692]: (root) CMD (python /usr/share/rhn/virtualization/poller.pyc) so now it used correct path in cron job, Change the status into "VERIFIED". For OSError: [Errno 30] Read-only file system: '/var/cache/rhn' when executing cron job 'python /usr/share/rhn/virtualization/poller.pyc', I have report a new bug 1181937 to track that.
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