Bug 696619 - LastSuspensionTime should be NA instead of 31 Dec 1969 19:00
Summary: LastSuspensionTime should be NA instead of 31 Dec 1969 19:00
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: cumin
Version: Development
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: 2.0
: ---
Assignee: Chad Roberts
QA Contact: Jan Sarenik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-04-14 12:53 UTC by Jan Sarenik
Modified: 2011-06-27 14:29 UTC (History)
3 users (show)

Fixed In Version: cumin-0.1.4725-1
Doc Type: Bug Fix
Doc Text:
Cause: Some fields were editable that should not have been (things like remote system time, etc). In addition, a user was allowed to edit fields for completed jobs, which doesn't make any sense. The result of editing the fields was that errors would show up in the yellow notification area. Consequence: As a result of the attempted edits, several errors would be thrown into the yellow notification area. Fix: We have made several fields unwritable for jobs that are running or still to be run. In addition, for completed jobs, the "edit attributes" button will no longer appear. Result: The user should not be able to edit fields that do not make any sense, nor should they be able to attempt to edit the attributes of any completed job.
Clone Of:
Environment:
Last Closed: 2011-06-27 14:29:34 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Jan Sarenik 2011-04-14 12:53:59 UTC
Grid -> Submissions -> (choose one) -> (choose job) -> Attributes
there is LastSuspensionTime with value 31 Dec 1969 19:00.


How reproducible: 100%

Actual results: 31 Dec 1969 19:00
Expected results: NA or "Job was not suspended yet"

Comment 1 Jan Sarenik 2011-04-14 12:54:30 UTC
cumin-0.1.4712-1.el5

Comment 2 Jan Sarenik 2011-04-14 12:56:08 UTC
ehm, on my local instance the time is
LastSuspensionTime	01 Jan 1970 01:00
(probably TimeZone shift).

Comment 3 Matthew Farrellee 2011-04-14 13:20:56 UTC
After submitting a job...

$ condor_q -l | grep ^LastSuspensionTime
LastSuspensionTime = 0

qpid: call 3251 GetJobAd "7403.0"
OK (0) - {u'JobAd': {..., u'LastSuspensionTime': 0, ...}}

LastSuspensionTime is 0 in the data.


src/condor_schedd.V6/schedd.cpp -

mark_job_running(PROC_ID* job_id)
...
   status = RUNNING;
...
   SetAttributeInt(job_id->cluster, job_id->proc,
               ATTR_LAST_SUSPENSION_TIME, 0 );
...

Throughout the code 0 is used as a special Unset/Null/Nil value. The code should arguably be fixed to properly used UNDEFINED.

Best current approach is to handle 0 specially in Cumin.

Comment 4 Chad Roberts 2011-04-14 20:17:30 UTC
In order to fix this we now take an extra step when converting the timestamp into a date for display.  If the timestamp given is non-positive, we give a value of "NA" rather than a timezone adjusted version of the epoch.

This is available in revision 4715.

Comment 7 Jan Sarenik 2011-04-20 07:45:21 UTC
Verified in cumin-0.1.4725-1.el5

Comment 8 Chad Roberts 2011-04-25 14:21:55 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause:  Some fields were editable that should not have been (things like remote system time, etc).  In addition, a user was allowed to edit fields for completed jobs, which doesn't make any sense.  The result of editing the fields was that errors would show up in the yellow notification area.
   
Consequence:  As a result of the attempted edits, several errors would be thrown into the yellow notification area.
    
Fix:  We have made several fields unwritable for jobs that are running or still to be run.  In addition, for completed jobs, the "edit attributes" button will no longer appear.
    
Result:  The user should not be able to edit fields that do not make any sense, nor should they be able to attempt to edit the attributes of any completed job.


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