Skip to content

Commit

Permalink
Merge pull request #2712 from xapi-project/revert-2709-CP-18173
Browse files Browse the repository at this point in the history
Revert "CP-18173 add check to vm lifecycle: no migration when using nested virt"
  • Loading branch information
robhoes committed Jul 25, 2016
2 parents 8535cdf + 5635672 commit 29f0d6d
Show file tree
Hide file tree
Showing 12 changed files with 174 additions and 340 deletions.
1 change: 0 additions & 1 deletion ocaml/idl/api_errors.ml
Expand Up @@ -51,7 +51,6 @@ let vm_hvm_required = "VM_HVM_REQUIRED"
let vm_no_vcpus = "VM_NO_VCPUS"
let vm_toomany_vcpus = "VM_TOO_MANY_VCPUS"
let vm_is_protected = "VM_IS_PROTECTED"
let vm_is_immobile= "VM_IS_IMMOBILE"

let host_in_use = "HOST_IN_USE"
let host_in_emergency_mode = "HOST_IN_EMERGENCY_MODE"
Expand Down
4 changes: 1 addition & 3 deletions ocaml/idl/datamodel.ml
Expand Up @@ -1337,10 +1337,8 @@ let _ =
~doc:"The VM cannot be imported unforced because it is either the same version or an older version of an existing VM." ();

error Api_errors.vm_call_plugin_rate_limit ["VM"; "interval"; "wait"]
~doc:"There is a minimal interval required between consecutive plugin calls made on the same VM, please wait before retry." ();
~doc:"There is a minimal interval required between consecutive plugin calls made on the same VM, please wait before retry." ()

error Api_errors.vm_is_immobile ["VM"]
~doc:"The VM is configured in a way that prevents it from being mobile." ()

let _ =
message (fst Api_messages.ha_pool_overcommitted) ~doc:"Pool has become overcommitted: it can no longer guarantee to restart protected VMs if the configured number of hosts fail." ();
Expand Down
1 change: 0 additions & 1 deletion ocaml/test/OMakefile
Expand Up @@ -63,7 +63,6 @@ OCAML_OBJS = \
test_daily_license_check \
test_dbsync_master \
test_xapi_xenops \
test_no_migrate \

OCamlProgram(suite, suite $(OCAML_OBJS) )

Expand Down
1 change: 0 additions & 1 deletion ocaml/test/suite.ml
Expand Up @@ -53,7 +53,6 @@ let base_suite =
Test_daily_license_check.test;
Test_dbsync_master.test;
Test_xapi_xenops.test;
Test_no_migrate.test;
]

let handlers = [
Expand Down
112 changes: 0 additions & 112 deletions ocaml/test/test_no_migrate.ml

This file was deleted.

2 changes: 1 addition & 1 deletion ocaml/test/test_platformdata.ml
Expand Up @@ -31,7 +31,7 @@ module SanityCheck = Generic.Make(struct
end

let transform (platformdata, filter_out_unknowns, vcpu_max, vcpu_at_startup, hvm) =
try Either.Right (Vm_platform.sanity_check ~platformdata ~vcpu_max ~vcpu_at_startup ~hvm ~filter_out_unknowns)
try Either.Right (Xapi_xenops.Platform.sanity_check ~platformdata ~vcpu_max ~vcpu_at_startup ~hvm ~filter_out_unknowns)
with e -> Either.Left e

let tests =
Expand Down
8 changes: 4 additions & 4 deletions ocaml/test/test_xapi_xenops.ml
Expand Up @@ -13,8 +13,8 @@ let test_enabled_in_xenguest () =

let k = "test_key" in
let p v = [k,v] in
let val_fn p = Vm_platform.is_true ~key:k ~platformdata:p ~default:false in
let valid_fn p = Vm_platform.is_valid ~key:k ~platformdata:p in
let val_fn p = Xapi_xenops.Platform.is_true ~key:k ~platformdata:p ~default:false in
let valid_fn p = Xapi_xenops.Platform.is_valid ~key:k ~platformdata:p in

(* Empty list should be valid *)
if not (valid_fn []) then err "[]";
Expand Down Expand Up @@ -61,7 +61,7 @@ let test_nested_virt_licensing () =
begin
try
Db.Pool.set_restrictions ~__context ~self:pool ~value:["restrict_nested_virt","true"];
Vm_platform.check_restricted_flags ~__context platform;
Xapi_xenops.Platform.check_restricted_flags ~__context platform;
if should_raise
then
failwith
Expand All @@ -77,7 +77,7 @@ let test_nested_virt_licensing () =

(* If the feature is unrestricted, nothing should raise an exception *)
Db.Pool.set_restrictions ~__context ~self:pool ~value:["restrict_nested_virt","false"];
Vm_platform.check_restricted_flags ~__context platform
Xapi_xenops.Platform.check_restricted_flags ~__context platform
in

List.iter check_one nested_virt_checks
Expand Down
1 change: 0 additions & 1 deletion ocaml/xapi/OMakefile
Expand Up @@ -277,7 +277,6 @@ XAPI_MODULES = $(COMMON) \
../util/rpc_retry \
xapi \
cluster_stack_constraints \
vm_platform \

OCamlProgram(xapi, xapi_main $(XAPI_MODULES))

Expand Down
167 changes: 0 additions & 167 deletions ocaml/xapi/vm_platform.ml

This file was deleted.

2 changes: 1 addition & 1 deletion ocaml/xapi/xapi_vm.ml
Expand Up @@ -197,7 +197,7 @@ let start ~__context ~vm ~start_paused ~force =

(* Check to see if we're using any restricted platform kvs. This raises
an exception if so *)
Vm_platform.check_restricted_flags ~__context vmr.API.vM_platform;
Xapi_xenops.Platform.check_restricted_flags ~__context vmr.API.vM_platform;

(* Clear out any VM guest metrics record. Guest metrics will be updated by
* the running VM and for now they might be wrong, especially network
Expand Down

0 comments on commit 29f0d6d

Please sign in to comment.