@@ -64,6 +64,17 @@ function startWLS() {
6464
6565 traceTiming " POD '${SERVICE_NAME} ' MD5 END" 
6666
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+ 
6778 # 
6879 #  Start WL Server
6980 # 
@@ -76,6 +87,12 @@ function startWLS() {
7687 ${SCRIPTPATH} /wlst.sh $SCRIPTPATH /start-server.py
7788
7889 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 
7996}
8097
8198function  mockWLS()  {
@@ -89,22 +106,6 @@ function mockWLS() {
89106 echo  " RUNNING:Y:N"   >  $STATEFILE 
90107}
91108
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- 
108109#  Define helper fn to copy sit cfg xml files from one dir to another
109110#  $src_dir files are assumed to start with $fil_prefix and end with .xml
110111#  Copied $tgt_dir files are stripped of their $fil_prefix
@@ -247,12 +248,18 @@ copySitCfg /weblogic-operator/introspector ${DOMAIN_HOME}/optconfig/jms
247248copySitCfg /weblogic-operator/introspector ${DOMAIN_HOME} /optconfig/jdbc ' Sit-Cfg-JDBC--' 
248249copySitCfg /weblogic-operator/introspector ${DOMAIN_HOME} /optconfig/diagnostics ' Sit-Cfg-WLDF--' 
249250
250- 
251+ # 
252+ #  Start WLS
253+ # 
251254
252255if  [ " ${MOCK_WLS} "   ==  ' true'   ];  then 
253256 mockWLS
254-  waitForShutdownMarker
255257else 
256258 startWLS
257-  waitUntilShutdown
258259fi 
260+ 
261+ # 
262+ #  Wait forever. Kubernetes will monitor this pod via liveness and readyness probes.
263+ # 
264+ 
265+ waitForShutdownMarker
0 commit comments