The same job on two agents at once when "Run one instance" is on?

19 views
Skip to first unread message

Yuri Lukyanov

unread,
Mar 11, 2020, 7:07:47 AM3/11/20
to go-cd
Hello,


I'm experiencing strange behavior with GoCD agents.

My set up is the following:
GoCD version: 20.1.0
Static agents as Docker images (based on gocd/gocd-agent-ubuntu-16.04:v20.1.0).
All the docker containers are on the same machine (there are 4 of them).
All jobs have "Run one instance" on. 

I'm attaching a screenshot that I can not explain.
This is the log of a single run of a job in a pipeline.

My understanding was that a job can be assigned to a single agent during its execution. It can fail or succeed, but a single job is assigned to a single agent at a time (for a single pipeline run).
And that the "Console" tab of the job shows the log messages of that run on the agent.

In the screenshot, there are log messages (in the same console) saying that the same job started twice on different agents.
Could you explain how this can be possible at all?

I thought I understand GoCD :)
Screenshot 2020-03-11 at 14.47.11.png

Aravind SV

unread,
Mar 11, 2020, 6:09:44 PM3/11/20
to go...@googlegroups.com
Hello,

I'd expand that task in the middle and see if it was cancelled. It looks like a rescheduled job, because the agent went missing of the job took too much time. Hard to say just from the screenshot.

Cheers,
Aravind

Yuri Lukyanov

unread,
Mar 12, 2020, 2:46:00 PM3/12/20
to go-cd
The task is not cancelled.

Just got another case (raw log this time):

(beginning of the log)

##|12:10:19.782 [go] Job Started: 2020-03-12 12:10:19 UTC
##|12:10:19.782 
pr|12:10:19.782 [go] Start to prepare tp-core-master-build/45-6e4ce/build/1/test on unknown-host-158 [/go]
pr|12:10:19.791 [go] Start to update materials.
pr|12:10:19.791 
pr|12:10:19.791 [go] Start updating files at revision 6e4ceac42321c0e964f6b7e9968c5e799fa3b5a6 from g...@github.com:Teamweek/core.git
pr|12:10:19.914 [GIT] Fetching changes

&1|12:16:24.694 ==> tp_billing_http_api
&1|12:16:24.694 Compiling 20 files (.ex)
&1|12:16:26.051 Generated tp_billing_http_api app
&1|12:16:29.523 The database for TPBase.Repo has been created
##|12:16:30.055 [go] Job Started: 2020-03-12 12:16:30 UTC
##|12:16:30.055 
pr|12:16:30.055 [go] Start to prepare tp-core-master-build/45-6e4ce/build/1/test on unknown-host-406 [/go]
pr|12:16:30.064 [go] Start to update materials.
pr|12:16:30.064 
pr|12:16:30.064 [go] Start updating files at revision 6e4ceac42321c0e964f6b7e9968c5e799fa3b5a6 from g...@github.com:Teamweek/core.git
pr|12:16:30.280 [GIT] Fetching changes

?0|12:21:10.814 [go] Task status: passed (1228 ms)
j1|12:21:10.826 [go] Current job status: failed
##|12:21:10.832 [go] Start to create properties tp-core-master-build/45-6e4ce/build/1/test on unknown-host-406 [/go]
ar|12:21:10.832 [go] Start to upload tp-core-master-build/45-6e4ce/build/1/test on unknown-host-406 [/go]
ex|12:21:10.832 [go] Job completed tp-core-master-build/45-6e4ce/build/1/test on unknown-host-406 [/go]

(end of the log)


So it just looks like the second run started in the middle of the first one. The first one didn’t even finish or cancel.

Looks like if the log file is shared between different agents (which is not clearly the case) but even this would not explain everything: the job number is the same: 45-6e4ce/build/1/test.


Really blows my mind :)

Yuri Lukyanov

unread,
Mar 13, 2020, 1:32:25 PM3/13/20
to go...@googlegroups.com
So it just looks like the second run started in the middle of the first one. The first one didn’t even finished or cancelled.

Looks like if the log file is shared between different agents (which is not clearly the case) but even this would not explain everything: the job number is the same: 45-6e4ce/build/1/test.


Really blows my mind :)


-- 
You received this message because you are subscribed to the Google Groups "go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/go-cd/20200311220938.puwvkzajhdgusljg%40arvindsv.com.

Reply all
Reply to author
Forward
0 new messages