Bug 1387645

Summary: boolean values not correctly processed for a template
Product: OpenShift Container Platform Reporter: raffaele spazzoli <rspazzol>
Component: DocumentationAssignee: Dan Winship <danw>
Status: CLOSED CURRENTRELEASE QA Contact: Xingxing Xia <xxia>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.3.0CC: aos-bugs, bbennett, jokerman, mmccomas
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-16 20:28:02 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:

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