Uploaded image for project: 'Red Hat Process Automation Manager'
  1. Red Hat Process Automation Manager
  2. RHPAM-4519

Set KubernetesClientException in Kie Server's OpenShift Startup Strategy to warning


    • 2022 Week 41-43 (from Oct 10), 2022 Week 44-46 (from Oct 31)

      In RHPAM-3333 was provided fixed for failing fabric8 watcher in Kie Server. Right now the Kie Server can restart the wathcer if there is any kubernetes exception.

      In the code is left the catch method with error log to print the exception. As Kie Server does not ends in error state right now, we should provide the correct log output. Also for user is not needed to display the whole exception stacktrace, if they are not using the debug log.

      Example of log:

      31m01:24:42,180 ERROR [org.kie.server.services.openshift.impl.OpenShiftStartupStrategy] (Thread-200) WatchRunner thread failed: io.fabric8.kubernetes.client.KubernetesClientException: An error has occurred.
      	at deployment.ROOT.war//io.fabric8.kubernetes.client.KubernetesClientException.launderThrowable(KubernetesClientException.java:64)
      	at deployment.ROOT.war//io.fabric8.kubernetes.client.KubernetesClientException.launderThrowable(KubernetesClientException.java:53)
      	at deployment.ROOT.war//io.fabric8.kubernetes.client.dsl.internal.WatchConnectionManager.close(WatchConnectionManager.java:357)
      	at deployment.ROOT.war//org.kie.server.services.openshift.impl.OpenShiftStartupStrategy$WatchRunner.run(OpenShiftStartupStrategy.java:127)
      	at java.base/java.lang.Thread.run(Thread.java:829)
      Caused by: java.lang.InterruptedException
      	at java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2109)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.awaitTermination(ThreadPoolExecutor.java:1454)
      	at java.base/java.util.concurrent.Executors$DelegatedExecutorService.awaitTermination(Executors.java:709)
      	at deployment.ROOT.war//io.fabric8.kubernetes.client.dsl.internal.WatchConnectionManager.close(WatchConnectionManager.java:352)
      	... 2 more

      Expected outcome of this jira:

      • Log level for KubernetesClientException in OpenShiftStartupStrategy.java is change to warning, stacktrace of original exception is not printed and there should be added message for users to enable debug mode to search for more details.
      • A new debug level log is added with more details about this failure.

            rhn-support-fspolti Filippe Spolti
            jakubschwan Jakub Schwan
            Jakub Schwan Jakub Schwan
            Jakub Schwan Jakub Schwan
            0 Vote for this issue
            2 Start watching this issue