Bug 696635 - Some job attributes should not be editable
Summary: Some job attributes should not be editable
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: 703196 723848
TreeView+ depends on / blocked
 
Reported: 2011-04-14 13:42 UTC by Jan Sarenik
Modified: 2011-07-21 11:29 UTC (History)
5 users (show)

Fixed In Version: cumin-0.1.4734-1
Doc Type: Bug Fix
Doc Text:
Cause: Many job-attribute fields were made editable on the edit page, but do not make sense to edit Consequence: The user is presented with the option to edit nonsensical fields (ie: edit remote machine current time). Fix: Several fields were marked as not editable in the Submission->Job->Edit form. Result: The editable fields in Submission->Job->Edit form should make sense to be editable.
Clone Of:
: 703196 (view as bug list)
Environment:
Last Closed: 2011-06-23 14:06:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jan Sarenik 2011-04-14 13:42:48 UTC
When you click on "Edit Attributes"
(should that be lowercase "a"?), the table of
attributes changes to contain text input fields.
But changes to some of them simply do not make
sense, e.g. TotalSuspensions.

And, in case the job has already finished, it
does not make sense to edit any of the attributes,
does it? And what about running job?


cumin-0.1.4712-1.el5

How reproducible: 100%

Steps to Reproduce:
1. Grid -> Submissions -> submission -> job -> "Edit Attributes" (on top)

Actual results: There are plenty of attributes which seem to be editable.
Expected results: Only those attributes which make sense to be edited
  should be editable.

Additional info: On already finished job, when I press final "Edit Attributes"
  (now in the bottom of the page), I get following list of errors in the yellow
  notification box:
--------------------------
  Edit Ad: Failed to set attribute TerminationPending to TRUE
  Edit Ad: Failed to set attribute OnExitHold to FALSE
  Edit Ad: Failed to set attribute PeriodicHold to FALSE
  Edit Ad: Failed to set attribute ExitBySignal to FALSE
  Edit Ad: Failed to set attribute TransferOut to FALSE
  Edit Ad: Failed to set attribute OnExitRemove to TRUE
  Edit Ad: Failed to set attribute NiceUser to FALSE
  Edit Ad: Failed to set attribute LeaveJobInQueue to FALSE
  Edit Ad: Failed to set attribute WantRemoteIO to TRUE
  Edit Ad: Failed to set attribute PeriodicRemove to FALSE
  Edit Ad: Failed to set attribute WantCheckpoint to FALSE
  Edit Ad: Failed to set attribute PeriodicRelease to FALSE
  Edit Ad: Failed to set attribute WantRemoteSyscalls to FALSE
  Edit Ad: Failed to set attribute TransferErr to FALSE
  Edit Ad: Failed to set attribute TransferIn to FALSE
--------------------------

Comment 1 Chad Roberts 2011-04-15 15:04:48 UTC
I'm not entirely sure what all of the values actually translate to on the backend.  Given that, I'm soliciting thoughts on which values should be made un-editable.  Some things like CurrentTime seem very obvious, but others are perhaps not so black and white.   Maybe it would be easier to enumerate the items that it does make sense to edit?

It seems like editing the attributes of a job that is already finished doesn't make any sense.  Should I just eliminate the "edit" button for jobs that are already finished?

Comment 2 Chad Roberts 2011-04-18 21:15:38 UTC
I have made several job attributes non-editable.  Please advise if there are additional attributes that should be non-editable.

These changes are in as of revision 4723

Comment 3 Chad Roberts 2011-04-18 21:15:38 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:  Many job-attribute fields were made editable on the edit page, but do not make sense to edit

Consequence:  The user is presented with the option to edit nonsensical fields (ie:  edit remote machine current time).

Fix:  Several fields were marked as not editable in the Submission->Job->Edit form.

Result:  The editable fields in Submission->Job->Edit form should make sense to be editable.

Comment 4 Jan Sarenik 2011-04-20 08:21:05 UTC
Checked in cumin-0.1.4725-1.el5

Editing attributes of a Running job seems to be fine.
Editing attributes of a Completed job is still possible and
allows to edit much more fields than of the Running job.

The original intention (as I understood it in very old Cumin
two years ago) was, I think, that you could clone a job from
an already finished one, possibly edit its attributes so the
new clone does not end with the same output/error as the one
you are cloning from.

The same "Edit Ad" errors appear when I press Submit on a finished
(i.e. either Completed or Removed) job as I reprinted in the
description.

Comment 5 Chad Roberts 2011-04-20 13:29:20 UTC
Perhaps I'm lacking a little bit of background and insight on this one.  I'm not able to get to a job once it has finished.  When a job has finished, I just get the "We can't find the object you requested" page.  Can you provide steps that I can follow to get to a page that allows me to edit the job attributes for a completed job?

Thanks

Comment 7 Trevor McKay 2011-04-20 15:49:49 UTC
Condor does not support changing attributes on completed jobs.  Edit button for completed jobs should be hidden/grayed-out.

Allowing cloning of completed jobs for edit and resubmission is an idea for future development, should be a separate RFE if we tackle it.

Comment 8 Chad Roberts 2011-04-20 22:07:01 UTC
Per today's discussion, I have made a tweak to not display the "edit attributes" button for jobs that have been "Completed".

This fix is in revision 4728

Comment 9 Jan Sarenik 2011-05-02 14:34:07 UTC
In cumin-0.1.4746-1.el5, when I submit a simple job*,
then put it on hold, change args from "20m" to "15",
submit. All Ads seem to be updated correctly (one notification
line in yellow box for each), but the Args contain still
"20m", even after releasing the job.

* script:
----------
getent passwd test || adduser test
echo Submitting a job
su - test -c "condor_submit $* << EOF
Executable     = /bin/sleep
Universe = vanilla
args    = 20m
queue 1
EOF"

Comment 11 Jan Sarenik 2011-05-02 14:39:18 UTC
Funnily enough, the other time the value got updated and after
releasing the job, it really ended after 15 seconds. I am retesting.

Comment 12 Chad Roberts 2011-05-04 18:45:06 UTC
Any update on this?

Comment 13 Jan Sarenik 2011-05-05 08:09:09 UTC
The update itself seems to work, in some cases, BUT

I use /bin/sleep as command:

If I supply "25m" as an argument while editing
a held job, only number 25 gets through. Another
try behaves the same as below:

Then, if I first change (via Cumin edit job attrs)
args to let's say "8", submit, wait until it gets
updated, then try to change it
to "9h" (can be any other number ending with "h"),
all I see is a never-ending "Loading...".

Sorry, sometimes it is hard for me to find any reproducibility
in all this if there are many errors at once. Please, try to
reproduce yourself, maybe it will make more sense to you. Thanks.

Comment 14 Jan Sarenik 2011-05-10 12:13:47 UTC
Verified on cumin-0.1.4746-1.el5

There a new bug which came out of above comments
and is already out of scope of the original bug:
bug 703196


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