[jbosstools-issues] [JBoss JIRA] (JBIDE-24868) Server adapter: Switch off livenessProbe.periodSecond property during debug session

Roland Huß (JIRA) issues at jboss.org
Wed Aug 23 02:15:00 EDT 2017


    [ https://issues.jboss.org/browse/JBIDE-24868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13452830#comment-13452830 ] 

Roland Huß commented on JBIDE-24868:
------------------------------------

Actually, if there is no livenessCheck is defined, then you are safe. It's only when its defined, then the check might kill you debug session if the period between checks is too short. In order to avoid this, one should (temporarily) disable this check in a Pod resource definition. Not sure whether changing this value via the OpenShift API causes a redeployment or not (but I hope if done directly on the Pod resource this would not). Another alternative is to debug in a mode where not the whole VM is suspended but only a single thread. This is probably much easier to achieve.

For debugging HTTP requests, it's the timeout value in the router which is responsible for killing a debug session (30s by default). However, I have no idea how and whether this value can be changed at all via an API call. Changing this value would be the best option.

The alternative would be to go to the service not via the route but directly. This could be performed in two ways:

* Either go to a Service directly. Therefore the service must be exported via a nodePort, which is a (random) port directly on all nodes. This is only usable in a controlled environment, e.g. minishift. For this to work, one would need to dynamically adapt the Service resource to export a nodePort and the query the API to get the value of the chosen random port.

* Use a port-forward directly to the Pod. This can be achieved via "oc port-forward ..." where again a port on the local host itself is proxied to a specific port on the Pod. One would need to know which port(s) to forward. The advantage here is, that no OpenShift resources need to be changed. 

In both cases, one would need to instruct the user to use a different than the route URL in their browsers when debugging.

> Server adapter: Switch off livenessProbe.periodSecond property during debug session
> -----------------------------------------------------------------------------------
>
>                 Key: JBIDE-24868
>                 URL: https://issues.jboss.org/browse/JBIDE-24868
>             Project: Tools (JBoss Tools)
>          Issue Type: Enhancement
>          Components: openshift
>            Reporter: Aurélien Pupier
>            Assignee: Andre Dietisheim
>            Priority: Critical
>              Labels: openshift_v3, server_adapter
>             Fix For: 4.5.x
>
>
> it will avoid to have "debug connections always killed after 30s staying in a breakpoint"
> see https://twitter.com/ro14nd/status/895886024387067904 for source of suggestion
> k8 documentations on the matter are here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)



More information about the jbosstools-issues mailing list