Bug 723613 - Changing type of job attribute from int/float to another type causes Edit Attributes task to hang after submit
Summary: Changing type of job attribute from int/float to another type causes Edit Att...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: cumin
Version: 2.0
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: 2.0.1
: ---
Assignee: Trevor McKay
QA Contact: Jan Sarenik
URL:
Whiteboard:
Depends On:
Blocks: 723887
TreeView+ depends on / blocked
 
Reported: 2011-07-20 17:29 UTC by Trevor McKay
Modified: 2011-09-07 16:45 UTC (History)
2 users (show)

Fixed In Version: cumin-0.1.4878-1
Doc Type: Bug Fix
Doc Text:
Cumin detected a type mismatch when editing an integer or floating point attribute value on the "Edit Attributes" page for a job. This error case was not correctly handled, which led to the page displaying an everlasting "Loading..." message. With this update, cumin now handles these error cases correctly, with the result that when an invalid value for a floating point or integer job attribute is entered, the user is now warned that the edit operation failed due to a type mismatch. Operation otherwise proceeds normally.
Clone Of:
Environment:
Last Closed: 2011-09-07 16:45:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:1249 0 normal SHIPPED_LIVE Moderate: Red Hat Enterprise MRG Grid 2.0 security, bug fix and enhancement update 2011-09-07 16:40:45 UTC

Description Trevor McKay 2011-07-20 17:29:42 UTC
Description of problem:

Changing the type of an int/float attribute to another type via Edit Attributes generates an internal error, but the error is not handled correctly and the web page is left "Loading..." forever after submit.  (Visiting another link will allow the user to escape)

Version-Release number of selected component (if applicable):

2.0

How reproducible:

100%

Steps to Reproduce:
1.  Submit a job, or find a job already submitted
2.  Navigate to Edit Attributes for the job
3.  Find an editable attribute that has an integer value
4.  Set the value to "fish" or something non-integer
5.  Press submit
  
Actual results:

Page will display "Loading..." forever

Expected results:

User will be notified of type mismatch error and operation will continue

Additional info:

Comment 1 Trevor McKay 2011-07-20 19:03:48 UTC
Fixed in revision 4877.

Changes of float/int attributes to other types during job ad editing now
produce an "edit failed" banner notifying the user of the problem (including
the name of the attribute).

Note, changes of string values to other types are not detected at this time,
future version.

Comment 2 Trevor McKay 2011-07-20 19:58:02 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
    Cumin detects type mismatches when editing a floating point or integer attribute value on the "Edit Attributes" page for a job.  However, the error case was not handled correctly.
 
Consequence
    The page displays "Loading..." forever until the user visits another link within cumin.

Fix
    The detected errors are now handled correctly.

Result
    If a user enters an invalid value for a floating point or integer job attribute during editing, a banner is displayed that notifies the user that the edit failed because of a type mismatch.  Operation continues normally.

Comment 3 Jan Sarenik 2011-07-21 10:28:02 UTC
When I submit my job, the argument is: 20m
Then I edit it to: 20   - OK
Then I edit it to: 200  - OK
Then I try to edit it to: 200m - Edit Ad: Args: Integer value expected
Then I try to edit it (from original 200) to: "200m"
  - Edit Ad: Args: Integer value expected

Is there something wrong? cumin-0.1.4878-1.el5

Comment 4 Jan Sarenik 2011-07-21 10:33:11 UTC
Just for completeness.
There is the same error when I try to set it to: '"200m"'

Comment 5 Trevor McKay 2011-07-21 11:15:32 UTC
Jan,

  No, this is expected.  Type checking in the job ad editor needs some improvement -- there are some sublte issues which need to be resolved.

  The result is that cumin does not detect when an attribute with a string value is changed to a value that is interpreted as an int or a float.  This is what happened in your case above.  The original value was a string, setting to 20 caused it to become an int in condor.  Ultimately, cumin should not allow a string value to be changed to another type (but it can't enforce that yet, without bigger changes).

  However, cumin DOES detect when an int or float is changed to something else.  This is what happened when the value was set to 200m -- it had previously become an int when it was changed to 20 but 200m is not an int so an error was detected.  This error on type was already internally generated, but it caused the page to hang because the error was not processed correctly.

  For this BZ, I just made the error processing work correctly so the page wouldn't hang.

  Working on string issues, future development.

Comment 6 Jan Sarenik 2011-07-21 11:21:20 UTC
Verified in cumin-0.1.4878-1.el5, works as expected.

Comment 7 Douglas Silas 2011-08-08 13:50:16 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,11 +1 @@
-Cause
+Cumin detected a type mismatch when editing an integer or floating point attribute value on the "Edit Attributes" page for a job. This error case was not correctly handled, which led to the page displaying an everlasting "Loading..." message. With this update, cumin now handles these error cases correctly, with the result that when an invalid value for a floating point or integer job attribute is entered, the user is now warned that the edit operation failed due to a type mismatch. Operation otherwise proceeds normally.-    Cumin detects type mismatches when editing a floating point or integer attribute value on the "Edit Attributes" page for a job.  However, the error case was not handled correctly.
- 
-Consequence
-    The page displays "Loading..." forever until the user visits another link within cumin.
-
-Fix
-    The detected errors are now handled correctly.
-
-Result
-    If a user enters an invalid value for a floating point or integer job attribute during editing, a banner is displayed that notifies the user that the edit failed because of a type mismatch.  Operation continues normally.

Comment 8 errata-xmlrpc 2011-09-07 16:45:32 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-1249.html


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