Bug 990950

Summary: Special macros don't work with inner brackets
Product: Red Hat Enterprise MRG Reporter: Lubos Trilety <ltrilety>
Component: condorAssignee: grid-maint-list <grid-maint-list>
Status: CLOSED WONTFIX QA Contact: MRG Quality Engineering <mrgqe-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: DevelopmentCC: matt
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-26 19:29:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lubos Trilety 2013-08-01 09:28:00 UTC
Description of problem:
Special macros RANDOM_CHOICE and RANDOM_INTEGER do not work correctly with inner brackets.

Version-Release number of selected component (if applicable):
condor-7.8.8-0.4.1

How reproducible:
100%

Steps to Reproduce:
1. Configuration:
SOMETHING=something
TEST1 = $RANDOM_CHOICE($(SOMETHING), $(SOMETHING))

MAX_NUMBER = 10
TEST2 = $RANDOM_INTEGER(1, $(MAX_NUMBER), 2)

# for control
TEST3 = $RANDOM_INTEGER(1, 10, 2)

2. run condor_config_val\
# condor_config_val TEST1
$(SOMETHING, something)

# condor_config_val TEST2
ERROR "$RANDOM_INTEGER() config macro: invalid max!" at line 704 in file /builddir/build/BUILD/condor-7.8.6/src/condor_utils/config.cpp

# condor_config_val TEST3
3

Actual results:
Special macros evaluation counts with the first ending bracket instead of the correct one.

Expected results:
The expression will be evaluated correctly

Additional info:

Comment 1 Anne-Louise Tangring 2016-05-26 19:29:15 UTC
MRG-Grid is in maintenance and only customer escalations will be considered. This issue can be reopened if a customer escalation associated with it occurs.