Endless builds with all the stages finished

Hi guys, we are running drone 2.4.0 with runners docker v1 and kubernetes 1.0.0-rc1.

We are facing an issues where builds get stuck on running state whereas all the stages and steps are finished successfully.

Server and k8s runner are running on a on-prem k8s cluster over 1.19.9.

Behavior:

Build start and get stuck on running state while everything is done on the pipeline. Agent pod is finished successfully but no update on the build.

Screen Shot 2021-10-13 at 15.39.54

Agent pod: drone-4zrebpjkg0272oxep1sy

Runner logs: endless build issue - Pastebin.com

1 Like

While debugging this issue i found something a bit weird.

These logs comes from the server:

 manager: updating step status                 step.id=246946 step.name="build and test" step.status=error
drone-554dc85f57-v2hcl server DEBU[413830]                                               fields.time="2021-10-19T08:49:31Z" latency=14.369805076s method=GET remote="10.200.60.248:44014" request=/api/stream/CCC/colt-ordering/225/1/2 request-id=1ziaRzxsY3m0WFN43IRI8Uzf2xp
drone-554dc85f57-v2hcl server DEBU[413830] manager: stage is complete. teardown          stage.id=42891
drone-554dc85f57-v2hcl server DEBU[413830] manager: build pending completion of additional stages  build.id=39061 build.number=225 repo.id=30886 stage.id=42891

But looking at the build, there are no additional stages.
Screen Shot 2021-10-19 at 10.52.09

iā€™m able of reproduce it and the behavior is the same as described above.

drone-554dc85f57-v2hcl server DEBU[493980] manager: updating step status                 step.id=248455 step.name=zabbix step.status=success
drone-554dc85f57-v2hcl server DEBU[493980] manager: updating step status                 step.id=248456 step.name="Notify Build" step.status=skipped
drone-554dc85f57-v2hcl server WARN[493980] manager: cannot teardown log stream           error="stream: not found" step.id=248456 step.name="Notify Build" step.status=skipped
drone-554dc85f57-v2hcl server DEBU[493980] manager: stage is complete. teardown          stage.id=43138
drone-554dc85f57-v2hcl server DEBU[493980] manager: build pending completion of additional stages  build.id=39256 build.number=8612 repo.id=224 stage.id=43138

Screen Shot 2021-10-20 at 09.06.12

The build remains as running because the stage is not properly teardown.