Bug 702489 - RFE: filter the use of classad keywords as attribute names
Summary: RFE: filter the use of classad keywords as attribute names
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: condor-aviary
Version: 2.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: 2.1
: ---
Assignee: Pete MacKinnon
QA Contact: Lubos Trilety
URL:
Whiteboard:
Depends On:
Blocks: 743350
TreeView+ depends on / blocked
 
Reported: 2011-05-05 20:14 UTC by Erik Erlandson
Modified: 2012-03-09 09:23 UTC (History)
5 users (show)

Fixed In Version: 7.6.4-0.3
Doc Type: Bug Fix
Doc Text:
If a keyword was provided as an attribute name to an Aviary submitJob or setJobAttribute operation, the job submission was either incorrectly parsed or failed. With this update, submitting a job or setting an attribute that includes a keyword results in the operation failing with an error message indicating that a forbidden keyword caused the fault.
Clone Of:
Environment:
Last Closed: 2012-01-23 17:26:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2012:0045 0 normal SHIPPED_LIVE Red Hat Enterprise MRG Grid 2.1 bug fix and enhancement update 2012-01-23 22:22:58 UTC

Description Erik Erlandson 2011-05-05 20:14:17 UTC
Description of problem:

We had a bz (Bug 700784) where an job submission via aviary (also qmf) used the 'error' attribute, which condor_submit maps to 'err', but aviary does not.  It caused problems in the classad handling because 'error' is a classad reserved word:

ad = {"cmd": "/bin/sleep",
    "args":  "1",
    "requirements": "(FileSystemDomain =!= UNDEFINED && Arch =!= UNDEFINED)",
    "iwd":  "/tmp",
    "owner":  "condor",
    'error' : '/tmp/mrg_$(Cluster).$(Process).err',
    'output' : '/tmp/mrg_$(Cluster).$(Process).out',
    'log' : '/tmp/mrg_$(Cluster).$(Process).log',
    "!!descriptors":  {"requirements": "com.redhat.grid.Expression"}
    }

To help avoid this kind of confusion, aviary should throw an informative error, or otherwise filter, the appearance of keywords as attribute names.

Comment 1 Pete MacKinnon 2011-09-07 15:01:59 UTC
Modified to return an error if a ClassAd keyword is used in a submit or job attribute edit.

Comment 2 Pete MacKinnon 2011-10-04 18:50:20 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: User provides a keyword as an attribute name to an Aviary submitJob or setJobAttribute operation. 
Consequence: Job submit would fail or not be correctly parsed by implementation.
Fix: Reject a submitJob or setJobAttribute operation that includes keywords for attribute names.
Result: User is notified of forbidden keyword through fault returned by operation.

Comment 4 Lubos Trilety 2011-11-02 13:47:24 UTC
Tested on:
$CondorVersion: 7.6.5 Oct 31 2011 BuildID: RH-7.6.5-0.5.el5 $
$CondorPlatform: I686-RedHat_5.7 $

$CondorVersion: 7.6.5 Oct 31 2011 BuildID: RH-7.6.5-0.5.el5 $
$CondorPlatform: X86_64-RedHat_5.7 $

$CondorVersion: 7.6.5 Oct 31 2011 BuildID: RH-7.6.5-0.5.el6 $
$CondorPlatform: I686-RedHat_6.1 $

$CondorVersion: 7.6.5 Oct 31 2011 BuildID: RH-7.6.5-0.5.el6 $
$CondorPlatform: X86_64-RedHat_6.1 $


(reply){
   status = 
      (Status){
         code = "FAIL"
         text = "Reserved ClassAd keyword cannot be an attribute name: Error"
      }
 }

The similar result for 'false', 'is', 'isnt', 'parent', 'true' and 'undefined'


>>> VERIFIED

Comment 5 Douglas Silas 2011-11-17 12:57:45 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,4 +1 @@
-Cause: User provides a keyword as an attribute name to an Aviary submitJob or setJobAttribute operation. 
+If a keyword was provided as an attribute name to an Aviary submitJob or setJobAttribute operation, the job submission was either incorrectly parsed or failed. With this update, submitting a job or setting an attribute that includes a keyword results in the operation failing with an error message indicating that a forbidden keyword caused the fault.-Consequence: Job submit would fail or not be correctly parsed by implementation.
-Fix: Reject a submitJob or setJobAttribute operation that includes keywords for attribute names.
-Result: User is notified of forbidden keyword through fault returned by operation.

Comment 6 errata-xmlrpc 2012-01-23 17:26:37 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2012-0045.html


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