Bug 1761511 - Installation Instructions for AMQ 7.5 are causing errors
Summary: Installation Instructions for AMQ 7.5 are causing errors
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Templates
Version: unspecified
Hardware: All
OS: All
unspecified
high
Target Milestone: ---
: 4.3.0
Assignee: Gabe Montero
QA Contact: XiuJuan Wang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-10-14 14:40 UTC by hchin
Modified: 2019-10-17 17:18 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-10-15 22:17:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description hchin 2019-10-14 14:40:28 UTC
Description of problem:

Installation Instructions for AMQ 7.5 are causing errors.
https://access.redhat.com/documentation/en-us/red_hat_amq/7.5/html-single/deploying_amq_broker_on_openshift/index#installing-broker-ocp_broker-ocp

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

How reproducible:
Follow instructions here https://access.redhat.com/documentation/en-us/red_hat_amq/7.5/html-single/deploying_amq_broker_on_openshift/index#installing-broker-ocp_broker-ocp

Steps to Reproduce:
Follow instructions here https://access.redhat.com/documentation/en-us/red_hat_amq/7.5/html-single/deploying_amq_broker_on_openshift/index#installing-broker-ocp_broker-ocp

Actual results:
Error from server (BadRequest): Template in version "v1" cannot be handled as a Template: v1.Template.Parameters: []v1.Parameter: v1.Parameter.Value: ReadString: expects " or n, but found f, error found in #10 byte of ...|,"value":false},{"de|..., bigger context ...|_ENABLE_METRICS_PLUGIN","required":false,"value":false},{"description":"Journal type to use; aio or |...
Error from server (BadRequest): Template in version "v1" cannot be handled as a Template: v1.Template.Parameters: []v1.Parameter: v1.Parameter.Value: ReadString: expects " or n, but found f, error found in #10 byte of ...|,"value":false},{"de|..., bigger context ...|_ENABLE_METRICS_PLUGIN","required":false,"value":false},{"description":"Journal type to use; aio or |...
template.template.openshift.io "amq-broker-75-custom" deleted
template.template.openshift.io/amq-broker-75-custom replaced
Error from server (BadRequest): Template in version "v1" cannot be handled as a Template: v1.Template.Parameters: []v1.Parameter: v1.Parameter.Value: ReadString: expects " or n, but found f, error found in #10 byte of ...|,"value":false},{"de|..., bigger context ...|_ENABLE_METRICS_PLUGIN","required":false,"value":false},{"description":"Journal type to use; aio or |...
Error from server (BadRequest): Template in version "v1" cannot be handled as a Template: v1.Template.Parameters: []v1.Parameter: v1.Parameter.Value: ReadString: expects " or n, but found f, error found in #10 byte of ...|,"value":false},{"de|..., bigger context ...|_ENABLE_METRICS_PLUGIN","required":false,"value":false},{"description":"Journal type to use; aio or |...
Error from server (BadRequest): Template in version "v1" cannot be handled as a Template: v1.Template.Parameters: []v1.Parameter: v1.Parameter.Value: ReadString: expects " or n, but found f, error found in #10 byte of ...|,"value":false},{"de|..., bigger context ...|_ENABLE_METRICS_PLUGIN","required":false,"value":false},{"description":"Journal type to use; aio or |...
Error from server (BadRequest): Template in version "v1" cannot be handled as a Template: v1.Template.Parameters: []v1.Parameter: v1.Parameter.Value: ReadString: expects " or n, but found f, error found in #10 byte of ...|,"value":false},{"de|..., bigger context ...|_ENABLE_METRICS_PLUGIN","required":false,"value":false},{"description":"Journal type to use; aio or |...


Expected results:
template.template.openshift.io/amq-broker-75-basic replaced
template.template.openshift.io/amq-broker-75-ssl replaced
template.template.openshift.io/amq-broker-75-custom replaced
template.template.openshift.io/amq-broker-75-persistence replaced
template.template.openshift.io/amq-broker-75-persistence-ssl replaced
template.template.openshift.io/amq-broker-75-persistence-clustered replaced
template.template.openshift.io/amq-broker-75-persistence-clustered-ssl replaced


Additional info:

Comment 1 Adam Kaplan 2019-10-14 19:41:06 UTC
@Gabe looks like there is a new parameter where the `value` for this is defaulting to a bool, not clear why/how this is happening.

@hchin please are you trying to set the new AMQ_ENABLE_METRICS_PLUGIN value to "false"? In addition, please let us know on which version of OpenShift you encountered this error.

Comment 2 Gabe Montero 2019-10-15 19:18:47 UTC
Some preliminary research:

- based on the jboss amq team's input into openshift library, the latest version they have provided to openshift installs is 7.3, not 7.5: https://github.com/openshift/library/blob/master/official.yaml#L403-L408

- Adam is correct that they added a new template param in 7.5 that does not exist in 7.3, namely https://github.com/jboss-container-images/jboss-amq-7-broker-openshift-image/blob/75-7.5.0.GA/templates/amq-broker-75-basic.yaml#L266-L270
where they are trying to set the default value to false

-but you'll notice there that false is not encapsulated in quotes

- in general you don't need to do this, but if I recall, the golang/k8s validations need to boolean constants like true and false to be encapsulated in quotes

that is what the 

ReadString: expects " or n, but found f, error found in #10 byte of ...|,"value":false} 

message refers to.

I believe the 7.5 AMQ template is in error, and perhaps has not been properly vetted by that team.

I'll run some experiments with the file in question, manipulating that setting, and report back.

If I'm correct, that deal with true|false is not something we can control, and this bug will need to
be sent to the JBOSS team to fix that template.

Comment 3 Gabe Montero 2019-10-15 21:58:15 UTC
Theory confirmed.

gmontero ~/QE_bzs/amq-template $ oc create -f ./75-template.yaml 
Error from server (BadRequest): error when creating "./75-template.yaml": Template in version "v1" cannot be handled as a Template: v1.Template.Parameters: []v1.Parameter: v1.Parameter.Value: ReadString: expects " or n, but found f, error found in #10 byte of ...|,"value":false},{"de|..., bigger context ...|_ENABLE_METRICS_PLUGIN","required":false,"value":false},{"description":"Journal type to use; aio or |...

gmontero ~/QE_bzs/amq-template $ oc create -f ./75-template.yaml 
template.template.openshift.io/amq-broker-75-basic created
gmontero ~/QE_bzs/amq-template $ 

The difference in those 2 runs was changing 

  value: false

to

  value: "false"

Just need to figure out where to send this bugzilla to.

Comment 4 Gabe Montero 2019-10-15 22:10:08 UTC
my 75-template.yaml in the last comment was my local copy of https://github.com/jboss-container-images/jboss-amq-7-broker-openshift-image/blob/75-7.5.0.GA/templates/amq-broker-75-basic.yaml

Comment 5 Gabe Montero 2019-10-15 22:17:32 UTC
Actually @Hong - I believe you need to open a Jira against JBoss AMQ to get them to fix their 7.5 template per my analysis above,
and that they do not use bugzilla for problem reporting.

Based on the pull requests at https://github.com/jboss-container-images/jboss-amq-7-broker-openshift-image/pulls?q=is%3Apr+is%3Aclosed
it appears the Cloud Enablement project at https://issues.jboss.org/browse/CLOUD is the one to open the bug against.

Comment 6 hchin 2019-10-17 14:46:30 UTC
JIRA opened : https://issues.jboss.org/browse/ENTMQBR-3007

Comment 7 Gabe Montero 2019-10-17 17:18:16 UTC
Thanks @Hong

One more follow up ... I just logged into that Jira board and I evidently don't have permission to add comments.

I see you put the bugzilla reference there, but if you don't mind, could you put a comment to see my diagnosis 
about true/false having to be encapsulated with quotes?

thanks


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