Reviewed-by: Aline Manera <alinefm(a)linux.vnet.ibm.com>
On 12/18/2013 07:34 AM, lvroyce(a)linux.vnet.ibm.com wrote:
From: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
Before creating nfs pool, add a prevalidation for the path
and see if it is able to complish a quick mount.
If not, deny this storage pool from being created.
Signed-off-by: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
---
src/kimchi/model.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/kimchi/model.py b/src/kimchi/model.py
index 73c18ac..705e768 100644
--- a/src/kimchi/model.py
+++ b/src/kimchi/model.py
@@ -69,7 +69,7 @@ from kimchi.networkxml import to_network_xml
from kimchi.objectstore import ObjectStore
from kimchi.scan import Scanner
from kimchi.screenshot import VMScreenshot
-from kimchi.utils import kimchi_log, is_digit, get_enabled_plugins
+from kimchi.utils import kimchi_log, is_digit, get_enabled_plugins, check_nfs_export
from kimchi.vmtemplate import VMTemplate
@@ -991,6 +991,11 @@ class Model(object):
if params['type'] == 'kimchi-iso':
task_id = self._do_deep_scan(params)
+ if params['type'] == 'netfs':
+ export_path = params['nfsserver'] + ':' +
params['nfspath']
+ if not check_nfs_export(export_path):
+ raise InvalidParameter(
+ "Export path %s may block during nfs mount" %
export_path)
xml = _get_pool_xml(**params)
except KeyError, key:
raise MissingParameter(key)
--
project-kimchi mailing list <project-kimchi(a)googlegroups.com>
https://groups.google.com/forum/#!forum/project-kimchi
---
You received this message because you are subscribed to the Google Groups
"project-kimchi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
project-kimchi+unsubscribe(a)googlegroups.com.
For more options, visit
https://groups.google.com/groups/opt_out.