Bug 709746 - condor aviary overwrites "requirements" classad
Summary: condor aviary overwrites "requirements" classad
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: condor-aviary
Version: Development
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: 2.0
: ---
Assignee: Pete MacKinnon
QA Contact: MRG Quality Engineering
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-01 14:41 UTC by Martin Kudlej
Modified: 2011-11-23 18:43 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-06-02 13:28:27 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Martin Kudlej 2011-06-01 14:41:16 UTC
Description of problem:
I've submitted jobs via condor aviary and I've found that it overwrites "Requirements" classad which I've put into additional attributes list.

I've submitted:
result = client.service.submitJob(\
      # the executable command,
      # some arguments for the command,
      # the submitter name,
      # initial working directory wwhere job will execute,
      # an arbitrary string identifying the target submission group,
      #executable
      # special resource requirements
        None, \ # or []
      # additional attributes
[(Attribute){
   name = "Requirements"
   type = "EXPRESSION"
   value = "(FileSystemDomain =!= UNDEFINED) && (Arch=!=UNDEFINED) && (OpSys=="WINNT51" || OpSys=="WINNT52" || OpSys=="WINNT60" || OpSys=="WINNT61")"
 }, (Attribute){
   name = "JobUniverse"
   type = "INTEGER"
   value = 5
 }, (Attribute){
   name = "WhenToTransferOutput"
   type = "STRING"
   value = "ON_EXIT"
 }, (Attribute){
   name = "ShouldTransferFiles"
   type = "STRING"
   value = "YES"
 }]
      )

and condor-aviary changed it into:
$  condor_q -l | grep -i "^req"
Requirements = true


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

How reproducible:
100%

Steps to Reproduce:
1. install condor-aviary
2. submit job via aviary with "Requirements" classad in "additional attributes" of submitJob function
3. check "Requirements" classad of that job via condor_q
  
Actual results:
submitJob function overwrites value of "Requirements" in "additional attributes" parameter of that function.

Expected results:
submitJob will not overwrite any classad from "additional attributes" parameter.

Comment 1 Pete MacKinnon 2011-06-02 13:28:10 UTC
This is a feature of the submission API. Since extra attributes could be used to perhaps inadvertently overwrite the basic attributes, it was deemed that this should be a conscious decision by the user.

Basic attributes are:
cmd (ATTR_JOB_CMD)
requirements (ATTR_REQUIREMENTS)
owner (ATTR_OWNER)
iwd (ATTR_JOB_IWD)
args (ATTR_JOB_ARGUMENTS1)

In order to send along extra attributes that explicitly override basic attributes you must set the allowOverrides attribute on SubmitJob to be "true" ("false" by default).

<job:SubmitJob allowOverrides="true">


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