Bug 1264500

Summary: cannot pass comma-delimted values with oc parameters
Product: OpenShift Container Platform Reporter: Bill DeCoste <wdecoste>
Component: ocAssignee: Fabiano Franz <ffranz>
Status: CLOSED ERRATA QA Contact: Wei Sun <wsun>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.0.0CC: akokshar, aos-bugs, ccoleman, ffranz, jforrest, jokerman, mmccomas, pep, tdawson
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-12 16:24:42 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:
Bug Depends On:    
Bug Blocks: 1267746    

Description Bill DeCoste 2015-09-18 15:28:51 UTC
Description of problem:
I've been trying to figure out how to pass comma-delimited values using oc
parameters. For example (note MQ_PROTOCOL):

oc process -f amq/amq6-basic.json -v
APPLICATION_NAME=messaging,MQ_USERNAME=username,MQ_PASSWORD=password,MQ_PROTOCOL=stomp,amqp
| oc create -f -

The comma between 'stomp' and 'amqp' is always parsed as parameter delimiter
not a value delimiter no matter what combination of \ ^ " ' I use. Could you
point me to who I should talk to about the Go parser in oc?


Per Clayton:
We shouldn't have done -v like we did.  Please open a bug "process
must take multiple -v arguments" and we can fix it.

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


How reproducible:
100%


Steps to Reproduce:
1. oc process -f amq/amq6-basic.json -v
APPLICATION_NAME=messaging,MQ_USERNAME=username,MQ_PASSWORD=password,MQ_PROTOCOL=stomp,amqp
| oc create -f -
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Clayton Coleman 2015-09-18 15:35:34 UTC
-v should not have been implemented with string splitting.  We have to accept multiple -v.

Because of backcompat, we need to introduce a new multiple value form, and we should probably accept argument key=value pairs like oc env

Comment 3 Fabiano Franz 2016-02-03 21:23:57 UTC
Fixed in https://github.com/openshift/origin/pull/7013

Comment 4 Wei Sun 2016-02-04 03:22:29 UTC
Will check this bug after the pr is merged

Comment 5 Wei Sun 2016-02-05 06:05:07 UTC
Checked this bug in devenv-rhel7_3335,it was fixed.After the pr is merged to ose puddle,I'll check again.

Result:
# oc process -f https://raw.githubusercontent.com/jboss-openshift/application-templates/master/amq/amq62-basic.json APPLICATION_NAME=messaging MQ_USERNAME=username MQ_PASSWORD=password,MQ_PROTOCOL=stomp,amqp | oc create -f -
service "messaging-amq-amqp" created
service "messaging-amq-mqtt" created
service "messaging-amq-stomp" created
service "messaging-amq-tcp" created
deploymentconfig "messaging-amq" created

Comment 6 Wei Sun 2016-02-14 09:18:01 UTC
The bug has been fixed on the latest puddle.

$ oc version
oc v3.1.1.901
kubernetes v1.2.0-origin

Comment 10 errata-xmlrpc 2016-05-12 16:24:42 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2016:1064