-
Notifications
You must be signed in to change notification settings - Fork 148
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
DOCKER-249 : added environment variable for ignoring fragment #148
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,6 +49,13 @@ function main { | |
modules_active=true | ||
fi | ||
|
||
if [ -z "${LIFERAY_CONTAINER_STATUS_IGNORE_ACTIVE_MODULES}" ] | ||
then | ||
# if not set the ignore module, then ignore fragment by default | ||
lecho "LIFERAY_CONTAINER_STATUS_IGNORE_ACTIVE_MODULES not set, setting its value to ignore fragment" | ||
Comment on lines
+54
to
+55
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @chinmay-abhyankar, usually, we don't add comments in the code, therefore can you please remove these 2 lines? |
||
LIFERAY_CONTAINER_STATUS_IGNORE_ACTIVE_MODULES="fragment" | ||
fi | ||
|
||
while true | ||
do | ||
if [ "${started}" != true ] | ||
|
@@ -110,9 +117,9 @@ function main { | |
) | telnet 127.0.0.1 11311 2> /dev/null | ||
) | ||
|
||
local active_count=$(echo "${telnet_content}" | grep -E "${LIFERAY_CONTAINER_STATUS_ACTIVE_MODULES}" | grep -c ACTIVE) | ||
local active_count=$(echo "${telnet_content}" | grep -v "${LIFERAY_CONTAINER_STATUS_IGNORE_ACTIVE_MODULES}" | grep -E "${LIFERAY_CONTAINER_STATUS_ACTIVE_MODULES}" | grep -c ACTIVE) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @chinmay-abhyankar, considering that a fragment never transitions to the status There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Generally developers uses fragment in symbolic name of OSGI modules which are use to fragment OOTB modules. So to sent default is to ignore checking of all modules which have word fragment, even if the envionment variable is not set There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see, @chinmay-abhyankar. Thanks for your clarification! 🙂 Since it seems to be a decision on the developer's side, maybe we should use the content of the variable |
||
|
||
local module_count=$(echo "${telnet_content}" | grep -cE "${LIFERAY_CONTAINER_STATUS_ACTIVE_MODULES}") | ||
local module_count=$(echo "${telnet_content}" | grep -v "${LIFERAY_CONTAINER_STATUS_IGNORE_ACTIVE_MODULES}" | grep -cE "${LIFERAY_CONTAINER_STATUS_ACTIVE_MODULES}") | ||
|
||
if [ "${module_count}" -eq 0 ] | ||
then | ||
|
@@ -125,7 +132,7 @@ function main { | |
else | ||
echo "Modules pending activation:" | ||
|
||
echo "${telnet_content}" | grep -E "${LIFERAY_CONTAINER_STATUS_ACTIVE_MODULES}" | grep -v ACTIVE | ||
echo "${telnet_content}" | grep -v "${LIFERAY_CONTAINER_STATUS_IGNORE_ACTIVE_MODULES}" | grep -E "${LIFERAY_CONTAINER_STATUS_ACTIVE_MODULES}" | grep -v ACTIVE | ||
fi | ||
fi | ||
|
||
|
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.
@chinmay-abhyankar, can you please include this new variable considering the alphabetic order?
Thanks