Bug 1289316 - [GSS](6.4.z) CLI does not resolve multiple properties if one property is undefined
Summary: [GSS](6.4.z) CLI does not resolve multiple properties if one property is unde...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: CLI
Version: 6.4.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: CR1
: EAP 6.4.12
Assignee: Chao Wang
QA Contact: Petr Kremensky
URL:
Whiteboard: eap6412-proposed
Depends On: 1237275
Blocks: eap6412-payload
TreeView+ depends on / blocked
 
Reported: 2015-12-07 20:50 UTC by Aaron Ogburn
Modified: 2019-09-12 09:30 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-01-17 13:10:50 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker WFCORE-1198 0 Major Resolved CLI does not resolve multiple properties if one property is undefined 2018-04-13 07:54:43 UTC

Description Aaron Ogburn 2015-12-07 20:50:54 UTC
Multiple property substitution is working with EAP 6.4.3+, however, if a variable amongst the multiple variables is empty or has no value, then the subsequent property in the CLI command is not substituted. 

For example : 
cat props.properties 
-----------------------------------------
PROFILE-NAME=TestProfile
SERVER-INSTANCE-NUMBER=TestInstance
APP-VERSION=
VAR=test
-----------------------------------------

cat test.cli :
---------------------------------------
/host=master/server-config=${PROFILE-NAME}${APP-VERSION}${SERVER-INSTANCE-NUMBER}${VAR}:add(auto-start=true, group="${PROFILE-NAME}${APP-VERSION}-server-group")
---------------------------------------

and if I execute "./jboss-cli.sh --connect --file=test.cli --properties=props.properties" then I have the following in the host.xml ": 

----------
...
<server name="TestProfile${SERVER-INSTANCE-NUMBER}test" group="TestProfile-server-group" auto-start="true"/>
...
-----------

Note APP-VERSION had no value, and so the subsequent SERVER-INSTANCE-NUMBER was not properly resolved

Comment 2 Chao Wang 2015-12-09 09:43:45 UTC
I have created upstream WFCORE-1198 to throw an UnresolvedExpressionException with informative message in such case, just to avoid to write unresolved value into configuration file in such case.

Comment 4 Mike McCune 2016-03-28 22:24:40 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 6 Ivo Hradek 2016-11-22 08:59:48 UTC
Verified with EAP 6.4.12.CP.CR1;
--
Note: In order to get it work as expected, "resolve-parameter-values" in jboss-cli.xml must be set to true.

Comment 7 Petr Penicka 2017-01-17 13:10:50 UTC
Retroactively bulk-closing issues from released EAP 6.4 cummulative patches.


Note You need to log in before you can comment on or make changes to this bug.