From 511eee3a2e96883fa9de38b245f1219e9d194f78 Mon Sep 17 00:00:00 2001 From: Muayyad Alsadi Date: Wed, 2 Nov 2016 12:18:48 +0200 Subject: [PATCH 1/2] fixes #17734, clear message for host volumes not starting with / Signed-off-by: Muayyad Alsadi Upstream-commit: a8180eeaedfb5161a0e8db8ddd464ac3f1eb5cfb Component: engine --- components/engine/volume/local/local.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/engine/volume/local/local.go b/components/engine/volume/local/local.go index e1dd923fda..704b717c53 100644 --- a/components/engine/volume/local/local.go +++ b/components/engine/volume/local/local.go @@ -268,7 +268,7 @@ func (r *Root) validateName(name string) error { return validationError{fmt.Errorf("volume name is too short, names should be at least two alphanumeric characters")} } if !volumeNameRegex.MatchString(name) { - return validationError{fmt.Errorf("%q includes invalid characters for a local volume name, only %q are allowed", name, utils.RestrictedNameChars)} + return validationError{fmt.Errorf("%q includes invalid characters for a local volume name, only %q are allowed. If you intented to pass host directory use absolute path starting with /", name, utils.RestrictedNameChars)} } return nil } From 3b746165af2d5c21c4e4fd29838fe67845db8559 Mon Sep 17 00:00:00 2001 From: Muayyad Alsadi Date: Mon, 14 Nov 2016 16:51:29 +0200 Subject: [PATCH 2/2] remove "starting with /" Signed-off-by: Muayyad Alsadi Upstream-commit: 2d3df91436a096e17214fc56aee4968c3fe598de Component: engine --- components/engine/volume/local/local.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/engine/volume/local/local.go b/components/engine/volume/local/local.go index 704b717c53..8008e2a559 100644 --- a/components/engine/volume/local/local.go +++ b/components/engine/volume/local/local.go @@ -268,7 +268,7 @@ func (r *Root) validateName(name string) error { return validationError{fmt.Errorf("volume name is too short, names should be at least two alphanumeric characters")} } if !volumeNameRegex.MatchString(name) { - return validationError{fmt.Errorf("%q includes invalid characters for a local volume name, only %q are allowed. If you intented to pass host directory use absolute path starting with /", name, utils.RestrictedNameChars)} + return validationError{fmt.Errorf("%q includes invalid characters for a local volume name, only %q are allowed. If you intented to pass a host directory, use absolute path.", name, utils.RestrictedNameChars)} } return nil }