|
|
|
|
|
|
|
|
|
|
xen-api
[Xen-API] [PATCH] extra option for quicktest
# HG changeset patch
# User David Scott <dave.scott@xxxxxxxxxxxxx>
# Date 1269455993 0
# Node ID 4abf9f20e0120254ad922ad9c0bcd6ad5d690d1b
# Parent 68cdacd74d3f293885e1714687489db35b8900bc
CA-39371: quicktest will avoid calling VDI.create and VDI.destroy on an SR if
the special other-config:quicktest-no-VDI_CREATE key is set.
Signed-off-by: David Scott <dave.scott@xxxxxxxxxxxxx>
diff -r 68cdacd74d3f -r 4abf9f20e012 ocaml/xapi/quicktest_storage.ml
--- a/ocaml/xapi/quicktest_storage.ml Wed Mar 24 11:10:58 2010 +0000
+++ b/ocaml/xapi/quicktest_storage.ml Wed Mar 24 18:39:53 2010 +0000
@@ -524,9 +524,15 @@
| [ _, plugin ] ->
plugin.API.sM_capabilities
-let is_tools_sr session_id sr =
+(* Even though the SM backend may expose a VDI_CREATE capability attempts
+ to actually create a VDI will fail in (eg) the tools SR and any that
+ happen to be R/O NFS exports *)
+let avoid_vdi_create session_id sr =
let other_config = Client.SR.get_other_config !rpc session_id sr in
- List.mem_assoc Xapi_globs.tools_sr_tag other_config
+ let is_tools_sr = List.mem_assoc Xapi_globs.tools_sr_tag other_config in
+ let special_key = "quicktest-no-VDI_CREATE" in
+ let is_marked = List.mem_assoc special_key other_config && List.assoc
special_key other_config = "true" in
+ is_tools_sr || is_marked
let foreach_sr session_id sr =
let ty = Client.SR.get_type !rpc session_id sr in
@@ -544,7 +550,7 @@
create and delete capabilities are forbidden in that special case.
See Xapi_sr.valid_operations. *)
let caps =
- if is_tools_sr session_id sr then
+ if avoid_vdi_create session_id sr then
List.filter
(fun cap -> not (List.mem cap [ vdi_create; vdi_delete ])) caps
else
1 file changed, 9 insertions(+), 3 deletions(-)
ocaml/xapi/quicktest_storage.ml | 12 +++++++++---
xen-api.hg.patch
Description: Text Data
_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-API] [PATCH] extra option for quicktest,
David Scott <=
|
|
|
|
|