Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid mount config for type "bind" #2725

Closed
bradrydzewski opened this issue Jun 10, 2019 · 5 comments
Closed

invalid mount config for type "bind" #2725

bradrydzewski opened this issue Jun 10, 2019 · 5 comments
Labels
Milestone

Comments

@bradrydzewski
Copy link

Fix issues where bind mount fails if path does not exist on the host machine. This is related to how drone-runtime changed how it configured docker volumes when invoking the Docker API.

@bradrydzewski bradrydzewski added this to the v.1.3.0 milestone Jun 10, 2019
@matthewhartstonge
Copy link

matthewhartstonge commented Jun 20, 2019

Oh nice! 👍 wondered if it was something to do between drone/docker/moby, just didn't have time to investigate it...

For others, this was our quick workaround in the meantime:

volumes:
  - name: tmp
    host:
      path: /tmp
  - name: cache
    host:
      path: /tmp/cache_${DRONE_COMMIT_BRANCH}/vendor

steps:
  - name: prime-cache-folder
    image: alpine:latest
    commands:
      - mkdir -p /lib/var/tmp/cache_${DRONE_COMMIT_BRANCH}/vendor
    volumes:
      - name: tmp
        path: /lib/var/tmp

- name: cache-dep-restore
    image: drillster/drone-volume-cache
    settings:
      restore: true
      mount:
        - /drone/src/github.com/drone/drone/vendor
    volumes:
      - name: cache
        path: /cache

...

@bradrydzewski
Copy link
Author

bradrydzewski commented Jul 30, 2019

this is fixed right now in v1.2.2 and in master but you need to use a feature flag to enable. This should be passed to the agent (or the server in single-server mode)

DRONE_FEATURE_VOLUME_SET=true

volumes are tricky because there are 4 different types (tempfs, bind mount, data volume and npipe) and the logic to decide which-is-which is confusing and the code is more awkward than I would like. We placed this fix behind a feature flag to reduce the risk of a regression. We will remove the feature flag in 1.3.0 once I have confirmation that it is working as expected for people.

@moritzheiber
Copy link

Setting the feature flag solved the issue for me on 1.2.3 while using named volumes 👍

@bradrydzewski
Copy link
Author

removed feature flag and merged into master, available in :latest and will be available in 1.3 which should be tagged today or tomorrow.

@sever-sever
Copy link

How to use it with the gitness ?
I can't figure it out for several days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants