Bug 702489

Summary: RFE: filter the use of classad keywords as attribute names
Product: Red Hat Enterprise MRG Reporter: Erik Erlandson <eerlands>
Component: condor-aviaryAssignee: Pete MacKinnon <pmackinn>
Status: CLOSED ERRATA QA Contact: Lubos Trilety <ltrilety>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.0CC: dahorak, ltrilety, matt, mkudlej, tstclair
Target Milestone: 2.1   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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.
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-01-23 17:26: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:    
Bug Blocks: 743350    

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