@@ -278,6 +278,8 @@ public static Map<String, String> verifyLoggingExporterReady(String opNamespace,
278
278
execLoggingExpStatusCheck (opNamespace , esNamespace , labelSelector , "*" + index + "*" );
279
279
assertNotNull (statusLine );
280
280
281
+ logger .info ("=== statusLine return by execLoggingExpStatusCheck: {0}!" , statusLine );
282
+
281
283
String [] parseString = statusLine .split ("\\ s+" );
282
284
assertTrue (parseString .length >= 3 , index + " does not exist!" );
283
285
String healthStatus = parseString [0 ];
@@ -469,27 +471,33 @@ private static V1Service createKibanaServiceCr(LoggingExporterParams params) {
469
471
private static String execLoggingExpStatusCheck (String opNamespace , String esNamespace ,
470
472
String labelSelector , String indexRegex ) {
471
473
String elasticSearchHost = "elasticsearch." + esNamespace + ".svc.cluster.local" ;
474
+ logger .info ("=== elasticSearchHost in execLoggingExpStatusCheck: {0}" , elasticSearchHost );
472
475
StringBuffer k8sExecCmdPrefixBuff = new StringBuffer ("curl http://" );
473
476
String cmd = k8sExecCmdPrefixBuff
474
477
.append (elasticSearchHost )
475
478
.append (":" )
476
479
.append (ELASTICSEARCH_HTTP_PORT )
477
480
.append ("/_cat/indices/" )
478
481
.append (indexRegex ).toString ();
479
- logger .info ("Command to get logging exporter status line {0}" , cmd );
482
+ logger .info ("=== Command to get logging exporter status line {0}" , cmd );
480
483
481
484
// get Operator pod name
482
485
String operatorPodName = assertDoesNotThrow (() -> getOperatorPodName (OPERATOR_RELEASE_NAME , opNamespace ));
483
486
assertTrue (operatorPodName != null && !operatorPodName .isEmpty (), "Failed to get Operator pad name" );
487
+ logger .info ("=== operatorPodName in execLoggingExpStatusCheck: {0}" , operatorPodName );
484
488
485
489
int i = 0 ;
486
490
ExecResult statusLine = null ;
487
491
while (i < maxIterationsPod ) {
492
+ logger .info ("=== cmd to exec execLoggingExpStatusCheck: opNamespace: {0}, operatorPodName: {1}, cmd {2} {3}" ,
493
+ opNamespace , operatorPodName , "/bin/sh -c " , cmd );
488
494
statusLine = assertDoesNotThrow (() -> execCommand (opNamespace , operatorPodName , null , true ,
489
495
"/bin/sh" , "-c" , cmd ));
490
496
assertNotNull (statusLine , "curl command returns null" );
491
497
492
- logger .info ("Status {0} for index {1} " , statusLine .stdout (), indexRegex );
498
+ logger .info ("Status.stdout(): ###{0}### for index ***{1}***" , statusLine .stdout (), indexRegex );
499
+ logger .info ("Status.stderr(): ###{0}### for index ***{1}***" , statusLine .stderr (), indexRegex );
500
+ logger .info ("Status.toString(): ###{0}### for index ***{1}***" , statusLine .toString (), indexRegex );
493
501
if (null != statusLine .stdout () && !statusLine .stdout ().isEmpty ()) {
494
502
break ;
495
503
}
0 commit comments