Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLOUD-2455] - [BxMS] ERROR IJ000315: Pool amq-ConnectionFactory has … #226

Merged
merged 1 commit into from Apr 12, 2018

Conversation

spolti
Copy link
Contributor

@spolti spolti commented Apr 10, 2018

…1 active handles

Signed-off-by: Filippe Spolti fspolti@redhat.com

Thanks for submitting your Pull Request!

Please make sure your PR meets following requirements:

  • Pull Request title is properly formatted: [CLOUD-XYA] Subject
  • Pull Request contains link to the JIRA issue
  • Pull Request contains description of the issue
  • Pull request does not include fixes for other issues than the main ticket
  • Attached commits represent unit of work and are properly formatted
  • You have read and agreed to the Developer Certificate of Origin (DCO) (see CONTRIBUTING.md)
  • Every commit contains Signed-off-by: Your Name <yourname@redhat.com> - use git commit -s

@errantepiphany errantepiphany self-requested a review April 10, 2018 18:36
Copy link
Contributor

@errantepiphany errantepiphany left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see comments about potential changes.

resource_adapter="${resource_adapter}<connection-definitions><connection-definition class-name=\"${ra_class}\" jndi-name=\"${ra_jndi}\" enabled=\"true\" use-java-context=\"true\">"
resource_adapter="${resource_adapter}<connection-definitions><connection-definition"
# monitor applications, look for unclosed resources.
tracking=$(find_env "${ra_prefix}_TRACKING" "true")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. I think the "tracking" variable can be declared as local, and moved into the "if [[ "$JBOSS_EAP_VERSION" == "7."* ]]" statement below it.
  2. Shouldn't the default be "false", per the workaround described in CLOUD-2455?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed, thanks.


if [[ "$JBOSS_EAP_VERSION" == "7."* ]]; then
# monitor applications, look for unclosed resources.
local tracking=$(find_env "${ra_prefix}_TRACKING" "false")
Copy link

@maschmid maschmid Apr 11, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should keep the default and set it only if the property is set. (I believe in general it defaults to true, but perhaps not always)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After discussion, I agree with @maschmid . Instead of checking the jboss eap version, just see if the tracking variable is set. If it is, set it, otherwise, do nothing. Additionally, instead of having to change all our KIE templates to set this variable to false, we can just set them in the image.yaml (not even needing to declare them in the templates).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem of doing this is that it will also be applied on eap6, is this setting also necessary on eap6?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea is that we wouldn't set the variable unless the env var is defined (so, don't use a default value when looking up the env var). It then wouldn't be applied to eap6, because no one would be setting the env var.

@maschmid
Copy link

Make sure you also don't need to change

https://github.com/jboss-openshift/cct_module/blob/master/os-eap7-launch/added/launch/messaging.sh#L174

(or do that same / similar change there if you need)

@errantepiphany errantepiphany dismissed their stale review April 11, 2018 14:31

Dismissing my review in favor of @maschmid's.

resource_adapter="${resource_adapter}<connection-definitions><connection-definition class-name=\"${ra_class}\" jndi-name=\"${ra_jndi}\" enabled=\"true\" use-java-context=\"true\">"
resource_adapter="${resource_adapter}<connection-definitions><connection-definition"

if [ -n "${RA_TRACKING}" ]; then

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in this case this is resource-adapter specific, so it should use the ra_prefix_TRACKING

@@ -313,14 +315,18 @@ function inject_brokers() {
# topics environment variable name format: [NAME]_[BROKER_TYPE]_TOPICS
topics=$(find_env "${prefix}_TOPICS")

if [ -n "${RA_TRACKING}" ]; then

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be specific to the resource adapter, as in general there can be more (should use the ${prefix}_TRACKING

…1 active handles

Signed-off-by: Filippe Spolti <fspolti@redhat.com>
@@ -172,6 +173,7 @@ function generate_resource_adapter() {
<config-property name=\"ServerUrl\">tcp://$6:$7?jms.rmIdFromConnectionId=true</config-property>
<connection-definitions>
<connection-definition
"${13}"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is already inside quotes , did you mean just ${13} ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its ok use quotes there since it is not escaped.

tracking=$(find_env "${prefix}_TRACKING")
if [ -n "${tracking}" ]; then
ra_tracking="tracking=\"${tracking}\""
fi
Copy link

@maschmid maschmid Apr 12, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ra_tracking is potentially undefined here, it would be better to explicitly set it to an empty string, just to be safe from a global "ra_tracking" set somewhere else...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a hard scenario but can happen since this var is not local, I'll updated it, does it block the QE to test using the images that is already there?

Copy link

@maschmid maschmid Apr 12, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no I don't think we need to retest on trivial changes, as long as the container behave tests pass.

resource_adapter="${resource_adapter}<connection-definitions><connection-definition class-name=\"${ra_class}\" jndi-name=\"${ra_jndi}\" enabled=\"true\" use-java-context=\"true\">"
resource_adapter="${resource_adapter}<connection-definitions><connection-definition"

tracking=$(find_env "${ra_prefix}_TRACKING")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be local.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

never mind. it looks like this is initialized every time.

@rcernich rcernich merged commit 1f1bf53 into jboss-openshift:master Apr 12, 2018
@spolti spolti deleted the CLOUD-2455 branch April 13, 2021 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants