Bug 1387645 - boolean values not correctly processed for a template
Summary: boolean values not correctly processed for a template
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Documentation
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Dan Winship
QA Contact: Xingxing Xia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-21 12:37 UTC by raffaele spazzoli
Modified: 2017-06-16 20:28 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-16 20:28:02 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift openshift-docs pull 3113 0 None None None 2016-10-25 18:28:15 UTC
Origin (Github) 11568 0 None None None 2016-11-03 17:33:52 UTC

Description raffaele spazzoli 2016-10-21 12:37:53 UTC
Description of problem:

it seems to me that if a template has a boolean value, for which it is acceptable to not use the string format (i.e.: true vs "true") in yaml, when the template it processed and turned into json, the value is not correctly ported to the string format. subsequent processing of the created json fail.


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

How reproducible:
reliably


Steps to Reproduce:
oc process -f https://raw.githubusercontent.com/raffaelespazzoli/openshift-enablement-exam/master/misc/egress/egress_err.yaml -v EGRESS_SOURCE=10.128.0.12,EGRESS_GATEWAY=1.2.3.4,EGRESS_DESTINATION=5.6.7.8 | oc create -f -

note that the problem is in this line:
    annotations:
      pod.network.openshift.io/assign-macvlan: true

Actual results:
CLI error


Expected results:
CLI command executes correctly

Comment 1 Ben Parees 2016-10-24 12:53:06 UTC
That field is not a boolean field, annotations are strings.  non-string values are not valid.

and that's not specific to templates, you'd have the same problem trying to create any object with that annotation.

Comment 2 raffaele spazzoli 2016-10-24 15:52:10 UTC
I copied that line from the documentation, so perhaps the documentation should be updated:

https://docs.openshift.com/container-platform/3.3/admin_guide/managing_pods.html#admin-guide-controlling-egress-traffic

Comment 3 Ben Parees 2016-10-24 16:10:39 UTC
because "true" is a special value in yaml, it's getting converted incorrectly when kube converts to json.  you're correct that the doc needs to be updated.

Comment 4 Dan Winship 2017-06-16 20:28:02 UTC
This has been fixed in the docs for a long time now


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