From f24d3d3bd955ddc37b6706afaed8a3d2c69bb82a Mon Sep 17 00:00:00 2001
From: Helga Velroyen <helgav@google.com>
Date: Thu, 2 May 2013 11:04:50 +0200
Subject: [PATCH] Improve error message for file instance creation

Currently, when creating an instance with file storage fails,
the error message is rather general. This patch adds a hint
on what to do as a possible fix.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
---
 lib/bdev.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/bdev.py b/lib/bdev.py
index 84fa49d0f..1b486e744 100644
--- a/lib/bdev.py
+++ b/lib/bdev.py
@@ -184,7 +184,9 @@ def _CheckFileStoragePath(path, allowed):
       break
   else:
     raise errors.FileStoragePathError("Path '%s' is not acceptable for file"
-                                      " storage" % path)
+                                      " storage. A possible fix might be to add"
+                                      " it to /etc/ganeti/file-storage-paths"
+                                      " on all nodes." % path)
 
 
 def _LoadAllowedFileStoragePaths(filename):
-- 
GitLab