0

I am using Spring Cloud Dataflow Server 2.9.6 to run a composed task on Kubernetes. The individual tasks run fine and terminate. The composed task runner, however does not terminate. The pod stays alive.

I noticed, that for a similar task, that is launched via task launcher stream application, the compound task runner terminates as expected when I pass the command line argument --spring.cloud.task.closecontextEnabled=true in the task launch request.

I did not manage to set that variable from the UI when manually launching a composed task.

In the docs, there is a separate section for Ctr Properties, see here: https://dataflow.spring.io/docs/2.9.x/feature-guides/batch/composed-task/#launch-the-composed-task-definition There is a composed-task-app-properties to set in the doc's screen shot. But for me, this section is not showing when launching the composed task.

Is there a way for setting the composed task runner arguments from the UI? Or is there a way to set this automatically? For me, it does not make sense to keep the CTR process alive by default. What's the reason for this?

Jochen Reinhardt
  • 833
  • 5
  • 14
  • In https://github.com/spring-attic/spring-cloud-task-app-starters-composed-task-runner/issues/60 the dev states: "As of the release of CTR 2.1 the closeContextEnabled will be set by default." I cannot confirm this... – Jochen Reinhardt Feb 10 '23 at 15:45
  • I would suggest looking at the logs for the specific ctr pod to see if it provides any indication of what may be happening. What is the state in UI of the specific ctr task? – Corneil du Plessis Feb 19 '23 at 13:00
  • Nothing special in the logs. Looks like regular operation in the CTR, the started pods for the the tasks terminate, the CTR pod stays alive after reporting successful completion. It does not seem to anything, not even attempts to shut down. Shut down only works when I manage to pass spring.cloud.task.closecontextEnabled=true to the CTR. – Jochen Reinhardt Feb 22 '23 at 12:02
  • I managed to set it using the task-laucher / task launch request in a stream application. And by setting an environment variable in my SCDF server deployment: SPRING_CLOUD_DATAFLOW_APPLICATIONPROPERTIES_TASK_SPRING_CLOUD_TASK_CLOSECONTEXTENABLED=true. I did that with my helm deployment in server.extraEnvVars. That did the trick. Anyways, it should be default for CTR to automatically terminate without having to set hidden properties in the configuration or during launch. Is this a bug? – Jochen Reinhardt Feb 22 '23 at 12:07
  • Hello. Not its not a bug if you are using splits in the task definition. More can be read about it here: https://dataflow.spring.io/docs/feature-guides/batch/composed-task/#arguments-and-properties. I do agree that that property should be shown. So we created the following issue: https://github.com/spring-cloud/spring-cloud-dataflow/issues/5229 – Glenn Renfro Feb 24 '23 at 16:56

0 Answers0