Server panic caused by missing --- in .drone.yml

When I implemented a new pipeline I forgot to include the separator --- in front. It caused an undesirable server panic that took my server down.

.drone.yml:

<another pipeline>

kind: pipeline
type: docker
name: User's testing pipeline

platform:
  os: linux
  arch: amd64

steps:
  - name: Build and test
    image: alpine:latest
    commands:
      - touch userfile
      - echo "User is here" >> userfile
      - pwd
      - ls -la
      - cat userfile
  - name: verify changes
    image: alpine:latest
    commands:
      - pwd
      - ls -la
      - cat userfile

trigger:
  branch: 
   - feature
  event:
   - push

All my server cores (12 in total) were at maximum utilization and caused my development server to be crash.

Drone log:

time="2021-11-23T05:46:55Z" level=debug msg="stage received" stage.id=59 stage.name="User's testing pipeline" stage.number=1 thread=3
time="2021-11-23T05:46:55Z" level=debug msg="stage accepted" stage.id=59 stage.name="User's testing pipeline" stage.number=1 thread=3
time="2021-11-23T05:46:55Z" level=debug msg="stage details fetched" build.id=59 build.number=59 repo.id=3 repo.name=my-drone repo.namespace=namespace_user stage.id=59 stage.name="User's testing pipeline" stage.number=1 thread=3
time="2021-11-23T05:46:55Z" level=debug msg="updated stage to running" build.id=59 build.number=59 repo.id=3 repo.name=my-drone repo.namespace=namespace_user stage.id=59 stage.name="User's testing pipeline" stage.number=1 thread=3
time="2021-11-23T05:47:04Z" level=debug msg="received exit code 0" build.id=59 build.number=59 repo.id=3 repo.name=my-drone repo.namespace=namespace_user stage.id=59 stage.name="User's testing pipeline" stage.number=1 step.name=clone thread=3
time="2021-11-23T06:34:38Z" level=debug msg="FIXME: Got an status-code for which error does not match any expected type!!!: -1" module=api status_code=-1
time="2021-11-23T06:34:50Z" level=debug msg="destroying the pipeline environment" build.id=59 build.number=59 repo.id=3 repo.name=my-drone repo.namespace=namespace_user stage.id=59 stage.name="User's testing pipeline" stage.number=1 thread=3
time="2021-11-23T05:47:04Z" level=debug msg="received exit code 0" build.id=59 build.number=59 repo.id=3 repo.name=my-drone repo.namespace=namespace_user stage.id=59 stage.name="User's testing pipeline" stage.number=1 step.name=clone thread=3
time="2021-11-23T06:34:38Z" level=debug msg="FIXME: Got an status-code for which error does not match any expected type!!!: -1" module=api status_code=-1
time="2021-11-23T05:47:04Z" level=debug msg="received exit code 0" build.id=59 build.number=59 repo.id=3 repo.name=my-drone repo.namespace=namespace_user stage.id=59 stage.name="User's testing pipeline" stage.number=1 step.name=clone thread=3
<the freeze>
time="2021-11-23T06:34:38Z" level=debug msg="FIXME: Got an status-code for which error does not match any expected type!!!: -1" module=api status_code=-1

Ideally, when I put the --- separator before every kind: pipeline it works. Example below:
.drone.yml:

<another pipeline>

---
kind: pipeline
type: docker
name: User's testing pipeline
(redacted)

May I know what the separator --- serves in .drone.yml and to understand if this issue is a bug / part of the implementation. Thanks

Hey @habros

What version of drone server are you using?

Cheers,
Eoin

Drone: v2
Drone Runner: v1.

Hope it helps, thanks

@habros - can you try using Release Release v2.5.0 · harness/drone · GitHub, please?

Thanks @eoinmcafee00! Will go try out soon.

However, we are more concerned on the complication to Drone when running the pipeline that would cause if we accidentally omit --- out from the.drone.yml script.

As in v2.0.0 this accidental mistake brought the entire docker server down, and we are doing an analysis on this matter.

@habros - sorry I didn’t fully read the question.

Please read why --- (3 dashes/hyphen) in yaml file? - Stack Overflow, basically it allows multiple different pipelines to be declared in the same yaml file. The .drone.yml file would be invalid without them.

2 Likes

@eoinmcafee00 Yes that answers the question. Thanks for your response earlier and we’ve tried an in-place upgrade to the following version in the dev docker-compose stack

drone/drone:2.5.0 and drone/drone-runner-docker:1.8.0

In the meantime, we will continue monitoring this issue. Appreciate your help.