You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Delete script enhancements: (1) Before directly deleting all k8s objects, set startupControl on each domain to NONE and wait up to half of max wait seconds for operator to shutdown its WLS pods normally. (2) Increase default max wait seconds to 120 seconds.
echo @@ $count objects remaining after $((mnow - mstart)) seconds. Max wait is $maxwaitsecs seconds.
107
-
if [ $count-eq 0 ];then
150
+
echo @@ $allcount objects remaining after $((mnow - mstart)) seconds, including $podcount WebLogic Server pods. Max wait is $maxwaitsecs seconds.
151
+
152
+
# Exit if all k8s objects deleted are max wait seconds exceeded.
153
+
154
+
if [ $allcount-eq 0 ];then
108
155
echo @@ Success.
109
156
rm -f $tempfile
110
157
exit 0
111
-
fi
112
-
113
-
if [ $((mnow - mstart))-gt$maxwaitsecs ];then
114
-
echo @@ Error. Max wait of $maxwaitsecs seconds exceeded with $count objects remaining. giving up. Remaining objects:
158
+
elif [ $((mnow - mstart))-gt$maxwaitsecs ];then
159
+
echo @@ Error! Max wait of $maxwaitsecs seconds exceeded with $allcount objects remaining, including $podcount WebLogic Server pods. Giving up. Remaining objects:
115
160
cat $tempfile
116
161
rm -f $tempfile
117
-
exit$count
162
+
exit$allcount
163
+
fi
164
+
165
+
# In phase 1, set the startupControl of each domain to NONE and then immediately
166
+
# proceed to phase 2. If there are no domains or WLS pods, we also immediately go to phase 2.
167
+
168
+
if [ $phase-eq 1 -a$podcount-gt 0 ];then
169
+
echo @@ "Setting startupControl to NONE on each domain (this should cause operator(s) to initiate a controlled shutdown of the domain's pods.)"
170
+
cat $tempfile| grep "^Domain"|whileread line;do
171
+
local name="`echo $line| awk '{ print $2 }'`"
172
+
local namespace="`echo $line| awk '{ print $4 }'`"
echo @@ Warning!$podcount WebLogic Server pods remaining but waittime exceeds half of max wait seconds. About to directly delete all remaining artifacts, including the leftover pods.
190
+
else
191
+
echo @@ "Waiting for operator to shutdown pods (will wait for no more than half of max wait seconds before directly deleting them)."
192
+
sleep 3
193
+
continue
194
+
fi
195
+
fi
196
+
phase=3
197
+
198
+
# In phase 3, directly delete all k8s artifacts for the given domainUids
199
+
# (including any leftover WLS pods from phases 1 & 2).
0 commit comments