-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #744 from oracle/domain-home-fix
WIP: Issue #721 fix. When domain resource 'domainHome' is not set and 'domainHomeInImage' is 'true' look for a single WebLogic domain under '/u01/oracle/user_projects/domains', and use this as this location as the DOMAIN_HOME.
- Loading branch information
Showing
14 changed files
with
113 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,37 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2017, 2018, Oracle Corporation and/or its affiliates. All rights reserved. | ||
# Copyright 2017, 2019, Oracle Corporation and/or its affiliates. All rights reserved. | ||
# Licensed under the Universal Permissive License v 1.0 as shown at | ||
# http://oss.oracle.com/licenses/upl. | ||
|
||
# Kubernetes periodically calls this liveness probe script to determine whether | ||
# the pod should be restarted. The script checks a WebLogic Server state file which | ||
# is updated by the node manager. | ||
|
||
# if the livenessProbeSuccessOverride file is available, treat failures as success: | ||
RETVAL=$(test -f /weblogic-operator/debug/livenessProbeSuccessOverride ; echo $?) | ||
|
||
SCRIPTPATH="$( cd "$(dirname "$0")" > /dev/null 2>&1 ; pwd -P )" | ||
source ${SCRIPTPATH}/traceUtils.sh | ||
[ $? -ne 0 ] && echo "Error: missing file ${SCRIPTPATH}/traceUtils.sh" && exit $RETVAL | ||
|
||
# check DOMAIN_HOME for a config/config.xml, reset DOMAIN_HOME if needed: | ||
exportEffectiveDomainHome || exit $RETVAL | ||
|
||
DN=${DOMAIN_NAME?} | ||
SN=${SERVER_NAME?} | ||
DH=${DOMAIN_HOME?} | ||
|
||
STATEFILE=${DH}/servers/${SN}/data/nodemanager/${SN}.state | ||
|
||
# if the livenessProbeSuccessOverride file is available, treat failures as success | ||
# | ||
RETVAL=$(test -f /weblogic-operator/debug/livenessProbeSuccessOverride ; echo $?) | ||
|
||
if [ "${MOCK_WLS}" != 'true' ]; then | ||
if [ `jps -l | grep -c " weblogic.NodeManager"` -eq 0 ]; then | ||
echo "Error: WebLogic NodeManager process not found." | ||
trace "Error: WebLogic NodeManager process not found." | ||
exit $RETVAL | ||
fi | ||
fi | ||
if [ -f ${STATEFILE} ] && [ `grep -c "FAILED_NOT_RESTARTABLE" ${STATEFILE}` -eq 1 ]; then | ||
echo "Error: WebLogic Server state is FAILED_NOT_RESTARTABLE." | ||
trace "Error: WebLogic Server state is FAILED_NOT_RESTARTABLE." | ||
exit $RETVAL | ||
fi | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters