Bug 483666

Summary: Dynamic Slots and STARTD_JOB_EXPRS, invalid attribute name
Product: Red Hat Enterprise MRG Reporter: Matthew Farrellee <matt>
Component: condorAssignee: Matthew Farrellee <matt>
Status: CLOSED ERRATA QA Contact: Tomas Rusnak <trusnak>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.1CC: fnadge, jsarenik, tao, trusnak
Target Milestone: 1.3   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previously, the Name of a dynamic slot was "slotX.Y@Machine" which could lead to attribute problems and possible confusion with special casing. With this update, special casing is avoided, and the Name of a dynamic slot uses a "_" instead of the ".".
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-10-14 16:12: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:

Description Matthew Farrellee 2009-02-02 21:08:27 UTC
As reported by Sateesh Potturu on condor-users:

...

When I use STARTD_SLOT_ATTRS along with partitionable slots, I see the classads like below

slot1.3_Cmd = "/home/sateesh/tmp/sh_loop2"
slot1.2_Cmd = "/home/sateesh/tmp/sh_loop2"
slot1.1_Cmd = "/home/sateesh/tmp/sh_loop2"

Should it not be slot1_3_Cmd, slot1_2_Cmd, slot1_1_Cmd? ( _ instead of . )

I have STARTD_JOB_EXPRS include Cmd and STARTD_SLOT_ATTRS also include Cmd. My job requirements contains (TARGET.slot1_Cmd =!= "/home/sateesh/tmp/sh_loop2") (repeated for each slot).

...

With partitionable slots, I suspect the check against TARGET.slot1.1_Cmd fails because "." is a seperator.

I tested my observation with condor_status -constraint and it matches.

...

Comment 1 Matthew Farrellee 2010-01-14 15:42:09 UTC
See http://condor-wiki.cs.wisc.edu/index.cgi/tktview?tn=1107

Comment 2 Matthew Farrellee 2010-01-14 15:42:36 UTC
Basically, a dynamic slot's Name is "slotX.Y@Machine". This is displayed by condor_status and can be used in constraints. When using STARTD_SLOT_ATTRS, other slots on a Startd get attributes of the form slotX.Y_Attr. This is a problem because attribute names should not include a period (.), and expressions referencing slotX.Y_Attr -> ERROR.

It is possible to replace the . with a _ before sharing Attr, but that will create a special case and users will need to know the displayed name of the slot is not the same as the name used in policy.

To fix this problem and avoid special casing, a dynamic slot's name should use a _ instead of the ..

It does not appear possible to quote slotX.Y_Attr in policy expressions, as new classad grammar suggests.

Comment 3 Matthew Farrellee 2010-01-14 15:56:17 UTC
Dynamic slot names changed from slotX.Y to slotX_y in condor 7.4.2-0.3

Comment 4 Tomas Rusnak 2010-04-23 12:44:26 UTC
Reproduced on:
condor-7.4.1-0.7.1.el5

condor_status | grep slot
slot1.1 LINUX      X86_64 Claimed   Busy     0.000     1  0+00:00:27
slot1  LINUX      X86_64 Unclaimed Idle     0.030   116  0+00:00:28

Comment 5 Tomas Rusnak 2010-04-26 09:36:56 UTC
Verfied on all platforms with:

# rpm -q condor
condor-7.4.3-0.11.el5

###### RHEL5 ######

# condor -v
$CondorVersion: 7.4.3 Apr 21 2010 BuildID: RH-7.4.3-0.11.el5 PRE-RELEASE $
$CondorPlatform: I386-LINUX_RHEL5 $

# condor_status

Name               OpSys      Arch   State     Activity LoadAv Mem   ActvtyTime

slot1@dell-pe830-0 LINUX      INTEL  Unclaimed Idle     0.310  4049  0+00:00:34
slot1_1@dell-pe830 LINUX      INTEL  Claimed   Busy     0.000     1  0+00:00:04
                     Total Owner Claimed Unclaimed Matched Preempting Backfill

         INTEL/LINUX     2     0       1         1       0          0        0

               Total     2     0       1         1       0          0        0

# condor -v
$CondorVersion: 7.4.3 Apr 21 2010 BuildID: RH-7.4.3-0.11.el5 PRE-RELEASE $
$CondorPlatform: X86_64-LINUX_RHEL5 $

# condor_status

Name               OpSys      Arch   State     Activity LoadAv Mem   ActvtyTime

slot1@tyan-gt24-11 LINUX      X86_64 Unclaimed Idle     0.320  8046  0+00:00:15
slot1_1@tyan-gt24- LINUX      X86_64 Claimed   Busy     0.000     1  0+00:00:04
                     Total Owner Claimed Unclaimed Matched Preempting Backfill

        X86_64/LINUX     2     0       1         1       0          0        0

               Total     2     0       1         1       0          0        0

###### RHEL4 ######

# condor -v
$CondorVersion: 7.4.3 Apr 21 2010 BuildID: RH-7.4.3-0.11.el4 PRE-RELEASE $
$CondorPlatform: I386-LINUX_RHEL4 $

# condor_status

Name               OpSys      Arch   State     Activity LoadAv Mem   ActvtyTime

slot1 LINUX      INTEL  Unclaimed Idle     0.150  4050  0+00:00:12
slot1_1@nec-em24-1 LINUX      INTEL  Claimed   Busy     0.000     1  0+00:00:03
                     Total Owner Claimed Unclaimed Matched Preempting Backfill

         INTEL/LINUX     2     0       1         1       0          0        0

               Total     2     0       1         1       0          0        0

# condor -v
$CondorVersion: 7.4.3 Apr 21 2010 BuildID: RH-7.4.3-0.11.el4 PRE-RELEASE $
$CondorPlatform: X86_64-LINUX_RHEL4 $

# condor_status

Name               OpSys      Arch   State     Activity LoadAv Mem   ActvtyTime

slot1@tyan-gt24-09 LINUX      X86_64 Unclaimed Idle     0.170  7969  0+00:00:14
slot1_1@tyan-gt24- LINUX      X86_64 Claimed   Busy     0.000     1  0+00:00:04
                     Total Owner Claimed Unclaimed Matched Preempting Backfill

        X86_64/LINUX     2     0       1         1       0          0        0

               Total     2     0       1         1       0          0        0

>>> VERIFIED

Comment 7 Florian Nadge 2010-10-07 17:39:01 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 Name of a dynamic slot was "slotX.Y@Machine" which could lead to attribute problems and possible confusion with special casing. With this update, special casing is avoided, and the Name of a dynamic slot uses a "_" instead of the ".".

Comment 9 errata-xmlrpc 2010-10-14 16:12:37 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