Bug 743625

Summary: Bad type of value of some keys in job Classads from Aviary
Product: Red Hat Enterprise MRG Reporter: Daniel Horák <dahorak>
Component: condor-aviaryAssignee: Pete MacKinnon <pmackinn>
Status: CLOSED NOTABUG QA Contact: MRG Quality Engineering <mrgqe-bugs>
Severity: unspecified Docs Contact:
Priority: low    
Version: DevelopmentCC: matt
Target Milestone: 2.1   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-10-05 21:02:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Daniel Horák 2011-10-05 14:42:24 UTC
Description of problem:
  Aviary return some values of keys (in job Classads) as type 'text' (<class 'suds.sax.text.Text'>) instead of 'int' or 'float'.
  They are keys: 'currenttime', 'remotesyscpu', 'rank', 'remoteusercpu', 'requestdisk', 'localsyscpu', 'remotewallclocktime', 'localusercpu', 'requestmemory' and maybe other.


Version-Release number of selected component (if applicable):
  condor-7.6.4-0.6.el5
  condor-classads-7.6.4-0.6.el5
  python-condorutils-1.5-4.el5
  condor-qmf-7.6.4-0.6.el5
  condor-aviary-7.6.4-0.6.el5


How reproducible:
100%


Actual results:
------------------------------------------------------------------
Key: 'currenttime'
	CMD_TYPE:      'time()' (<type 'str'>)
	QMF_TYPE:      '1317816187' (<type 'int'>)
	AVIARY_TYPE:   '1317816188' (<class 'suds.sax.text.Text'>)
------------------------------------------------------------------
Key: 'remotesyscpu'
	CMD_TYPE:      '0.0' (<type 'str'>)
	QMF_TYPE:      '0.0' (<type 'float'>)
	AVIARY_TYPE:   '0.000000' (<class 'suds.sax.text.Text'>)
------------------------------------------------------------------
Key: 'rank'
	CMD_TYPE:      '0.0' (<type 'str'>)
	QMF_TYPE:      '0.0' (<type 'float'>)
	AVIARY_TYPE:   '0.000000' (<class 'suds.sax.text.Text'>)
------------------------------------------------------------------
Key: 'remoteusercpu'
	CMD_TYPE:      '0.0' (<type 'str'>)
	QMF_TYPE:      '0.0' (<type 'float'>)
	AVIARY_TYPE:   '0.000000' (<class 'suds.sax.text.Text'>)
------------------------------------------------------------------
Key: 'requestdisk'
	CMD_TYPE:      'DiskUsage' (<type 'str'>)
	QMF_TYPE:      '22' (<type 'int'>)
	AVIARY_TYPE:   '22' (<class 'suds.sax.text.Text'>)
------------------------------------------------------------------
Key: 'localsyscpu'
	CMD_TYPE:      '0.0' (<type 'str'>)
	QMF_TYPE:      '0.0' (<type 'float'>)
	AVIARY_TYPE:   '0.000000' (<class 'suds.sax.text.Text'>)
------------------------------------------------------------------
Key: 'remotewallclocktime'
	CMD_TYPE:      '0.0' (<type 'str'>)
	QMF_TYPE:      '0.0' (<type 'float'>)
	AVIARY_TYPE:   '0.000000' (<class 'suds.sax.text.Text'>)
------------------------------------------------------------------
Key: 'localusercpu'
	CMD_TYPE:      '0.0' (<type 'str'>)
	QMF_TYPE:      '0.0' (<type 'float'>)
	AVIARY_TYPE:   '0.000000' (<class 'suds.sax.text.Text'>)
------------------------------------------------------------------
Key: 'requestmemory'
	CMD_TYPE:      'ceiling(ifThenElse(JobVMMemory =!= undefined,JobVMMemory,ImageSize / 1024.000000))' (<type 'str'>)
	QMF_TYPE:      '1' (<type 'int'>)
	AVIARY_TYPE:   '1' (<class 'suds.sax.text.Text'>)
------------------------------------------------------------------


Expected results:
  Output of AVIARY should be the same (or similar) to QMF.

Comment 1 Pete MacKinnon 2011-10-05 21:02:39 UTC
This behaviour is by design. Aviary carries a different type encoding in its API which is more general. The cases where the QMF API gets tangled up is in the representation of Condor ClassAd expressions. In QMF, these have to be denoted out-of-band using a verbose descriptor tag. Aviary addresses this by treating every attribute value as a string with an accompanying type enumeration. These enumerations are FLOAT, INTEGER, EXPRESSION, BOOLEAN, etc.

Also, note that there is no requirement that Aviary and QMF have parity in their type encoding of ClassAd values (just that the type can be inferred or declared), so not sure what this test is all about.