Bug 1264500 - cannot pass comma-delimted values with oc parameters
cannot pass comma-delimted values with oc parameters
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
3.0.0
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Fabiano Franz
Wei Sun
:
Depends On:
Blocks: 1267746
  Show dependency treegraph
 
Reported: 2015-09-18 11:28 EDT by Bill DeCoste
Modified: 2016-05-16 10:19 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-05-12 12:24:42 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bill DeCoste 2015-09-18 11:28:51 EDT
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 11:35:34 EDT
-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 16:23:57 EST
Fixed in https://github.com/openshift/origin/pull/7013
Comment 4 Wei Sun 2016-02-03 22:22:29 EST
Will check this bug after the pr is merged
Comment 5 Wei Sun 2016-02-05 01:05:07 EST
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 04:18:01 EST
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 12:24:42 EDT
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

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