File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed
operator/src/main/resources/scripts Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -94,6 +94,32 @@ function mockWLS() {
94
94
echo " RUNNING:Y:N" > $STATEFILE
95
95
}
96
96
97
+ function waitUntilShutdown() {
98
+ #
99
+ # Wait forever. Kubernetes will monitor this pod via liveness and readyness probes.
100
+ #
101
+ if [ " ${SERVER_OUT_IN_POD_LOG} " == ' true' ] ; then
102
+ trace " Showing the server out file from ${SERVER_OUT_FILE} "
103
+ tail -F -n +0 ${SERVER_OUT_FILE} || exitOrLoop
104
+ else
105
+ trace " Wait indefinitely so that the Kubernetes pod does not exit and try to restart"
106
+ while true ; do sleep 60; done
107
+ fi
108
+ }
109
+
110
+ function mockWaitUntilShutdown() {
111
+ #
112
+ # Wait forever. Kubernetes will monitor this pod via liveness and readyness probes.
113
+ #
114
+ trace " Wait indefinitely so that the Kubernetes pod does not exit and try to restart"
115
+ while true ; do
116
+ if [ -e /u01/doShutdown ] ; then
117
+ exit 0
118
+ fi
119
+ sleep 5
120
+ done
121
+ }
122
+
97
123
# Define helper fn to copy sit cfg xml files from one dir to another
98
124
# $src_dir files are assumed to start with $fil_prefix and end with .xml
99
125
# Copied $tgt_dir files are stripped of their $fil_prefix
@@ -180,8 +206,10 @@ copySitCfg /weblogic-operator/introspector ${DOMAIN_HOME}/optconfig/wldf 'Sit-C
180
206
181
207
if [ " ${MOCK_WLS} " == ' true' ]; then
182
208
mockWLS
209
+ mockWaitUntilShutdown
183
210
else
184
211
startWLS
212
+ waitUntilShutdown
185
213
fi
186
214
187
215
#
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ trace "Stop server ${SERVER_NAME}"
18
18
checkEnv SERVER_NAME || exit 1
19
19
20
20
if [ " ${MOCK_WLS} " == ' true' ]; then
21
+ touch /u01/doShutdown
21
22
exit 0
22
23
fi
23
24
You can’t perform that action at this time.
0 commit comments