Bug 614993

Summary: Using Memory or RequestMemory in job requirements drops both default RequestMemory and Memory requirements
Product: Red Hat Enterprise MRG Reporter: Jon Thomas <jthomas>
Component: condorAssignee: Matthew Farrellee <matt>
Status: CLOSED ERRATA QA Contact: Tomas Rusnak <trusnak>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.2CC: fnadge, matt, trusnak
Target Milestone: 1.3   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previously, condor_submit keyed automatic inclusion of Memory and RequestMemory requirements off the same value. Specifying Memory or RequestMemory in job Requirements would mean the default expression for the other was not automatically included. With this update, automatic inclusion for Memory is keyed off absence of Memory in Requirements and RequestMemory is keyed off RequestMemory. It is now possible to add Memory or RequestMemory to Requirements and get the default expression for the other.
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-10-14 16:13:38 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:
Attachments:
Description Flags
patch that breaks apart these two requirements none

Description Jon Thomas 2010-07-15 18:13:59 UTC
Created attachment 432186 [details]
patch that breaks apart these two requirements

The default Memory and RequestMemory requirements are

( ( (Memory * 1024) >= ImageSize ) && ( ( RequestMemory * 1024 ) >= ImageSize ) )";

When a user defines any RequestMemory or Memory requirement ( but not virtualmemory), the system drops both ( (Memory * 1024) >= ImageSize ) and ( ( RequestMemory * 1024 ) >= ImageSize ) ).

This means, if a user were to submit a job with (RequestMemory =!= UNDEFINED), they would also have to add ( (Memory * 1024) >= ImageSize ) if they wanted this as a requirement.

To duplicate submit a job with no requirements to get a baseline and examine the jobs's classad. Then submit a job with requirements = (RequestMemory =!= UNDEFINED) and examine requirements in classad.

Comment 1 Matthew Farrellee 2010-07-16 00:05:22 UTC
Bad, pre-patch...

$ echo "cmd=/bin/true\nqueue" | condor_submit -dump out ; grep Requirements out 
Requirements = (Arch == "INTEL") && (OpSys == "LINUX") && (Disk >= DiskUsage) && (((Memory * 1024) >= ImageSize) && ((RequestMemory * 1024) >= ImageSize)) && (TARGET.FileSystemDomain == MY.FileSystemDomain)

$ echo "cmd=/bin/true\nrequirements=Memory=!=UNDEFINED\nqueue" | condor_submit -dump out ; grep Requirements out 
Requirements = (Memory =!= UNDEFINED) && (Arch == "INTEL") && (OpSys == "LINUX") && (Disk >= DiskUsage) && (TARGET.FileSystemDomain == MY.FileSystemDomain)

$ echo "cmd=/bin/true\nrequirements=RequestMemory=!=UNDEFINED\nqueue" | condor_submit -dump out ; grep Requirements out 
Requirements = (RequestMemory =!= UNDEFINED) && (Arch == "INTEL") && (OpSys == "LINUX") && (Disk >= DiskUsage) && (TARGET.FileSystemDomain == MY.FileSystemDomain)

$ echo "cmd=/bin/true\nrequirements=RequestMemory=!=UNDEFINED && Memory =!= UNDEFINED\nqueue" | condor_submit -dump out ; grep Requirements out 
Requirements = (RequestMemory =!= UNDEFINED && Memory =!= UNDEFINED) && (Arch == "INTEL") && (OpSys == "LINUX") && (Disk >= DiskUsage) && (TARGET.FileSystemDomain == MY.FileSystemDomain)


Good, post-patch...

$ echo "cmd=/bin/true\nqueue" | ./condor_submit -dump out ; grep Requirements out  
Requirements = (Arch == "INTEL") && (OpSys == "LINUX") && (Disk >= DiskUsage) && ((Memory * 1024) >= ImageSize) && ((RequestMemory * 1024) >= ImageSize) && (TARGET.FileSystemDomain == MY.FileSystemDomain)

$ echo "cmd=/bin/true\nrequirements=Memory=!=UNDEFINED\nqueue" | ./condor_submit -dump out ; grep Requirements out
Requirements = (Memory =!= UNDEFINED) && (Arch == "INTEL") && (OpSys == "LINUX") && (Disk >= DiskUsage) && ((RequestMemory * 1024) >= ImageSize) && (TARGET.FileSystemDomain == MY.FileSystemDomain)

$ echo "cmd=/bin/true\nrequirements=RequestMemory=!=UNDEFINED\nqueue" | ./condor_submit -dump out ; grep Requirements out
Requirements = (RequestMemory =!= UNDEFINED) && (Arch == "INTEL") && (OpSys == "LINUX") && (Disk >= DiskUsage) && ((Memory * 1024) >= ImageSize) && (TARGET.FileSystemDomain == MY.FileSystemDomain)

$ echo "cmd=/bin/true\nrequirements=RequestMemory=!=UNDEFINED && Memory =!= UNDEFINED\nqueue" | ./condor_submit -dump out ; grep Requirements out
Requirements = (RequestMemory =!= UNDEFINED && Memory =!= UNDEFINED) && (Arch == "INTEL") && (OpSys == "LINUX") && (Disk >= DiskUsage) && (TARGET.FileSystemDomain == MY.FileSystemDomain)


Difference is when explicitly placing RequestMemory or Memory in the Requirements expression, they remove only the default RequestMemory or Memory expressions provided by condor_submit.

The expression is grouped differently, but jobs still run.

$ echo "cmd=/bin/true\nrequirements=RequestMemory=!=UNDEFINED && Memory =!= UNDEFINED\nqueue" | condor_submit                                  
Submitting job(s).
1 job(s) submitted to cluster 520.
$ echo "cmd=/bin/true\nrequirements=RequestMemory=!=UNDEFINED\nqueue" | condor_submit 
Submitting job(s).
1 job(s) submitted to cluster 521.
$ echo "cmd=/bin/true\nqueue" | condor_submit 
Submitting job(s).
1 job(s) submitted to cluster 522.

$ condor_history 520
 ID      OWNER            SUBMITTED     RUN_TIME ST   COMPLETED CMD            
 520.0   matt            7/15 16:59   0+00:00:01 C   7/15 16:59 /bin/true
$ condor_history 521
 ID      OWNER            SUBMITTED     RUN_TIME ST   COMPLETED CMD            
 521.0   matt            7/15 16:59   0+00:00:00 C   7/15 16:59 /bin/true
$ condor_history 522
 ID      OWNER            SUBMITTED     RUN_TIME ST   COMPLETED CMD            
 522.0   matt            7/15 16:59   0+00:00:01 C   7/15 17:00 /bin/true

Comment 2 Matthew Farrellee 2010-07-16 00:23:14 UTC
Built in 7.4.4-0.5

Comment 3 Tomas Rusnak 2010-08-09 12:44:15 UTC
Reproduced on:

$CondorVersion: 7.4.4 Jun 30 2010 BuildID: RH-7.4.4-0.4.el5 PRE-RELEASE $
$CondorPlatform: I386-LINUX_RHEL5 $

Results:
=======TEST1=======
Requirements = (Arch == "INTEL") && (OpSys == "LINUX") && (Disk >= DiskUsage) && (((Memory * 1024) >= ImageSize) && ((RequestMemory * 1024) >= ImageSize)) && (TARGET.FileSystemDomain == MY.FileSystemDomain)
=======TEST2=======
Requirements = (Memory =!= UNDEFINED) && (Arch == "INTEL") && (OpSys == "LINUX") && (Disk >= DiskUsage) && (TARGET.FileSystemDomain == MY.FileSystemDomain)
=======TEST3=======
Requirements = (RequestMemory =!= UNDEFINED) && (Arch == "INTEL") && (OpSys == "LINUX") && (Disk >= DiskUsage) && (TARGET.FileSystemDomain == MY.FileSystemDomain)
=======TEST4=======
Requirements = (RequestMemory =!= UNDEFINED && Memory =!= UNDEFINED) && (Arch == "INTEL") && (OpSys == "LINUX") && (Disk >= DiskUsage) && (TARGET.FileSystemDomain == MY.FileSystemDomain)

Comment 4 Tomas Rusnak 2010-08-09 12:49:12 UTC
Tested on all combination of RHEL4/5 and x86/x86_64 architecture using:

condor-7.4.4-0.8

Results:
=======TEST1=======
Requirements = (Arch == "X86_64") && (OpSys == "LINUX") && (Disk >= DiskUsage) && ((Memory * 1024) >= ImageSize) && ((RequestMemory * 1024) >= ImageSize) && (TARGET.FileSystemDomain == MY.FileSystemDomain)
=======TEST2=======
Requirements = (Memory =!= UNDEFINED) && (Arch == "X86_64") && (OpSys == "LINUX") && (Disk >= DiskUsage) && ((RequestMemory * 1024) >= ImageSize) && (TARGET.FileSystemDomain == MY.FileSystemDomain)
=======TEST3=======
Requirements = (RequestMemory =!= UNDEFINED) && (Arch == "X86_64") && (OpSys == "LINUX") && (Disk >= DiskUsage) && ((Memory * 1024) >= ImageSize) && (TARGET.FileSystemDomain == MY.FileSystemDomain)
=======TEST4=======
Requirements = (RequestMemory =!= UNDEFINED && Memory =!= UNDEFINED) && (Arch == "X86_64") && (OpSys == "LINUX") && (Disk >= DiskUsage) && (TARGET.FileSystemDomain == MY.FileSystemDomain)

>>> VERIFIED

Comment 5 Florian Nadge 2010-10-08 10:05:35 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:
Previously, the default Memory and RequestMemory requirements were combined.  If users were to submit a job with RequestMemory, they would also have to add Memory. This update separates these two requirements.

Comment 6 Matthew Farrellee 2010-10-08 11:43:41 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 +1,4 @@
-Previously, the default Memory and RequestMemory requirements were combined.  If users were to submit a job with RequestMemory, they would also have to add Memory. This update separates these two requirements.+C: condor_submit keyed automatic inclusion of Memory and RequestMemory requirements off the same value.
+C: Specifying Memory or RequestMemory in job Requirements would mean the default expression for the other was not automatically included.
+F: Automatic inclusion for Memory is keyed off absence of Memory in Requirements and RequestMemory is keyed off RequestMemory.
+R: It is possible to add either to Requirements and get the default expression for the other.

Comment 7 Martin Prpič 2010-10-10 11:27:21 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 @@
-C: condor_submit keyed automatic inclusion of Memory and RequestMemory requirements off the same value.
+Previously, condor_submit keyed automatic inclusion of Memory and RequestMemory requirements off the same value. Specifying Memory or RequestMemory in job Requirements would mean the default expression for the other was not automatically included. With this update, automatic inclusion for Memory is keyed off absence of Memory in Requirements and RequestMemory is keyed off RequestMemory. It is now possible to add Memory or RequestMemory to Requirements and get the default expression for the other.-C: Specifying Memory or RequestMemory in job Requirements would mean the default expression for the other was not automatically included.
-F: Automatic inclusion for Memory is keyed off absence of Memory in Requirements and RequestMemory is keyed off RequestMemory.
-R: It is possible to add either to Requirements and get the default expression for the other.

Comment 9 errata-xmlrpc 2010-10-14 16:13:38 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-2010-0773.html