Skip to content

Existence of host-volumes isn't verified #2070

@eliasp

Description

@eliasp

When running something like

docker run -v /tmp/www:/www lopter/raring-base echo hello

it isn't verified whether /tmp/www actually exists which causes lxc-start to fail:

lxc-start: No such file or directory - failed to mount '/tmp/www' on '/usr/lib/x86_64-linux-gnu/lxc///www'
lxc-start: failed to setup the mount entries for 'be0346002e17cf21a193e7afc40fb6442997fc1de406d6cff45038f843a067e9'
lxc-start: failed to setup the container
lxc-start: invalid sequence number 1. expected 2
lxc-start: failed to spawn 'be0346002e17cf21a193e7afc40fb6442997fc1de406d6cff45038f843a067e9'

Docker should verify the existence of the volume source on the host's filesystem beforehand and handle this case more gracefully, e.g. returning an error message like:

The source directory '/tmp/www' for the volume '/www' does not exist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions