Concourse custom resource type failing in check step

587 views Asked by At

I'm following below github repo for building a new concourse custom resource type in python.
https://github.com/apjansing/mongo_resource

But it is failing with below error in the resource check in concourse pipeline

run check step: check: Backend error: Exit status: 500,
  message: {
    "Type":"",
    "Message":"runc exec: exit status 1: exec failed: container_linux.go:380:
      starting container process caused: no such file or directory",
    "Handle":"",
    "ProcessID":"",
    "Binary":""
  }

My check file content is

#!/usr/local/bin/python
import json

if __name__ == "__main__":
  print(json.dumps([{"version": "1.0.0" }]))
2

There are 2 answers

0
Manoj kumar On BEST ANSWER

When saving the file from windows, the formatting was different hence the check file was not identified by the concourse resource running in Linux environment.

dos2unix utility can be used to convert the formatting of the file, it resolved my issue.

More details: https://futurestud.io/tutorials/how-to-fix-exec-user-process-caused-no-such-file-or-directory-in-docker

1
marco.m On

I think this is simply telling you that it could not find the check script. It must be at /opt/resource/check and be executable.

See https://concourse-ci.org/implementing-resource-types.html for the official documentation; I keep it handy each time I am writing a Concourse resource.