Bug 693653 - Zone changed causes traceback and test stop working
Zone changed causes traceback and test stop working
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: beakerlib (Show other bugs)
19
Unspecified Unspecified
high Severity high
: ---
: ---
Assigned To: Petr Muller
: Regression, TestBlocker
: 695047 709687 (view as bug list)
Depends On:
Blocks: 893060
  Show dependency treegraph
 
Reported: 2011-04-05 04:31 EDT by Petr Sklenar
Modified: 2013-06-27 12:36 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 893060 (view as bug list)
Environment:
Last Closed: 2013-06-27 12:36:10 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
the reproducer (1.95 KB, application/x-sh)
2011-06-01 10:03 EDT, Aleš Mareček
no flags Details

  None (edit)
Description Petr Sklenar 2011-04-05 04:31:02 EDT
Description of problem:
Zone changed causes traceback and test stop working

Version-Release number of selected component (if applicable):
beakerlib-redhat-1-4.el6.noarch

How reproducible:
always

Steps to Reproduce:
1.
 cat runtest.sh 
. /usr/bin/rhts-environment.sh
. /usr/share/rhts-library/rhtslib.sh

PACKAGE=coreutils
rlJournalStart

        rlPhaseStartSetup "playing with setting"
        rlRun "cp -f /usr/share/zoneinfo/Europe/London /etc/localtime"
        rlRun 'echo ZONE="Europe/London" > /etc/sysconfig/clock'
        rlRun "date" 0 "`date`"
        rlPhaseEnd

rlJournalPrintText


2. make run causes:

:: [ WARNING  ] :: POSIX mode detected and switched off
:: [ WARNING  ] :: Please fix your test to have /bin/bash shebang
Traceback (most recent call last):
  File "/usr/bin/beakerlib-journalling", line 468, in <module>
    createLog(options.testid, options.severity)
  File "/usr/bin/beakerlib-journalling", line 181, in createLog
    printPhaseLog(nod,severity)
  File "/usr/bin/beakerlib-journalling", line 94, in printPhaseLog
    duration = time.mktime(time.strptime(endtime,timeFormat)) - time.mktime(time.strptime(starttime,timeFormat))
  File "/usr/lib64/python2.6/_strptime.py", line 454, in _strptime_time
    return _strptime(data_string, format)[0]
  File "/usr/lib64/python2.6/_strptime.py", line 325, in _strptime
    (data_string, format))
ValueError: time data u'2011-04-05 04:24:54 EDT' does not match format '%Y-%m-%d %H:%M:%S %Z'
make: *** [run] Error 1

  
Actual results:
traceback, and test fail

Expected results:
no traceback

Additional info:
http://beaker-archive.app.eng.bos.redhat.com/beaker-logs/2011/04/692/69293/142237/1554580///TESTOUT.log
Comment 1 Petr Muller 2011-04-11 08:27:49 EDT
*** Bug 695047 has been marked as a duplicate of this bug. ***
Comment 2 Petr Muller 2011-04-12 04:15:48 EDT
Ugh, this area of python 'time' module is apparently a mine field. I *think* this is actually a Python bug, because u'2011-04-05 04:24:54 EDT' *does* match format
'%Y-%m-%d %H:%M:%S %Z'. But the support for %Z is a gray area according to docs. And I found some bugs in Python tracking tool dancing around this.

Not sure how to fix this. What is the expected result in this case anyways? I guess the ideal would be if beakerlib could just figure out the real duration, but that is quite hard with timezones getting mixed under it's hands.

Considering this is quite special case, would it be acceptable to give up computing duration in this case and say it is unknown because time was messed up somehow? I guess the real pain is the WARN you are getting now.
Comment 3 Petr Sklenar 2011-04-12 05:09:43 EDT
(In reply to comment #2)
> I guess the real pain is the WARN you are getting now.
exactly, I don't care time duration but only these warn ...
Comment 4 Petr Muller 2011-06-01 09:26:58 EDT
*** Bug 709687 has been marked as a duplicate of this bug. ***
Comment 5 Aleš Mareček 2011-06-01 10:03:57 EDT
Created attachment 502275 [details]
the reproducer
Comment 6 Petr Šplíchal 2011-09-16 07:20:28 EDT
(In reply to comment #2)
> Considering this is quite special case, would it be acceptable to give up
> computing duration in this case and say it is unknown because time was messed
> up somehow? I guess the real pain is the WARN you are getting now.

+1 for giving up computing the duration and keeping the correct
test phase status.
Comment 7 Karel Volný 2011-10-17 05:54:35 EDT
I've just experienced this bug too:

http://beaker-archive.app.eng.bos.redhat.com/beaker-logs/2011/10/1435/143598/298867/3294206/TESTOUT.log

Traceback (most recent call last):
  File "/usr/bin/beakerlib-journalling", line 468, in <module>
    createLog(options.testid, options.severity)
  File "/usr/bin/beakerlib-journalling", line 181, in createLog
    printPhaseLog(nod,severity)
  File "/usr/bin/beakerlib-journalling", line 94, in printPhaseLog
    duration = time.mktime(time.strptime(endtime,timeFormat)) - time.mktime(time.strptime(starttime,timeFormat))
  File "/usr/lib/python2.6/_strptime.py", line 454, in _strptime_time
    return _strptime(data_string, format)[0]
  File "/usr/lib/python2.6/_strptime.py", line 325, in _strptime
    (data_string, format))
ValueError: time data u'2011-10-15 00:02:06 EDT' does not match format '%Y-%m-%d %H:%M:%S %Z'
'442120f2-73b8-4b04-b0f6-19fdc1ab5347'



note that there are some avc messages which may be relevant:

http://beaker-archive.app.eng.bos.redhat.com/beaker-logs/2011/10/1435/143598/298867/3294206/17558086/test_log-Setup-avc.log

time->Sat Oct 15 04:02:02 2011
type=AVC msg=audit(1318651322.613:177735): avc:  denied  { recv } for  saddr=10.16.64.14 src=67 daddr=255.255.255.255 dest=68 netif=eth0 scontext=system_u:system_r:dhcpc_t:s0 tcontext=system_u:object_r:unlabeled_t:s0 tclass=packet
----
time->Sat Oct 15 04:02:06 2011
type=AVC msg=audit(1318651326.586:177736): avc:  denied  { recv } for  pid=17417 comm="python" saddr=10.16.64.14 src=67 daddr=255.255.255.255 dest=68 netif=eth0 scontext=system_u:system_r:dhcpc_t:s0 tcontext=system_u:object_r:unlabeled_t:s0 tclass=packet
Comment 8 Petr Sklenar 2012-06-15 08:16:09 EDT
my test is still crying and crying on RHEL7
http://beaker-archive.app.eng.bos.redhat.com/beaker-logs/2012/05/2399/239901/510773/6017922/TESTOUT.log

what's the status of this bug?
Comment 9 Petr Muller 2012-06-29 08:18:40 EDT
(In reply to comment #8)
> what's the status of this bug?

No progress, obviously. I'll try to look into it next week.
Comment 12 Petr Muller 2013-01-08 09:22:42 EST
beakerlib-1.6-1 is already in fedora
Comment 13 Fedora End Of Life 2013-04-03 16:38:36 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

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