@@ -64,6 +64,17 @@ function startWLS() {
64
64
65
65
traceTiming " POD '${SERVICE_NAME} ' MD5 END"
66
66
67
+ #
68
+ # We "tail" the future WL Server .out file to stdout in background _before_ starting
69
+ # the WLS Server because we use WLST 'nmStart()' to start the server and nmStart doesn't return
70
+ # control until WLS reaches the RUNNING state.
71
+ #
72
+
73
+ if [ " ${SERVER_OUT_IN_POD_LOG} " == ' true' ] ; then
74
+ trace " Showing the server out file from ${SERVER_OUT_FILE} "
75
+ ${SCRIPTPATH} /tailLog.sh ${SERVER_OUT_FILE} ${SERVER_PID_FILE} &
76
+ fi
77
+
67
78
#
68
79
# Start WL Server
69
80
#
@@ -76,6 +87,12 @@ function startWLS() {
76
87
${SCRIPTPATH} /wlst.sh $SCRIPTPATH /start-server.py
77
88
78
89
traceTiming " POD '${SERVICE_NAME} ' WLS STARTED"
90
+
91
+ FAIL_BOOT_ON_SITUATIONAL_CONFIG_ERROR=${FAIL_BOOT_ON_SITUATIONAL_CONFIG_ERROR:- true}
92
+ SERVER_OUT_MONITOR_INTERVAL=${SERVER_OUT_MONITOR_INTERVAL:- 3}
93
+ if [ ${FAIL_BOOT_ON_SITUATIONAL_CONFIG_ERROR} == ' true' ] ; then
94
+ ${SCRIPTPATH} /monitorLog.sh ${SERVER_OUT_FILE} ${SERVER_OUT_MONITOR_INTERVAL} &
95
+ fi
79
96
}
80
97
81
98
function mockWLS() {
@@ -89,22 +106,6 @@ function mockWLS() {
89
106
echo " RUNNING:Y:N" > $STATEFILE
90
107
}
91
108
92
- function waitUntilShutdown() {
93
- #
94
- # Wait forever. Kubernetes will monitor this pod via liveness and readyness probes.
95
- #
96
- if [ " ${SERVER_OUT_IN_POD_LOG} " == ' true' ] ; then
97
- trace " Showing the server out file from ${SERVER_OUT_FILE} "
98
- ${SCRIPTPATH} /tailLog.sh ${SERVER_OUT_FILE} ${SERVER_PID_FILE} &
99
- fi
100
- FAIL_BOOT_ON_SITUATIONAL_CONFIG_ERROR=${FAIL_BOOT_ON_SITUATIONAL_CONFIG_ERROR:- true}
101
- SERVER_OUT_MONITOR_INTERVAL=${SERVER_OUT_MONITOR_INTERVAL:- 3}
102
- if [ ${FAIL_BOOT_ON_SITUATIONAL_CONFIG_ERROR} == ' true' ] ; then
103
- ${SCRIPTPATH} /monitorLog.sh ${SERVER_OUT_FILE} ${SERVER_OUT_MONITOR_INTERVAL} &
104
- fi
105
- waitForShutdownMarker
106
- }
107
-
108
109
# Define helper fn to copy sit cfg xml files from one dir to another
109
110
# $src_dir files are assumed to start with $fil_prefix and end with .xml
110
111
# Copied $tgt_dir files are stripped of their $fil_prefix
@@ -247,12 +248,18 @@ copySitCfg /weblogic-operator/introspector ${DOMAIN_HOME}/optconfig/jms
247
248
copySitCfg /weblogic-operator/introspector ${DOMAIN_HOME} /optconfig/jdbc ' Sit-Cfg-JDBC--'
248
249
copySitCfg /weblogic-operator/introspector ${DOMAIN_HOME} /optconfig/diagnostics ' Sit-Cfg-WLDF--'
249
250
250
-
251
+ #
252
+ # Start WLS
253
+ #
251
254
252
255
if [ " ${MOCK_WLS} " == ' true' ]; then
253
256
mockWLS
254
- waitForShutdownMarker
255
257
else
256
258
startWLS
257
- waitUntilShutdown
258
259
fi
260
+
261
+ #
262
+ # Wait forever. Kubernetes will monitor this pod via liveness and readyness probes.
263
+ #
264
+
265
+ waitForShutdownMarker
0 commit comments