Skip to content

USABILITY: Make a missing task image/image_resource have a better error message #2726

Closed

Description

@jghiloni

Bug Report

When creating a task whose image or image_resource has been omitted, the error message is not useful:

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

This is hard to determine whether or not the error is a missing an image or the task definition itself is missing.

Steps to Reproduce

  1. Create a task in a pipeline whose image_resource or image field is missing
  2. ???
  3. Profit!

Expected Results

  1. A useful error message that no image was available

Actual Results

  1. A not useful error message that file was not found

Version Info

  • Concourse version: 4.2.1
  • Deployment type (BOSH/Docker/binary): BOSH
  • Infrastructure/IaaS: vSphere
  • Browser (if applicable):
  • Did this used to work? Probably not ¯\(ツ)/¯?

Activity

  1. edtan commented on May 13, 2019

    @edtan
    Contributor

    On v5.1.0, it now says "no image plugin configured" with this sample pipeline:

    jobs:
    - name: test
      plan:
      - task: missing-image
        config:
          platform: linux
          run:
            path: sh
            args:
              - -exc
              - |
                ls
    
  2. vito commented on May 14, 2019

    @vito
    Contributor

    The error bubbles up from the Garden backend. Doing anything more here is kind of tricky. On Windows and Darwin there is no valid image or image_resource to set, so it's up to the backend to handle it. In these two cases there is no notion of an image or rootfs so they just run your task in an ephemeral directory. The Linux backend we use (Garden-runC) is equipped to also handle this by using a default rootfs, if configured, however we don't have such a thing configured in the binary distribution and don't even have an image plugin configured. Hence the error.

    So, we can't detect based on image/image_resource being absent, as that may be correct based on their configuration and based on the Garden backend's configuration, as even Garden-runC may have been configured with an image plugin and such.

    Maybe the best thing to do would be to just capture the above error and emit a more descriptive message? With that approach we should probably have an integration test, just to cover for the error message changing out from under us, since it comes from Garden-runC internals.

  3. edtan commented on May 15, 2019

    @edtan
    Contributor

    Perhaps we can check this at the client side in fly first when they create the pipeline?

  4. taylorsilva commented on Jun 30, 2026

    @taylorsilva
    Member

    Closed by #9563

    We now error:

    find or create container on worker ef4baa24f892: new container: garden spec to oci spec: rootfs must not be empty
    No image specified for task? Make sure to specify "image" on your task step or "image_resource" in your task config. The image must be in rootfs format.
    
    Image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions