ow2-proactive / scriptengine-docker-compose

Execute a docker compose script; invoke the local docker compose client.
Apache License 2.0
0 stars 5 forks source link

Unexpected output when running docker compose Task #22

Open lpellegr opened 7 years ago

lpellegr commented 7 years ago

Using the default Docker Compose Task script (available from the Studio) leads to unexpected output. Let's say that the following script is used:

helloworld:
    image: busybox
    command: echo "Hello World!"

then, below is the output that is displayed from the Scheduler portal:

[2t0@192.168.1.51;09:43:57] 2016-12-12 09:43:57.0896 WARN main jsr223.docker.compose.bindings.MapBindingsAdder - Ignored binding: nodesurl(java.lang.String):[](java.util.ArrayList) 
[2t0@192.168.1.51;09:43:57] 2016-12-12 09:43:57.0898 WARN main jsr223.docker.compose.bindings.MapBindingsAdder - Ignored binding: globalspaceapi(java.lang.String):org.ow2.proactive.scheduler.task.client.DataSpaceNodeClient@55a561cf(org.ow2.proactive.scheduler.task.client.DataSpaceNodeClient) 
[2t0@192.168.1.51;09:43:57] 2016-12-12 09:43:57.0898 WARN main jsr223.docker.compose.bindings.MapBindingsAdder - Ignored binding: forkEnvironment(java.lang.String):null(null) 
[2t0@192.168.1.51;09:43:57] 2016-12-12 09:43:57.0898 WARN main jsr223.docker.compose.bindings.MapBindingsAdder - Ignored binding: schedulerapi(java.lang.String):org.ow2.proactive.scheduler.task.client.SchedulerNodeClient@3b938003(org.ow2.proactive.scheduler.task.client.SchedulerNodeClient) 
[2t0@192.168.1.51;09:43:57] 2016-12-12 09:43:57.0898 WARN main jsr223.docker.compose.bindings.MapBindingsAdder - Ignored binding: args(java.lang.String):[Ljava.lang.String;@6f3b5d16([Ljava.lang.String;) 
[2t0@192.168.1.51;09:43:57] 2016-12-12 09:43:57.0899 WARN main jsr223.docker.compose.bindings.MapBindingsAdder - Ignored binding: userspaceapi(java.lang.String):org.ow2.proactive.scheduler.task.client.DataSpaceNodeClient@78b1cc93(org.ow2.proactive.scheduler.task.client.DataSpaceNodeClient) 
[2t0@192.168.1.51;09:43:57] 2016-12-12 09:43:57.0909 WARN main jsr223.docker.compose.bindings.MapBindingsAdder - Ignored binding: results(java.lang.String):[Lorg.ow2.proactive.scheduler.common.task.TaskResult;@78047b92([Lorg.ow2.proactive.scheduler.common.task.TaskResult;) 
[2t0@192.168.1.51;09:43:57] 2016-12-12 09:43:57.0918 ERROR Thread-8 processbuilder.utils.ProcessBuilderUtilities - Input stream pipe broke: java.io.IOException: closed 
[2t0@192.168.1.51;09:43:58] Creating 931061555_helloworld_1 
[2t0@192.168.1.51;09:43:58] Attaching to 931061555_helloworld_1 
[2t0@192.168.1.51;09:43:58] helloworld_1 | Hello World!
[2t0@192.168.1.51;09:43:59] 931061555_helloworld_1 exited with code 0 
[2t0@192.168.1.51;09:43:59] 

The execution seems to work but an error and some warnings are displayed along with some prefixes for the output from the container itself. This raises many questions.

The issue was noticed with PWS 7.19.1 and Docker engine in version 1.12.3.

Same behaviour was experienced by using another base image (e.g. ubuntu).

tobwiens commented 7 years ago

It was designed that way to display the containers output. Because the container output is the application output.

Formatting is confusing.

Maybe the container exits and the output is stopped, so the pipe is closed: [2t0@192.168.1.51;09:43:57] 2016-12-12 09:43:57.0918 ERROR Thread-8 processbuilder.utils.ProcessBuilderUtilities - Input stream pipe broke: java.io.IOException: closed

The container output is forwarded through pulling code so a delay in the timestamps might be possible

lpellegr commented 7 years ago

Tobias, you mean that the error and warnings are normal?

If it is normal, what does it bring to a user to see such an error? same for warnings?

About the output, [36m are non-printing escape sequences. Looks weird to see them in the output.

tobwiens commented 7 years ago

The warnings are wanted since it is my master thesis work I needed to stop somewhere and I made shortcomings verbose. So one doesn't use the script engine believing it's all done.

The error is not normal, and I wanted to provide an idea where it could come from.

The output can be improved. You can look at the docker-compose output and see how one needs to filter it to make it nicely fitting our output.