hashicorp / hashicorp/nomad

Nomad docker driver fails with failed to create container: API error (422): (Validation) Invalid binds on ubuntu 18.04

Open
#8,197 7 comments 0 reactions 0 assignees View on GitHub
stage/needs-investigation theme/driver/docker type/bug
Dominant language
Go
Stars
17k
Forks
2.1k
Avg merge
1d 9h
Merged PRs (30d)
105

Description

Hi i am trying to run a nomad job using docker driver on

- ubuntu 18.04
uname -a
Linux nomad-agent-dev-1 4.15.0-54-generic #58-Ubuntu SMP Mon Jun 24 10:55:24 UTC 2019
x86_64 x86_64 x86_64 GNU/Linux
- Docker version 19.03.11, build 42e35e61f3
- nomad v0.11.3
- Job file :The one mentioned unser nomad docs **https://github.com/hashicorp/demo-nomad-101/blob/master/lab-2/http-echo.nomad**
- Please note that i am using nomad job spec as it is and not mounting any volumes etc
- I tried running docker container by mounting /opt/nomad/data/alloc/d306d1a9-205e-0818-acd5-fa688ec1028a/alloc:/alloc manually (wit out nomad) and it is running fine
- Please note that i ave docker installed only on Nomad agents (I dont see a reason to install it on a nomad servers )

_Error message as below_

, ask=server error="failed to create container: API error (422): (Validation) Invalid binds: /opt/nomad/data/alloc/d306d1a9-205e-0818-acd5-fa688ec1028a/alloc:/alloc: /opt/nomad/data/alloc/d306d1a9-205e-0818-acd5-fa688ec1028a/alloc is not a valid volume name,/opt/nomad/data/alloc/d306d1a9-205e-0818-acd5-fa688ec1028a/server/local:/local: /opt/nomad/data/alloc/d306d1a9-205e-0818-acd5-fa688ec1028a/server/local is not a valid volume name,/opt/nomad/data/alloc/d306d1a9-205e-0818-acd5-fa688ec1028a/server/secrets:/secrets: /opt/nomad/data/alloc/d306d1a9-205e-0818-acd5-fa688ec1028a/server/secrets is not a valid volume name (f9988865-08fe-4131-8e0a-7a3363960f0f)"

**Driver status shows all healthy**
![image](https://user-images.githubusercontent.com/5926614/84997408-2d21de00-b16c-11ea-8959-252a08e4052e.png)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with demo-nomad-101/lab-2/http-echo.nomad and reproduce the Docker driver failure using the listed Ubuntu, Docker, and Nomad versions. Compare the driver’s generated bind mounts with the manually working mount, and consider the issue resolved when the job starts without the invalid-binds error or the cause is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker
Domain
infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.