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
[RHDM-348] - Add Decision central clustering configuration to jboss-k… #17
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made a couple comments.
@@ -119,3 +127,33 @@ function configure_misc_security() { | |||
function configure_metaspace() { | |||
export GC_MAX_METASPACE_SIZE=${WORKBENCH_MAX_METASPACE_SIZE:-1024} | |||
} | |||
|
|||
# required envs for HA | |||
function haEnabled() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only see this function used in one place. Is it being called from other scripts as well? If not, I think it should go in the configureHA function.
[ -n "$APPFORMER_ELASTIC_HOST" -a -n "$APPFORMER_JMS_BROKER_USER" -a -n "$APPFORMER_JMS_BROKER_PASSWORD" -a -n "$APPFORMER_JMS_BROKER_ADDRESS" ] | ||
} | ||
|
||
function configureHA() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this function be renamed to configure_ha? All our other functions use under_scores vs. camelCase. So, this would be for consistency.
unset APPFORMER_ELASTIC_PORT | ||
unset APPFORMER_ELASTIC_RETRIES | ||
unset APPFORMER_JMS_BROKER_PASSWORD | ||
unset APPFORMER_JMS_BROKER_USER |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't be here also APPFORMER_JMS_BROKER_ADDRESS and APPFORMTER_JMS_BROKER_PORT ?
c3e21bf
to
ab6b9b7
Compare
@errantepiphany I think you missed to add the comment, I can't see where you requested changes. |
@spolti One more idea, the variable for elasticsearch address and JMS broker address seems to me inconsistent. Elasticsearch ends on "_HOST", JMS broker ends on "_ADDRESS". |
if [ -n "${OPENSHIFT_DNS_PING_SERVICE_NAME}" -a "${OPENSHIFT_DNS_PING_SERVICE_PORT}" ]; then | ||
#local artemisAddress=`hostname -i` | ||
log_info "OpenShift DNS_PING protocol envs set, verifying other needed envs for HA setup. Using ${JGROUPS_PING_PROTOCOL}" | ||
if haEnabled ; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious why we still have a (now nested) haEnabled() function above? Why not just replace this line:
if haEnabled ; then
with this line?:
if [ -n "$APPFORMER_ELASTIC_HOST" -a -n "$APPFORMER_JMS_BROKER_USER" -a -n "$APPFORMER_JMS_BROKER_PASSWORD" -a -n "$APPFORMER_JMS_BROKER_ADDRESS" ] ; then
…ie-modules
Thanks for submitting your Pull Request!
Please make sure your PR meets the following requirements:
[CLOUD-XYA] Subject
CONTRIBUTING.md
)Signed-off-by: Your Name <yourname@example.com>
- usegit commit -s