Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 637914

Summary: negotiator plug-in needs to discriminate between valid attribute and valid config names
Product: Red Hat Enterprise MRG Reporter: Pete MacKinnon <pmackinn>
Component: condor-qmfAssignee: Pete MacKinnon <pmackinn>
Status: CLOSED ERRATA QA Contact: Tomas Rusnak <trusnak>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.3CC: fnadge, matt, trusnak
Target Milestone: 1.3.2Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: condor-7.4.5-0.3 Doc Type: Bug Fix
Doc Text:
Due to differing sets of valid characters for parameter names and group/user names, a single check could reject valid parameter names on negotiator object methods. This update uses two distinct check methods for each case. Now, the negotiator object impl correctly discriminates between valid parameter and group/user names.
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-02-15 12:14:22 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
Unit test of various good and bad attribute names
none
Py test driver of SetJobAttribute
none
submit py script needed by test-attr.sh none

Description Pete MacKinnon 2010-09-27 18:16:36 UTC
Code in the NegotiatorObject for setting configuration values checks for valid names based on 'a-z','A-Z','0-9','_','.'. However, a dot '.' is not allowed in classad attribute names. Thus, we need more fine-grained checking.

Comment 1 Pete MacKinnon 2010-11-04 15:57:56 UTC
Impossible (and likely unnecessary) to distinguish between a config var that contains a '.' (OK) and a ClassAd param that does (not OK).

Comment 2 Pete MacKinnon 2010-11-04 16:13:16 UTC
Re-opening. Forgot that we were using this func in SchedulerObject.

Comment 3 Pete MacKinnon 2010-12-09 15:38:40 UTC
FH sha 6f0856d4

Comment 4 Pete MacKinnon 2010-12-10 15:11:08 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: param names and gorup/user names have differing sets of valid chars
Consequences: valid param names were rejected on negotiator object methods by single check
Fix: created two distinct check methods for each case
Result: negotiator object impl properly discriminates between valid param and group/user names

Comment 6 Tomas Rusnak 2011-01-26 16:26:20 UTC
Informations for reproducing are missing. Please, could you add info on which version we can reproduce it, which one was patched and some steps how we can reproduce it?

Comment 7 Pete MacKinnon 2011-01-31 14:57:14 UTC
Created attachment 476203 [details]
Unit test of various good and bad attribute names

Comment 8 Pete MacKinnon 2011-01-31 14:58:45 UTC
Created attachment 476204 [details]
Py test driver of SetJobAttribute

Comment 9 Pete MacKinnon 2011-01-31 15:44:33 UTC
7.4.4-0.15 should be the repro package

Comment 10 Pete MacKinnon 2011-01-31 15:48:04 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,4 @@
-Cause: param names and gorup/user names have differing sets of valid chars
+Cause: param names and group/user names have differing sets of valid chars
 Consequences: valid param names were rejected on negotiator object methods by single check
 Fix: created two distinct check methods for each case
 Result: negotiator object impl properly discriminates between valid param and group/user names

Comment 11 Pete MacKinnon 2011-01-31 16:19:34 UTC
Created attachment 476224 [details]
submit py script needed by test-attr.sh

Comment 12 Tomas Rusnak 2011-02-02 16:14:31 UTC
Reproduced on x86/RHEL5 with condor-7.4.4-0.15.

# ./test-attrs.sh 
step #1 - SubmitJob
step #2 - set good attribute name
attr test - step #2 failed

Good attributes refused by condor.

Comment 13 Tomas Rusnak 2011-02-03 09:01:50 UTC
Retested over all supported platforms RHEL4,RHEL5/x86,x86_64 with:

condor-7.4.5-0.7.el4
condor-7.4.5-0.7.el5

# ./test-attrs.sh 
step #1 - SubmitJob
step #2 - set good attribute name
step #3 - set really bad attribute name
step #4 - set slightly bad attribute name
all tests passed

All good attributes accepted by condor. No regression found.

>>> VERIFIED

Comment 14 Florian Nadge 2011-02-09 17:19:27 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: param names and group/user names have differing sets of valid chars
+Previously, a single check could reject valid parameter names on negotiator object methods, due to differing sets of valid characters for  parameter names and group/user names. This update uses two distinct check methods for each case. Now, the negotiator object impl correctly discriminates between valid parameter and group/user names.-Consequences: valid param names were rejected on negotiator object methods by single check
-Fix: created two distinct check methods for each case
-Result: negotiator object impl properly discriminates between valid param and group/user names

Comment 15 Florian Nadge 2011-02-09 17:51:36 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 @@
-Previously, a single check could reject valid parameter names on negotiator object methods, due to differing sets of valid characters for  parameter names and group/user names. This update uses two distinct check methods for each case. Now, the negotiator object impl correctly discriminates between valid parameter and group/user names.+Due to differing sets of valid characters for  parameter names and group/user names, a single check could reject valid parameter names on negotiator object methods. This update uses two distinct check methods for each case. Now, the negotiator object impl correctly discriminates between valid parameter and group/user names.

Comment 16 errata-xmlrpc 2011-02-15 12:14:22 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/RHBA-2011-0217.html