Bug 703196
Summary: | Unable to set non-numeric Args for job | |||
---|---|---|---|---|
Product: | Red Hat Enterprise MRG | Reporter: | Jan Sarenik <jsarenik> | |
Component: | cumin | Assignee: | Chad Roberts <croberts> | |
Status: | CLOSED ERRATA | QA Contact: | Jan Sarenik <jsarenik> | |
Severity: | medium | Docs Contact: | ||
Priority: | medium | |||
Version: | 2.0 | CC: | croberts, eallen, iboverma, matt, tmckay | |
Target Milestone: | 2.0.1 | |||
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | cumin-0.1.4878-1 | Doc Type: | Bug Fix | |
Doc Text: |
Cause
When attributes are edited, condor interprets string values enclosed by explicit double quote characters as strings and string values without explicit double quotes as expressions.
Consequence
Submitting an Args value without explicit double quotes will cause Args to be interpreted as an expression, not a string. If Args contains non-numeric characters (such as 25s) setting the attribute will fail even though cumin will report "OK". This is because the failure status is not returned to cumin from condor.
Workaround
When setting a non-numeric value for Args, or setting other attributes with string values, enclose the value in double quotes. This will ensure that those attribute values are interpreted as strings rather than expressions.
Result
Enclosing string attribute values in double quotes will allow those attributes to be set correctly.
|
Story Points: | --- | |
Clone Of: | 696635 | |||
: | 723848 (view as bug list) | Environment: | ||
Last Closed: | 2011-09-07 16:42:37 UTC | Type: | --- | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | 696635, 715956 | |||
Bug Blocks: | 723848, 723887 |
Description
Jan Sarenik
2011-05-09 15:53:01 UTC
Fixed in revision 4768. 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 was sending an unquoted value to condor for the Args value. Consequence: Condor would treat that value (ie: 25m) as an expression, which wouldn't make any sense. The result was that the QMF call would succeed, but the value would never get changed in condor because the eventual evaluation of the expression would fail (but the QMF call doesn't verify that part, so cumin would never know about it) Fix: Cumin is now adding quotes to the Args value before making the QMF call Result: Editing the Args to values like 25m or any other string will now work correctly. Matt recommended a workaround of having the user add quotes to the input box, which seems to work. As a result of that, I have tweaked my fix so that it will support the user entering either quoted or unquoted strings into the box. The updated fix is in revision 4769 When I am editing arguments of a job and Cumin is running with "update-interval: 2" (meaning the page gets updated every two seconds), I can hardly manage to press Submit button while the text form contains the changed string. Besides that, I still see many "Edit Ad" notifications in the yellow box, i.e. Edit Ad: OK Dismiss Edit Ad: OK Dismiss Edit Ad: OK Dismiss Edit Ad: OK Dismiss Edit Ad: OK Dismiss Edit Ad: OK Dismiss Edit Ad: OK Dismiss Edit Ad: OK Dismiss Edit Ad: OK Dismiss Maybe the right way to go here is to close the original BZ (not being able to set non-numeric args) and open 2 new BZ's. 1) The edit attributes page should NOT use the cumin update-interval (to avoid blowing away changes before the user can hit Submit). 2) The multitude of "Edit Ad: OK" messages seem to be coming from saving values that were not changed. ie: you edit the args for a job, but when you hit submit, it is getting treated like you edited all of the editable fields--hence the multiple "Edit Ad: OK" messages. Thoughts? I half-agree. This bug should not be closed as it is another important thing that should be tested when the bug 1) is solved. 1) Bug 715956 2) Bug 715973 Thanks. Additional tweak needed for this. Requirements strings now have explicit quotes around them after editing. This prevents them from being interpreted by condor as expressions. For attributes that are expressions, the quotes need to be left off. Adjusted in revision 4877 Backing out the change for adding quotes to attribute values automatically and changing the Tech note to a Known Issue. Users will have to explicitly quote Args values if they contain non-numeric characters. 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,7 +1,11 @@ -Cause: Cumin was sending an unquoted value to condor for the Args value. +Cause + When attributes are edited, condor interprets string values enclosed by explicit double quote characters as strings and string values without explicit double quotes as expressions. -Consequence: Condor would treat that value (ie: 25m) as an expression, which wouldn't make any sense. The result was that the QMF call would succeed, but the value would never get changed in condor because the eventual evaluation of the expression would fail (but the QMF call doesn't verify that part, so cumin would never know about it) +Consequence + Submitting an Args value without explicit double quotes will cause Args to be interpreted as an expression, not a string. If Args contains non-numeric characters (such as 25s) setting the attribute will fail even though cumin will report "OK". This is because the failure status is not returned to cumin from condor. -Fix: Cumin is now adding quotes to the Args value before making the QMF call +Workaround + When setting a non-numeric value for Args, or setting other attributes with string values, enclose the value in double quotes. This will ensure that those attribute values are interpreted as strings rather than expressions. -Result: Editing the Args to values like 25m or any other string will now work correctly.+Result + Enclosing string attribute values in double quotes will allow those attributes to be set correctly. Verified in cumin-0.1.4878-1.el5 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 |