@@ -230,7 +230,10 @@ public static void testWlsLivenessProbe(String domainUid, String serverName, Str
230
230
231
231
// kill server process 3 times
232
232
for (int i = 0 ; i < 3 ; i ++) {
233
- kubectlexecNoCheck (podName , namespace , "/shared/killserver.sh" );
233
+ ExecResult result = kubectlexecNoCheck (podName , namespace , "/shared/killserver.sh" );
234
+ logger .info ("kill server process command exitValue " + result .exitValue ());
235
+ logger .info (
236
+ "kill server process command result " + result .stdout () + " stderr " + result .stderr ());
234
237
Thread .sleep (2 * 1000 );
235
238
}
236
239
// one more time so that liveness probe restarts
@@ -241,6 +244,7 @@ public static void testWlsLivenessProbe(String domainUid, String serverName, Str
241
244
while (true ) {
242
245
long currentTime = System .currentTimeMillis ();
243
246
int finalRestartCnt = getPodRestartCount (podName , namespace );
247
+ logger .info ("initialRestartCnt " + initialRestartCnt + " finalRestartCnt " + finalRestartCnt );
244
248
if ((finalRestartCnt - initialRestartCnt ) == 1 ) {
245
249
logger .info ("WLS liveness probe test is successful." );
246
250
break ;
@@ -301,6 +305,8 @@ public static ExecResult kubectlexecNoCheck(String podName, String namespace, St
301
305
.append (" " )
302
306
.append (scriptPath );
303
307
308
+ ExecResult result = ExecCommand .exec ("kubectl get pods -n " + namespace );
309
+ logger .info ("get pods before killing the server " + result .stdout () + "\n " + result .stderr ());
304
310
logger .info ("Command to call kubectl sh file " + cmdKubectlSh );
305
311
return ExecCommand .exec (cmdKubectlSh .toString ());
306
312
}
@@ -526,11 +532,11 @@ public static void renewK8sClusterLease(String projectRoot, String leaseId) thro
526
532
+ " to try renew the lease. "
527
533
+ "Some of the potential reasons for this failure are that another run"
528
534
+ "may have obtained the lease, the lease may have been externally "
529
- + "deleted, or the caller of run.sh may have forgotten to obtain the"
530
- + "lease before calling run.sh (using 'lease.sh -o \" $LEASE_ID\" '). "
535
+ + "deleted, or the caller of the test may have forgotten to obtain the "
536
+ + "lease before calling the test (using 'lease.sh -o \" $LEASE_ID\" '). "
531
537
+ "To force delete a lease no matter who owns the lease,"
532
538
+ "call 'lease.sh -f' or 'kubernetes delete cm acceptance-test-lease'"
533
- + "(this should only be done when sure there's no current run.sh "
539
+ + "(this should only be done when sure there's no current java tests "
534
540
+ "that owns the lease). To view the current lease holder,"
535
541
+ "use 'lease.sh -s'. To disable this lease check, do not set"
536
542
+ "the LEASE_ID environment variable." );
0 commit comments