File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
java/oracle/kubernetes/operator Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -126,6 +126,7 @@ public NextAction apply(Packet packet) {
126
126
TuningParameters .MainTuning main = TuningParameters .getInstance ().getMainTuning ();
127
127
LastKnownStatus lastKnownStatus = info .getLastKnownServerStatus (serverName );
128
128
if (lastKnownStatus != null
129
+ && !WebLogicConstants .UNKNOWN_STATE .equals (lastKnownStatus .getStatus ())
129
130
&& lastKnownStatus .getUnchangedCount () >= main .unchangedCountToDelayStatusRecheck ) {
130
131
if (DateTime .now ()
131
132
.isBefore (lastKnownStatus .getTime ().plusSeconds ((int ) main .eventualLongDelay ))) {
@@ -162,10 +163,13 @@ public NextAction apply(Packet packet) {
162
163
163
164
InputStream in = proc .getInputStream ();
164
165
if (proc .waitFor (timeoutSeconds , TimeUnit .SECONDS )) {
165
- if (proc .exitValue () == 0 ) {
166
+ int exitValue = proc .exitValue ();
167
+ if (exitValue == 0 ) {
166
168
try (final Reader reader = new InputStreamReader (in , Charsets .UTF_8 )) {
167
169
state = CharStreams .toString (reader );
168
170
}
171
+ } else if (exitValue == 1 ) {
172
+ state = WebLogicConstants .SHUTDOWN_STATE ;
169
173
} else {
170
174
state = WebLogicConstants .UNKNOWN_STATE ;
171
175
}
Original file line number Diff line number Diff line change @@ -22,13 +22,12 @@ STATEFILE=/${DH}/servers/${SN}/data/nodemanager/${SN}.state
22
22
23
23
if [ ` jps -v | grep -c " -Dweblogic.Name=${SERVER_NAME} " ` -eq 0 ]; then
24
24
trace " WebLogic server process not found"
25
- echo SHUTDOWN
26
- exit 0
25
+ exit 1
27
26
fi
28
27
29
28
if [ ! -f ${STATEFILE} ]; then
30
29
trace " Error: WebLogic Server state file not found."
31
- exit 1
30
+ exit 2
32
31
fi
33
32
34
33
cat ${STATEFILE} | cut -f 1 -d ' :'
You can’t perform that action at this time.
0 commit comments