Concourse v8 not respecting the "dir" property within a task
search cancel

Concourse v8 not respecting the "dir" property within a task

book

Article ID: 448215

calendar_today

Updated On:

Products

Concourse for VMware Tanzu

Issue/Introduction

When using Concourse v8, you may observe that the "dir" property is not working as expected within a concourse task. For example, with a job like so:

jobs:
- name: pwd-demo-job
  plan:
  - get: pcf-image
    params:
      unpack: true
  - get: pcf-repo
  - task: create-and-pwd
    image: pcf-image
    config:
      inputs:
      - name: pcf-repo
      platform: linux
      run:
        dir: pcf-repo
        path: pwd


In Concourse v7, the output would be like so:

/tmp/build/34da35b2/pcf-repo

 

However, in Concourse v8 it shows:

/

 

Environment

Concourse v8

Cause

This is caused by running the guardian container runtime in Concourse v8. Starting in Concourse v8.0, the default runtime was changed to containerd. 

You can validate what runtime you are using by SSH-ing to the Concourse worker VM, and running ps aux | grep -E "gdn|containerd".

Resolution

If you are using Concourse v8 and the guardian runtime, you must be forcing it to do so in your concourse operations file:

https://bosh.io/jobs/worker?source=github.com/concourse/concourse-bosh-release&version=8.2.3#p%3druntime

Either remove the operations file, or update it like so to ensure it uses containerd:

- type: replace
  path: /instance_groups/name=worker/jobs/name=worker/properties?/runtime?
  value: containerd