diff --git a/ocaml/alerts/certificate/dune b/ocaml/alerts/certificate/dune index 935348d4a15..c0342beea74 100644 --- a/ocaml/alerts/certificate/dune +++ b/ocaml/alerts/certificate/dune @@ -11,7 +11,7 @@ ) (executable - (modes byte exe) + (modes exe) (name certificate_check_main) (public_name alert-certificate-check) (package xapi) diff --git a/ocaml/cdrommon/dune b/ocaml/cdrommon/dune index ea9e30c6465..bc57948a8d8 100644 --- a/ocaml/cdrommon/dune +++ b/ocaml/cdrommon/dune @@ -1,5 +1,5 @@ (executable - (modes byte exe) + (modes exe) (name cdrommon) (public_name cdrommon) (package xapi) diff --git a/ocaml/database/dune b/ocaml/database/dune index 76936918472..0b0c71425ff 100644 --- a/ocaml/database/dune +++ b/ocaml/database/dune @@ -53,7 +53,7 @@ ) (executable - (modes byte exe) + (modes exe) (name block_device_io) (public_name block_device_io) (package xapi) @@ -70,6 +70,7 @@ (executable (name database_server_main) + (modes exe) (modules database_server_main) (libraries dune-build-info @@ -84,6 +85,7 @@ (tests (names unit_test_marshall db_cache_test) + (modes exe) (package xapi) (modules db_cache_test unit_test_marshall) (libraries @@ -101,6 +103,7 @@ (test (name unit_test_sql) + (modes exe) (package xapi) (modules unit_test_sql) (deps diff --git a/ocaml/db_process/dune b/ocaml/db_process/dune index 7d590c5f014..238f24263d8 100644 --- a/ocaml/db_process/dune +++ b/ocaml/db_process/dune @@ -1,5 +1,5 @@ (executable - (modes byte exe) + (modes exe) (name xapi_db_process) (public_name xapi-db-process) (package xapi) diff --git a/ocaml/doc/dune b/ocaml/doc/dune index 7d7f46864ba..360f0a1a5d7 100644 --- a/ocaml/doc/dune +++ b/ocaml/doc/dune @@ -1,5 +1,5 @@ (executable - (modes byte exe) + (modes exe) (name jsapi) (libraries dune-build-info diff --git a/ocaml/events/dune b/ocaml/events/dune index 703a81c48cb..0a816adc6b2 100644 --- a/ocaml/events/dune +++ b/ocaml/events/dune @@ -1,5 +1,5 @@ (executable - (modes byte exe) + (modes exe) (name event_listen) (public_name event_listen) (package xapi) diff --git a/ocaml/forkexecd/cli/dune b/ocaml/forkexecd/cli/dune index 07012adf5ae..2189925a2bc 100644 --- a/ocaml/forkexecd/cli/dune +++ b/ocaml/forkexecd/cli/dune @@ -1,5 +1,5 @@ (executable - (modes byte exe) + (modes exe) (name fe_cli) (libraries forkexec)) diff --git a/ocaml/forkexecd/src/dune b/ocaml/forkexecd/src/dune index 56d6b3c974e..27555180e97 100644 --- a/ocaml/forkexecd/src/dune +++ b/ocaml/forkexecd/src/dune @@ -1,5 +1,5 @@ (executable - (modes byte exe) + (modes exe) (name fe_main) (libraries astring diff --git a/ocaml/forkexecd/test/dune b/ocaml/forkexecd/test/dune index d84da73d98c..657147a2c72 100644 --- a/ocaml/forkexecd/test/dune +++ b/ocaml/forkexecd/test/dune @@ -1,5 +1,5 @@ (executable - (modes byte exe) + (modes exe) (name fe_test) (libraries forkexec uuid xapi-stdext-unix)) diff --git a/ocaml/gencert/dune b/ocaml/gencert/dune index 4e644afa22d..fedcfefc04e 100644 --- a/ocaml/gencert/dune +++ b/ocaml/gencert/dune @@ -24,7 +24,7 @@ ) (executable - (modes byte exe) + (modes exe) (name gencert) (public_name gencert) (package xapi) @@ -43,6 +43,7 @@ (test (name test_lib) (package xapi) + (modes exe) (modules test_lib test_pem) (libraries alcotest diff --git a/ocaml/idl/dune b/ocaml/idl/dune index e62ae371ba9..bf8dc952301 100644 --- a/ocaml/idl/dune +++ b/ocaml/idl/dune @@ -25,7 +25,7 @@ ) (executable - (modes byte exe) + (modes exe) (name datamodel_main) (modules datamodel_main dot_backend dtd_backend markdown_backend) (libraries @@ -39,6 +39,7 @@ (test (name schematest) + (modes exe) (modules schematest) (libraries dune-build-info @@ -50,7 +51,7 @@ ) (executable - (modes byte exe) + (modes exe) (name gen_lifecycle) (public_name gen_lifecycle) (package xapi-datamodel) diff --git a/ocaml/idl/json_backend/dune b/ocaml/idl/json_backend/dune index b29356d0389..804453c59c1 100644 --- a/ocaml/idl/json_backend/dune +++ b/ocaml/idl/json_backend/dune @@ -1,5 +1,5 @@ (executable - (modes byte exe) + (modes exe) (name gen_json) (libraries dune-build-info diff --git a/ocaml/idl/ocaml_backend/dune b/ocaml/idl/ocaml_backend/dune index a3ee1c726b1..e373fe33d09 100644 --- a/ocaml/idl/ocaml_backend/dune +++ b/ocaml/idl/ocaml_backend/dune @@ -1,5 +1,5 @@ (executable - (modes byte exe) + (modes exe) (name gen_api_main) (libraries astring diff --git a/ocaml/libs/http-lib/dune b/ocaml/libs/http-lib/dune index d780fd32b08..7ee2a88596a 100644 --- a/ocaml/libs/http-lib/dune +++ b/ocaml/libs/http-lib/dune @@ -47,7 +47,7 @@ ) (executable - (modes byte exe) + (modes exe) (name http_test) (modules http_test) (libraries @@ -59,6 +59,7 @@ (test (name radix_tree_test) + (modes exe) (modules radix_tree_test) (package http-lib) (libraries @@ -68,7 +69,7 @@ ) (executable - (modes byte exe) + (modes exe) (name test_client) (modules test_client) (libraries @@ -84,7 +85,7 @@ ) (executable - (modes byte exe) + (modes exe) (name test_server) (modules test_server) (libraries diff --git a/ocaml/libs/sexpr/dune b/ocaml/libs/sexpr/dune index d5c1f9cdbcc..97965164eed 100644 --- a/ocaml/libs/sexpr/dune +++ b/ocaml/libs/sexpr/dune @@ -15,7 +15,7 @@ ) (executable - (modes byte exe) + (modes exe) (name sexprpp) (modules sexprpp) (libraries diff --git a/ocaml/libs/xapi-compression/dune b/ocaml/libs/xapi-compression/dune index ba29fa38630..e366bed1716 100644 --- a/ocaml/libs/xapi-compression/dune +++ b/ocaml/libs/xapi-compression/dune @@ -14,6 +14,7 @@ (executable (name xapi_gzip) + (modes exe) (modules xapi_gzip) ; don't install this ; (public_name xapi-gzip) diff --git a/ocaml/libs/xml-light2/dune b/ocaml/libs/xml-light2/dune index 68d22599f3e..a36111de5a2 100644 --- a/ocaml/libs/xml-light2/dune +++ b/ocaml/libs/xml-light2/dune @@ -10,7 +10,7 @@ ) (executable - (modes byte exe) + (modes exe) (name xmlpp) (modules xmlpp) (libraries diff --git a/ocaml/license/dune b/ocaml/license/dune index 209853d3de8..28ce39eb80f 100644 --- a/ocaml/license/dune +++ b/ocaml/license/dune @@ -11,7 +11,7 @@ ) (executable - (modes byte exe) + (modes exe) (name daily_license_check_main) (public_name daily-license-check) (package xapi) diff --git a/ocaml/message-switch/cli/dune b/ocaml/message-switch/cli/dune index daddfa33409..beb3741dc85 100644 --- a/ocaml/message-switch/cli/dune +++ b/ocaml/message-switch/cli/dune @@ -1,5 +1,5 @@ (executable - (modes byte exe) + (modes exe) (name main) (libraries cmdliner diff --git a/ocaml/message-switch/core_test/async/dune b/ocaml/message-switch/core_test/async/dune index 6cbe8f53431..2891908317e 100644 --- a/ocaml/message-switch/core_test/async/dune +++ b/ocaml/message-switch/core_test/async/dune @@ -1,5 +1,5 @@ (executables - (modes byte exe) + (modes exe) (names client_async_main server_async_main diff --git a/ocaml/message-switch/core_test/dune b/ocaml/message-switch/core_test/dune index ace0e45aac9..d500c101354 100644 --- a/ocaml/message-switch/core_test/dune +++ b/ocaml/message-switch/core_test/dune @@ -1,5 +1,5 @@ (executables - (modes byte exe) + (modes exe) (names client_unix_main server_unix_main diff --git a/ocaml/message-switch/core_test/lwt/dune b/ocaml/message-switch/core_test/lwt/dune index 4c3a03abea5..d08db56b3a4 100644 --- a/ocaml/message-switch/core_test/lwt/dune +++ b/ocaml/message-switch/core_test/lwt/dune @@ -1,5 +1,5 @@ (executables - (modes byte exe) + (modes exe) (names link_test_main client_main diff --git a/ocaml/message-switch/switch/dune b/ocaml/message-switch/switch/dune index d05877491d2..756bb2d9097 100644 --- a/ocaml/message-switch/switch/dune +++ b/ocaml/message-switch/switch/dune @@ -1,5 +1,5 @@ (executable - (modes byte exe) + (modes exe) (name switch_main) (libraries cmdliner diff --git a/ocaml/mpathalert/dune b/ocaml/mpathalert/dune index 63c66bdbec6..569e98b8b35 100644 --- a/ocaml/mpathalert/dune +++ b/ocaml/mpathalert/dune @@ -1,5 +1,5 @@ (executable - (modes byte exe) + (modes exe) (name mpathalert) (public_name mpathalert) (package xapi) diff --git a/ocaml/nbd/src/dune b/ocaml/nbd/src/dune index b342fa3db19..9f242944676 100644 --- a/ocaml/nbd/src/dune +++ b/ocaml/nbd/src/dune @@ -1,6 +1,6 @@ (executable (name main) - (modes byte exe) + (modes exe) (libraries cmdliner consts diff --git a/ocaml/networkd/bin/dune b/ocaml/networkd/bin/dune index 436a04c490c..fd105560611 100644 --- a/ocaml/networkd/bin/dune +++ b/ocaml/networkd/bin/dune @@ -13,7 +13,7 @@ (name networkd) (public_name xapi-networkd) (package xapi-networkd) - (modes byte exe) + (modes exe) (libraries astring dune-build-info diff --git a/ocaml/networkd/bin_db/dune b/ocaml/networkd/bin_db/dune index 51582e0b832..f36c68215de 100644 --- a/ocaml/networkd/bin_db/dune +++ b/ocaml/networkd/bin_db/dune @@ -2,7 +2,7 @@ (name networkd_db) (public_name networkd_db) (package xapi-networkd) - (modes byte exe) + (modes exe) (libraries dune-build-info networklibs diff --git a/ocaml/perftest/dune b/ocaml/perftest/dune index fceacc0c4d9..137511118b8 100644 --- a/ocaml/perftest/dune +++ b/ocaml/perftest/dune @@ -1,5 +1,5 @@ (executable - (modes byte exe) + (modes exe) (name perftest) (public_name perftest) (package xapi) diff --git a/ocaml/quicktest/dune b/ocaml/quicktest/dune index db62bbbffd4..380345b1b2d 100644 --- a/ocaml/quicktest/dune +++ b/ocaml/quicktest/dune @@ -1,5 +1,5 @@ (executable - (modes byte exe) + (modes exe) (name quicktest) (public_name quicktestbin) (package xapi) diff --git a/ocaml/rrd2csv/src/dune b/ocaml/rrd2csv/src/dune index 5a79489921f..6c891c32a94 100644 --- a/ocaml/rrd2csv/src/dune +++ b/ocaml/rrd2csv/src/dune @@ -1,5 +1,5 @@ (executable - (modes byte exe) + (modes exe) (name rrd2csv) (public_name rrd2csv) (package rrd2csv) diff --git a/ocaml/sdk-gen/c/dune b/ocaml/sdk-gen/c/dune index c7bd9e787e7..ec5812bda74 100644 --- a/ocaml/sdk-gen/c/dune +++ b/ocaml/sdk-gen/c/dune @@ -1,5 +1,5 @@ (executable - (modes byte exe) + (modes exe) (name gen_c_binding) (libraries astring diff --git a/ocaml/sdk-gen/csharp/dune b/ocaml/sdk-gen/csharp/dune index 746ff3ac39b..8a0ba5d6179 100644 --- a/ocaml/sdk-gen/csharp/dune +++ b/ocaml/sdk-gen/csharp/dune @@ -1,5 +1,5 @@ (executable - (modes byte exe) + (modes exe) (name gen_csharp_binding) (modules Gen_csharp_binding) (libraries @@ -13,7 +13,7 @@ ) (executable - (modes byte exe) + (modes exe) (name friendly_error_names) (modules Friendly_error_names) (libraries diff --git a/ocaml/sdk-gen/java/dune b/ocaml/sdk-gen/java/dune index 46148a71f22..2588d3ba785 100644 --- a/ocaml/sdk-gen/java/dune +++ b/ocaml/sdk-gen/java/dune @@ -1,5 +1,5 @@ (executable - (modes byte exe) + (modes exe) (name main) (libraries astring diff --git a/ocaml/sdk-gen/powershell/dune b/ocaml/sdk-gen/powershell/dune index 581361c18c1..b0f1fe83a4b 100644 --- a/ocaml/sdk-gen/powershell/dune +++ b/ocaml/sdk-gen/powershell/dune @@ -1,5 +1,5 @@ (executable - (modes byte exe) + (modes exe) (name gen_powershell_binding) (libraries astring diff --git a/ocaml/squeezed/src/dune b/ocaml/squeezed/src/dune index 25a11ad6aab..cbdf62e39c8 100644 --- a/ocaml/squeezed/src/dune +++ b/ocaml/squeezed/src/dune @@ -1,5 +1,5 @@ (executable - (modes byte exe) + (modes exe) (name squeezed) (public_name squeezed) (package xapi-squeezed) diff --git a/ocaml/tests/dune b/ocaml/tests/dune index 36404b84878..d0280ece9a6 100644 --- a/ocaml/tests/dune +++ b/ocaml/tests/dune @@ -1,5 +1,6 @@ (test (name suite_alcotest) + (modes exe) (package xapi) (modules (:standard \ test_daemon_manager test_vdi_cbt test_event test_clustering @@ -59,6 +60,7 @@ test_clustering test_pusb test_daemon_manager test_repository test_repository_helpers test_livepatch test_rpm test_updateinfo) (package xapi) + (modes exe) (modules test_vm_helpers test_vm_placement test_network_sriov test_vdi_cbt test_event test_clustering test_cluster_host test_cluster test_pusb test_daemon_manager test_repository test_repository_helpers test_livepatch test_rpm @@ -93,18 +95,21 @@ ) (test (name test_storage_smapiv1_wrapper) +(modes exe) (package xapi) (modules test_storage_smapiv1_wrapper) (libraries alcotest xapi_internal fmt)) (test (name test_storage_quicktest) +(modes exe) (package xapi) (modules test_storage_quicktest) (libraries xapi_internal crowbar)) (test (name test_ref) +(modes exe) (package xapi) (modules test_ref) (libraries xapi_internal crowbar)) diff --git a/ocaml/tests/xapi-cli-protocol/dune b/ocaml/tests/xapi-cli-protocol/dune index 252fb2bc864..3cd3c5aaa85 100644 --- a/ocaml/tests/xapi-cli-protocol/dune +++ b/ocaml/tests/xapi-cli-protocol/dune @@ -1,5 +1,6 @@ (test (name test_cli_protocol) + (modes exe) (package xapi-cli-protocol) (libraries alcotest diff --git a/ocaml/vhd-tool/cli/dune b/ocaml/vhd-tool/cli/dune index 223e026f274..63f017a92d4 100644 --- a/ocaml/vhd-tool/cli/dune +++ b/ocaml/vhd-tool/cli/dune @@ -1,5 +1,5 @@ (executables - (modes byte exe) + (modes exe) (names main sparse_dd get_vhd_vsize) (package vhd-tool) (public_names vhd-tool sparse_dd get_vhd_vsize) diff --git a/ocaml/vncproxy/dune b/ocaml/vncproxy/dune index d690b2e4bc1..b384086d377 100644 --- a/ocaml/vncproxy/dune +++ b/ocaml/vncproxy/dune @@ -1,5 +1,5 @@ (executable - (modes byte exe) + (modes exe) (name vncproxy) (public_name vncproxy) (package xapi) diff --git a/ocaml/wsproxy/test/dune b/ocaml/wsproxy/test/dune index 1e63cc4f824..3b57c6e4518 100644 --- a/ocaml/wsproxy/test/dune +++ b/ocaml/wsproxy/test/dune @@ -1,5 +1,6 @@ (test (name wsproxy_tests) + (modes exe) (package wsproxy) (libraries ounit2 qcheck-core wslib) ) diff --git a/ocaml/xapi-guard/test/dune b/ocaml/xapi-guard/test/dune index 1be4f6120c7..e4ebba7065e 100644 --- a/ocaml/xapi-guard/test/dune +++ b/ocaml/xapi-guard/test/dune @@ -1,5 +1,6 @@ (test (name xapi_guard_test) + (modes exe) (libraries alcotest alcotest-lwt diff --git a/ocaml/xapi-idl/cluster/dune b/ocaml/xapi-idl/cluster/dune index 94b84c53fd1..5216ef3fca8 100644 --- a/ocaml/xapi-idl/cluster/dune +++ b/ocaml/xapi-idl/cluster/dune @@ -16,6 +16,7 @@ (executable (name cluster_cli) + (modes exe) (modules cluster_cli) (libraries cmdliner diff --git a/ocaml/xapi-idl/gpumon/dune b/ocaml/xapi-idl/gpumon/dune index 9978e416ad5..ccd184e9098 100644 --- a/ocaml/xapi-idl/gpumon/dune +++ b/ocaml/xapi-idl/gpumon/dune @@ -15,6 +15,7 @@ (executable (name gpumon_cli) + (modes exe) (public_name gpumon-cli) (package xapi-idl) (modules gpumon_cli) diff --git a/ocaml/xapi-idl/lib_test/dune b/ocaml/xapi-idl/lib_test/dune index f4f20c774e3..f80caad6341 100644 --- a/ocaml/xapi-idl/lib_test/dune +++ b/ocaml/xapi-idl/lib_test/dune @@ -1,5 +1,6 @@ (test (name test) + (modes exe) (package xapi-idl) (deps (source_tree test_data)) (libraries diff --git a/ocaml/xapi-idl/memory/dune b/ocaml/xapi-idl/memory/dune index 3ef203a8e99..f0f70e0a69e 100644 --- a/ocaml/xapi-idl/memory/dune +++ b/ocaml/xapi-idl/memory/dune @@ -14,6 +14,7 @@ (executable (name memory_cli) + (modes exe) (modules memory_cli) (libraries cmdliner diff --git a/ocaml/xapi-idl/network/dune b/ocaml/xapi-idl/network/dune index b0d72b1594f..4fb1a78f213 100644 --- a/ocaml/xapi-idl/network/dune +++ b/ocaml/xapi-idl/network/dune @@ -16,6 +16,7 @@ (executable (name network_cli) + (modes exe) (modules network_cli) (libraries cmdliner diff --git a/ocaml/xapi-idl/rrd/dune b/ocaml/xapi-idl/rrd/dune index d1c550df8b3..7a407a77e9d 100644 --- a/ocaml/xapi-idl/rrd/dune +++ b/ocaml/xapi-idl/rrd/dune @@ -47,6 +47,7 @@ (public_name rrd-cli) (package xapi-rrdd) (modules rrd_cli) + (modes exe) (libraries cmdliner dune-build-info diff --git a/ocaml/xapi-idl/rrd/rrd_interface.ml b/ocaml/xapi-idl/rrd/rrd_interface.ml index 5c8386ea43c..bee3c646d34 100644 --- a/ocaml/xapi-idl/rrd/rrd_interface.ml +++ b/ocaml/xapi-idl/rrd/rrd_interface.ml @@ -495,34 +495,6 @@ module RPC_API (R : RPC) = struct (uid_p @-> returning float_p rrd_err) end - module Interdomain = struct - let iduid_p = - Param.mk ~name:"uid" ~description:["Interdomain ID"] interdomain_uid - - let register = - declare "Plugin.Interdomain.register" - [ - "[Plugin.Interdomain.register uid info protocol] registers an" - ; "interdomain plugin. [uid] is the unique identifier of the" - ; "plugin, containing both a name and the frontend domain id." - ; "[info] contains both the desired sampling frequency and" - ; "a list of the grant references of the shared pages. [protocol]" - ; "is V1 or V2, and the return value is the time until the next" - ; "reading" - ] - (iduid_p @-> info_p @-> protocol_p @-> returning float_p rrd_err) - - let deregister = - declare "Plugin.Interdomain.deregister" - ["Deregisters a plugin by uid."] - (iduid_p @-> returning unit_p rrd_err) - - let next_reading = - declare "Plugin.Interdomain.next_reading" - ["Returns the number of seconds before the next reading."] - (iduid_p @-> returning float_p rrd_err) - end - let register = let freq_p = Param.mk ~name:"frequency" diff --git a/ocaml/xapi-idl/storage/dune b/ocaml/xapi-idl/storage/dune index 623b74b614c..500a6f5bbfd 100644 --- a/ocaml/xapi-idl/storage/dune +++ b/ocaml/xapi-idl/storage/dune @@ -48,6 +48,7 @@ (test (name storage_test) + (modes exe) (modules storage_test) (package xapi-idl) (libraries @@ -62,6 +63,7 @@ (test (name suite) + (modes exe) (modules suite vdi_automaton_test) (libraries alcotest diff --git a/ocaml/xapi-idl/v6/dune b/ocaml/xapi-idl/v6/dune index 0d6c0414010..059bf6fc181 100644 --- a/ocaml/xapi-idl/v6/dune +++ b/ocaml/xapi-idl/v6/dune @@ -15,6 +15,7 @@ (executable (name v6_cli) + (modes exe) (modules v6_cli) (libraries cmdliner diff --git a/ocaml/xapi-idl/varstore/deprivileged/dune b/ocaml/xapi-idl/varstore/deprivileged/dune index aa6584dee60..f8d388eb4d4 100644 --- a/ocaml/xapi-idl/varstore/deprivileged/dune +++ b/ocaml/xapi-idl/varstore/deprivileged/dune @@ -14,6 +14,7 @@ (executable (name varstore_deprivileged_cli) + (modes exe) (modules varstore_deprivileged_cli) (libraries cmdliner diff --git a/ocaml/xapi-idl/varstore/privileged/dune b/ocaml/xapi-idl/varstore/privileged/dune index 817a6a35fb8..d7ed2122a61 100644 --- a/ocaml/xapi-idl/varstore/privileged/dune +++ b/ocaml/xapi-idl/varstore/privileged/dune @@ -14,6 +14,7 @@ (executable (name varstore_privileged_cli) + (modes exe) (modules varstore_privileged_cli) (libraries cmdliner diff --git a/ocaml/xapi/dune b/ocaml/xapi/dune index 686f91541c7..32c920f7314 100644 --- a/ocaml/xapi/dune +++ b/ocaml/xapi/dune @@ -156,7 +156,7 @@ ) (executable - (modes byte exe) + (modes exe) (name xapi_main) (public_name xapi) (package xapi) diff --git a/ocaml/xcp-rrdd/bin/read-blktap-stats/dune b/ocaml/xcp-rrdd/bin/read-blktap-stats/dune index c04fbf03642..9c6e2315d6f 100644 --- a/ocaml/xcp-rrdd/bin/read-blktap-stats/dune +++ b/ocaml/xcp-rrdd/bin/read-blktap-stats/dune @@ -1,5 +1,5 @@ (executable - (modes byte exe) + (modes exe) (name read_blktap_stats) (package rrdd-plugins) (public_name xcp-rrdd-read-blktap-stats) diff --git a/ocaml/xcp-rrdd/bin/rrdd/dune b/ocaml/xcp-rrdd/bin/rrdd/dune index 87ac2c56e41..42b0823d9c2 100644 --- a/ocaml/xcp-rrdd/bin/rrdd/dune +++ b/ocaml/xcp-rrdd/bin/rrdd/dune @@ -36,7 +36,7 @@ ) (executable - (modes byte exe) + (modes exe) (name xcp_rrdd) (public_name xcp-rrdd) (package xapi-rrdd) diff --git a/ocaml/xcp-rrdd/bin/rrdd/rrdd_bindings.ml b/ocaml/xcp-rrdd/bin/rrdd/rrdd_bindings.ml index bca04fc9a84..f5d977d632c 100644 --- a/ocaml/xcp-rrdd/bin/rrdd/rrdd_bindings.ml +++ b/ocaml/xcp-rrdd/bin/rrdd/rrdd_bindings.ml @@ -75,17 +75,6 @@ module type RRDD_IMPLEMENTATION = sig val next_reading : string -> float end - - module Interdomain : sig - open Rrd_interface - - val register : - interdomain_uid -> interdomain_info -> plugin_protocol -> float - - val deregister : interdomain_uid -> unit - - val next_reading : interdomain_uid -> float - end end module HA : sig @@ -140,9 +129,6 @@ module Make (Impl : RRDD_IMPLEMENTATION) = struct Server.Plugin.Local.register Impl.Plugin.Local.register ; Server.Plugin.Local.deregister Impl.Plugin.Local.deregister ; Server.Plugin.Local.next_reading Impl.Plugin.Local.next_reading ; - Server.Plugin.Interdomain.register Impl.Plugin.Interdomain.register ; - Server.Plugin.Interdomain.deregister Impl.Plugin.Interdomain.deregister ; - Server.Plugin.Interdomain.next_reading Impl.Plugin.Interdomain.next_reading ; Server.Plugin.register Impl.Plugin.register ; Server.Plugin.deregister Impl.Plugin.deregister ; Server.Plugin.next_reading Impl.Plugin.next_reading ; diff --git a/ocaml/xcp-rrdd/bin/rrdd/rrdd_server.ml b/ocaml/xcp-rrdd/bin/rrdd/rrdd_server.ml index 0ec6450e6f6..ab3332cc67d 100644 --- a/ocaml/xcp-rrdd/bin/rrdd/rrdd_server.ml +++ b/ocaml/xcp-rrdd/bin/rrdd/rrdd_server.ml @@ -744,27 +744,6 @@ module Plugin = struct Rrd_reader.FileReader.create (get_path_internal ~uid) protocol end) - module Interdomain = Make (struct - (* name, frontend domid *) - type uid = Rrd_interface.interdomain_uid - - (* sampling frequency, list of grant refs *) - type info = Rrd_interface.interdomain_info - - let string_of_uid ~(uid : uid) : string = - Printf.sprintf "%s:domid%d" uid.Rrd_interface.name - uid.Rrd_interface.frontend_domid - - let make_reader ~(uid : uid) ~(info : info) - ~(protocol : Rrd_protocol.protocol) = - Rrd_reader.PageReader.create - { - Rrd_reader.frontend_domid= uid.Rrd_interface.frontend_domid - ; Rrd_reader.shared_page_refs= info.Rrd_interface.shared_page_refs - } - protocol - end) - (* Kept for backwards compatibility. *) let next_reading = Local.next_reading @@ -774,8 +753,7 @@ module Plugin = struct let deregister = Local.deregister (* Read, parse, and combine metrics from all registered plugins. *) - let read_stats () : (Rrd.ds_owner * Ds.ds) list = - List.rev_append (Local.read_stats ()) (Interdomain.read_stats ()) + let read_stats () : (Rrd.ds_owner * Ds.ds) list = Local.read_stats () end module HA = struct diff --git a/ocaml/xcp-rrdd/bin/rrdd/rrdd_server.mli b/ocaml/xcp-rrdd/bin/rrdd/rrdd_server.mli index 84a65756c5c..9f3f5081a7b 100644 --- a/ocaml/xcp-rrdd/bin/rrdd/rrdd_server.mli +++ b/ocaml/xcp-rrdd/bin/rrdd/rrdd_server.mli @@ -75,18 +75,6 @@ module Plugin : sig val next_reading : string -> float end - - module Interdomain : sig - val register : - Rrd_interface.interdomain_uid - -> Rrd_interface.interdomain_info - -> Rrd_interface.plugin_protocol - -> float - - val deregister : Rrd_interface.interdomain_uid -> unit - - val next_reading : Rrd_interface.interdomain_uid -> float - end end module HA : sig diff --git a/ocaml/xcp-rrdd/bin/rrddump/dune b/ocaml/xcp-rrdd/bin/rrddump/dune index fe9d5834988..9af30f6fabc 100644 --- a/ocaml/xcp-rrdd/bin/rrddump/dune +++ b/ocaml/xcp-rrdd/bin/rrddump/dune @@ -1,5 +1,5 @@ (executable - (modes byte exe) + (modes exe) (name rrddump) (public_name rrddump) (libraries diff --git a/ocaml/xcp-rrdd/bin/rrdp-dummy/dune b/ocaml/xcp-rrdd/bin/rrdp-dummy/dune index b80ba1c7507..6441afe0f61 100644 --- a/ocaml/xcp-rrdd/bin/rrdp-dummy/dune +++ b/ocaml/xcp-rrdd/bin/rrdp-dummy/dune @@ -1,5 +1,5 @@ (executable - (modes byte exe) + (modes exe) (public_name rrdp_dummy) (package xapi-rrdd-plugin) (libraries diff --git a/ocaml/xcp-rrdd/bin/rrdp-dummy/rrdp_dummy.ml b/ocaml/xcp-rrdd/bin/rrdp-dummy/rrdp_dummy.ml index 0b987825541..c89a068235c 100644 --- a/ocaml/xcp-rrdd/bin/rrdp-dummy/rrdp_dummy.ml +++ b/ocaml/xcp-rrdd/bin/rrdp-dummy/rrdp_dummy.ml @@ -37,18 +37,13 @@ let _ = ( "-mode" , Arg.String (function - | "local" -> - mode := Rrdd_plugin.Reporter.Local 1 - | "interdomain" -> - mode := Rrdd_plugin.Reporter.Interdomain (0, 1) - | x -> - invalid_arg x + | "local" -> mode := Rrdd_plugin.Reporter.Local 1 | x -> invalid_arg x ) - , "Switch between local and interdomain mode" + , "mode, currently only local mode" ) ] (fun _ -> ()) - (Printf.sprintf "Usage: %s -mode [local|interdomain]" Sys.executable_name) ; + (Printf.sprintf "Usage: %s -mode [local]" Sys.executable_name) ; Process.initialise () ; Process.main_loop ~neg_shift:0.5 ~target:!mode ~protocol:Rrd_interface.V2 ~dss_f:generate_dummy_dss diff --git a/ocaml/xcp-rrdd/bin/rrdp-iostat/dune b/ocaml/xcp-rrdd/bin/rrdp-iostat/dune index eb51ff86aec..4ff5ab43453 100644 --- a/ocaml/xcp-rrdd/bin/rrdp-iostat/dune +++ b/ocaml/xcp-rrdd/bin/rrdp-iostat/dune @@ -1,5 +1,5 @@ (executable - (modes byte exe) + (modes exe) (name rrdp_iostat) (package rrdd-plugins) (public_name xcp-rrdd-iostat) diff --git a/ocaml/xcp-rrdd/bin/rrdp-squeezed/dune b/ocaml/xcp-rrdd/bin/rrdp-squeezed/dune index 19ac2702ad7..69a0f05cf98 100644 --- a/ocaml/xcp-rrdd/bin/rrdp-squeezed/dune +++ b/ocaml/xcp-rrdd/bin/rrdp-squeezed/dune @@ -1,5 +1,5 @@ (executable - (modes byte exe) + (modes exe) (name rrdp_squeezed) (package rrdd-plugins) (public_name xcp-rrdd-squeezed) diff --git a/ocaml/xcp-rrdd/bin/rrdp-xenpm/dune b/ocaml/xcp-rrdd/bin/rrdp-xenpm/dune index d991e530b61..8e71461e3fb 100644 --- a/ocaml/xcp-rrdd/bin/rrdp-xenpm/dune +++ b/ocaml/xcp-rrdd/bin/rrdp-xenpm/dune @@ -1,5 +1,5 @@ (executable - (modes byte exe) + (modes exe) (name rrdp_xenpm) (package rrdd-plugins) (public_name xcp-rrdd-xenpm) diff --git a/ocaml/xcp-rrdd/bin/transport-rw/dune b/ocaml/xcp-rrdd/bin/transport-rw/dune index eb59197a14b..9630a477ac4 100644 --- a/ocaml/xcp-rrdd/bin/transport-rw/dune +++ b/ocaml/xcp-rrdd/bin/transport-rw/dune @@ -1,5 +1,5 @@ (executables - (modes byte exe) + (modes exe) (names reader writer) (public_names rrdreader rrdwriter) (package xapi-rrd-transport-utils) diff --git a/ocaml/xcp-rrdd/bin/transport-rw/reader.ml b/ocaml/xcp-rrdd/bin/transport-rw/reader.ml index c216c8811d2..31df6fd1d92 100644 --- a/ocaml/xcp-rrdd/bin/transport-rw/reader.ml +++ b/ocaml/xcp-rrdd/bin/transport-rw/reader.ml @@ -46,36 +46,7 @@ let read_file_cmd = , Cmd.info "file" ~doc ~man ) -let read_page_cmd = - let domid = - let doc = "The remote domid which is writing to shared memory" in - Arg.(required & pos 0 (some int) None & info [] ~docv:"DOMID" ~doc) - in - let grantref = - let doc = - "The grant reference of the shared page which will be read from" - in - Arg.(required & pos 1 (some int) None & info [] ~docv:"GRANTREF" ~doc) - in - let protocol = - let doc = "The protocol to use to read the rrd data" in - Arg.(required & pos 2 (some string) None & info [] ~docv:"PROTOCOL" ~doc) - in - let doc = "read from a page of shared memory" in - let man = - [ - `S "DESCRIPTION" - ; `P - "Read rrd data from a page of shared memory, using the specified \ - protocol" - ] - @ help_secs - in - ( Term.(const Reader_commands.read_page $ domid $ grantref $ protocol) - , Cmd.info "page" ~doc ~man - ) - -let cmds = List.map (fun (t, i) -> Cmd.v i t) [read_file_cmd; read_page_cmd] +let cmds = List.map (fun (t, i) -> Cmd.v i t) [read_file_cmd] let () = let default = Term.(ret (const (fun _ -> `Help (`Pager, None)) $ const ())) in diff --git a/ocaml/xcp-rrdd/bin/transport-rw/reader_commands.ml b/ocaml/xcp-rrdd/bin/transport-rw/reader_commands.ml index d0e7cf61600..8736bca234b 100644 --- a/ocaml/xcp-rrdd/bin/transport-rw/reader_commands.ml +++ b/ocaml/xcp-rrdd/bin/transport-rw/reader_commands.ml @@ -89,12 +89,3 @@ let read_file once path protocol = reader.Rrd_reader.cleanup () ) else main_loop reader 5.0 - -let read_page domid grantref protocol = - let protocol = protocol_of_string protocol in - let reader = - Rrd_reader.PageReader.create - {Rrd_reader.frontend_domid= domid; shared_page_refs= [grantref]} - protocol - in - main_loop reader 5.0 diff --git a/ocaml/xcp-rrdd/bin/transport-rw/writer.ml b/ocaml/xcp-rrdd/bin/transport-rw/writer.ml index fb047eaa95c..02314c50a90 100644 --- a/ocaml/xcp-rrdd/bin/transport-rw/writer.ml +++ b/ocaml/xcp-rrdd/bin/transport-rw/writer.ml @@ -42,28 +42,7 @@ let write_file_cmd = (Cmd.info "file" ~doc ~man) Term.(const Writer_commands.write_file $ path $ protocol) -let write_page_cmd = - let domid = - let doc = "The remote domid which will read the shared memory" in - Arg.(required & pos 0 (some int) None & info [] ~docv:"DOMID" ~doc) - in - let protocol = - let doc = "The protocol to use to write the rrd data" in - Arg.(required & pos 1 (some string) None & info [] ~docv:"PROTOCOL" ~doc) - in - let doc = "write to a page" in - let man = - [ - `S "DESCRIPTION" - ; `P "Write rrd data to page of memory shared with another domain" - ] - @ help_secs - in - Cmd.v - (Cmd.info "page" ~doc ~man) - Term.(const Writer_commands.write_page $ domid $ protocol) - -let cmds = [write_file_cmd; write_page_cmd] +let cmds = [write_file_cmd] let () = let default = Term.(ret (const (fun _ -> `Help (`Pager, None)) $ const ())) in diff --git a/ocaml/xcp-rrdd/bin/transport-rw/writer_commands.ml b/ocaml/xcp-rrdd/bin/transport-rw/writer_commands.ml index 7cae39172e5..c3061349ccf 100644 --- a/ocaml/xcp-rrdd/bin/transport-rw/writer_commands.ml +++ b/ocaml/xcp-rrdd/bin/transport-rw/writer_commands.ml @@ -92,16 +92,3 @@ let write_file path protocol = in Printf.printf "Writing to file %s\n%!" path ; main_loop writer 5.0 - -let write_page domid protocol = - Random.self_init () ; - let protocol = protocol_of_string protocol in - let refs, writer = - Rrd_writer.PageWriter.create - {Rrd_writer.backend_domid= domid; shared_page_count= 1} - protocol - in - Printf.printf "Writing to pages [%s] shared with domain %d\n%!" - (List.map string_of_int refs |> String.concat "; ") - domid ; - main_loop writer 5.0 diff --git a/ocaml/xcp-rrdd/lib/plugin/dune b/ocaml/xcp-rrdd/lib/plugin/dune index cc6833d5519..12710f3305e 100644 --- a/ocaml/xcp-rrdd/lib/plugin/dune +++ b/ocaml/xcp-rrdd/lib/plugin/dune @@ -40,23 +40,6 @@ ) ) -(library - (name rrdd_plugin_interdomain) - (public_name rrdd-plugin.interdomain) - (flags (:standard -bin-annot)) - (wrapped false) - (modules reporter_interdomain) - (libraries - rrdd-plugin.base - rrd-transport.lib - rrd-transport.page - threads.posix - xapi-idl.rrd.interface - xapi-log - xenstore_transport.unix - ) -) - (library (name rrdd_plugin) (public_name rrdd-plugin) @@ -66,7 +49,6 @@ (libraries rrdd-plugin.base rrdd-plugin.local - rrdd-plugin.interdomain rrd-transport threads.posix xapi-idl.rrd diff --git a/ocaml/xcp-rrdd/lib/plugin/reporter_interdomain.ml b/ocaml/xcp-rrdd/lib/plugin/reporter_interdomain.ml deleted file mode 100644 index 91af5960f96..00000000000 --- a/ocaml/xcp-rrdd/lib/plugin/reporter_interdomain.ml +++ /dev/null @@ -1,50 +0,0 @@ -(* - * Copyright (C) 2013 Citrix Systems Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation; version 2.1 only. with the special - * exception on linking described in file LICENSE. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - *) - -open Reporter - -let start_interdomain (module D : Debug.DEBUG) ~reporter ~uid ~backend_domid - ~page_count ~protocol ~dss_f = - let id = Rrd_page_writer.{backend_domid; shared_page_count= page_count} in - let shared_page_refs, writer = - Rrd_page_writer.create id (choose_protocol protocol) - in - let xs_state = Xs.get_xs_state () in - Xs.transaction xs_state.Xs.client (fun xs -> - Xs.write xs - (Printf.sprintf "%s/%s/grantrefs" xs_state.Xs.root_path uid) - (List.map string_of_int shared_page_refs |> String.concat ",") ; - Xs.write xs - (Printf.sprintf "%s/%s/protocol" xs_state.Xs.root_path uid) - (Rrd_interface.string_of_protocol protocol) ; - Xs.write xs - (Printf.sprintf "%s/%s/ready" xs_state.Xs.root_path uid) - "true" - ) ; - let report () = - let payload = - Rrd_protocol.{timestamp= Utils.now (); datasources= dss_f ()} - in - writer.Rrd_writer_functor.write_payload payload ; - Thread.delay 5.0 - in - let cleanup () = - Xs.immediate xs_state.Xs.client (fun xs -> - Xs.write xs - (Printf.sprintf "%s/%s/shutdown" xs_state.Xs.root_path uid) - "true" - ) ; - writer.Rrd_writer_functor.cleanup () - in - loop (module D) ~reporter ~report ~cleanup diff --git a/ocaml/xcp-rrdd/lib/plugin/rrdd_plugin.ml b/ocaml/xcp-rrdd/lib/plugin/rrdd_plugin.ml index 4ad10cfaacf..6c2c11192fb 100644 --- a/ocaml/xcp-rrdd/lib/plugin/rrdd_plugin.ml +++ b/ocaml/xcp-rrdd/lib/plugin/rrdd_plugin.ml @@ -58,9 +58,8 @@ module Utils = Utils module Reporter = struct include Reporter include Reporter_local - include Reporter_interdomain - type target = Local of int | Interdomain of (int * int) + type target = Local of int let start (module D : Debug.DEBUG) ~uid ~neg_shift ~target ~protocol ~dss_f = match target with @@ -68,10 +67,6 @@ module Reporter = struct start_local (module D) ~reporter:None ~uid ~neg_shift ~page_count ~protocol ~dss_f - | Interdomain (backend_domid, page_count) -> - start_interdomain - (module D) - ~reporter:None ~uid ~backend_domid ~page_count ~protocol ~dss_f let start_async (module D : Debug.DEBUG) ~uid ~neg_shift ~target ~protocol ~dss_f = @@ -85,11 +80,6 @@ module Reporter = struct (module D) ~reporter:(Some reporter) ~uid ~neg_shift ~page_count ~protocol ~dss_f - | Interdomain (backend_domid, page_count) -> - start_interdomain - (module D) - ~reporter:(Some reporter) ~uid ~backend_domid ~page_count - ~protocol ~dss_f ) () in diff --git a/ocaml/xcp-rrdd/lib/plugin/rrdd_plugin.mli b/ocaml/xcp-rrdd/lib/plugin/rrdd_plugin.mli index 99ed8f1c047..e4eaaeecd2c 100644 --- a/ocaml/xcp-rrdd/lib/plugin/rrdd_plugin.mli +++ b/ocaml/xcp-rrdd/lib/plugin/rrdd_plugin.mli @@ -55,10 +55,6 @@ module Reporter : sig (** [Local pages] Specifies that we will be reporting data to an rrdd process in the same domain as this process, and we will be sharing [pages] with this process. *) - | Interdomain of (int * int) - (** [Interdomain (domid, pages)] specifies that we will be reporting data to - an rrdd process in domain [domid], and we will be sharing [pages] with - this domain. *) (** Abstract type of stats reporters. *) type t diff --git a/ocaml/xcp-rrdd/lib/transport/main/dune b/ocaml/xcp-rrdd/lib/transport/main/dune index 7a39e61757e..a77687e23bc 100644 --- a/ocaml/xcp-rrdd/lib/transport/main/dune +++ b/ocaml/xcp-rrdd/lib/transport/main/dune @@ -5,7 +5,6 @@ (libraries (re_export rrd_transport_lib) (re_export rrd_transport_file) - (re_export rrd_transport_page) ) ) diff --git a/ocaml/xcp-rrdd/lib/transport/main/rrd_reader.ml b/ocaml/xcp-rrdd/lib/transport/main/rrd_reader.ml index 5add3f074fc..919da9cad9d 100644 --- a/ocaml/xcp-rrdd/lib/transport/main/rrd_reader.ml +++ b/ocaml/xcp-rrdd/lib/transport/main/rrd_reader.ml @@ -18,6 +18,4 @@ type reader = Rrd_reader_functor.reader = { } include Rrd_file_reader -include Rrd_page_reader module FileReader = Rrd_file_reader -module PageReader = Rrd_page_reader diff --git a/ocaml/xcp-rrdd/lib/transport/main/rrd_writer.ml b/ocaml/xcp-rrdd/lib/transport/main/rrd_writer.ml index 584b1d9b815..18e36824bed 100644 --- a/ocaml/xcp-rrdd/lib/transport/main/rrd_writer.ml +++ b/ocaml/xcp-rrdd/lib/transport/main/rrd_writer.ml @@ -18,6 +18,4 @@ type writer = Rrd_writer_functor.writer = { } include Rrd_file_writer -include Rrd_page_writer module FileWriter = Rrd_file_writer -module PageWriter = Rrd_page_writer diff --git a/ocaml/xcp-rrdd/lib/transport/page/dune b/ocaml/xcp-rrdd/lib/transport/page/dune deleted file mode 100644 index b61de41c8bf..00000000000 --- a/ocaml/xcp-rrdd/lib/transport/page/dune +++ /dev/null @@ -1,15 +0,0 @@ -(library - (name rrd_transport_page) - (public_name rrd-transport.page) - (wrapped false) - (libraries - bigarray-compat - cstruct - io-page - rrd_transport_lib - threads.posix - xen-gnt - xen-gnt-unix - ) -) - diff --git a/ocaml/xcp-rrdd/lib/transport/page/rrd_page_reader.ml b/ocaml/xcp-rrdd/lib/transport/page/rrd_page_reader.ml deleted file mode 100644 index df2e22f3f13..00000000000 --- a/ocaml/xcp-rrdd/lib/transport/page/rrd_page_reader.ml +++ /dev/null @@ -1,75 +0,0 @@ -(* - * Copyright (C) Citrix Systems Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation; version 2.1 only. with the special - * exception on linking described in file LICENSE. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - *) - -type interdomain_id = {frontend_domid: int; shared_page_refs: int list} - -module Mutex = struct - include Mutex - - let execute lock f = - Mutex.lock lock ; - let result = try f () with e -> Mutex.unlock lock ; raise e in - Mutex.unlock lock ; result -end - -module Page = struct - open Gnt - - let interface_ref : Gnttab.interface option ref = ref None - - let interface_m = Mutex.create () - - let with_interface f = - Mutex.execute interface_m (fun () -> - let interface = - match !interface_ref with - | Some interface -> - interface - | None -> - let interface = Gnttab.interface_open () in - interface_ref := Some interface ; - interface - in - f interface - ) - - (** Remote domid * list of grant references. *) - type id_t = interdomain_id - - type state_t = Gnttab.Local_mapping.t - - let init {frontend_domid; shared_page_refs} = - let grants = - List.map - (fun ref -> {Gnttab.domid= frontend_domid; Gnttab.ref}) - shared_page_refs - in - let mapping_opt = - with_interface (fun gnttab -> Gnttab.mapv gnttab grants false) - in - match mapping_opt with - | Some mapping -> - mapping - | None -> - failwith "failed to map shared page(s)" - - let cleanup _ mapping = - with_interface (fun gnttab -> Gnttab.unmap_exn gnttab mapping) - - let expose mapping = - let buf = Gnttab.Local_mapping.to_buf mapping in - Io_page.to_cstruct buf -end - -include Rrd_reader_functor.Make (Page) diff --git a/ocaml/xcp-rrdd/lib/transport/page/rrd_page_writer.ml b/ocaml/xcp-rrdd/lib/transport/page/rrd_page_writer.ml deleted file mode 100644 index 450fd01152b..00000000000 --- a/ocaml/xcp-rrdd/lib/transport/page/rrd_page_writer.ml +++ /dev/null @@ -1,53 +0,0 @@ -(* - * Copyright (C) Citrix Systems Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation; version 2.1 only. with the special - * exception on linking described in file LICENSE. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - *) - -type interdomain_id = {backend_domid: int; shared_page_count: int} - -module Gntshr = Gnt.Gntshr - -let with_gntshr = Gntshr.with_gntshr [@@ocaml.warning "-3"] - -module Page = struct - type id_t = interdomain_id - - (** list of shared pages *) - type info_t = int list - - type state_t = Gntshr.share - - let init {backend_domid; shared_page_count} = - let share = - with_gntshr (fun gntshr -> - Gntshr.share_pages_exn gntshr backend_domid shared_page_count false - ) - in - (share.Gntshr.refs, share) - - let cleanup _ _ share = - with_gntshr (fun gntshr -> Gntshr.munmap_exn gntshr share) - - (** The allocator returns a Cstruct mapping all of the shared memory, unless - * the size requested is greater than the size of this memory in which case - * the allocator fails. *) - let get_allocator share = - let alloc_cstruct size = - let c = Io_page.to_cstruct share.Gntshr.mapping in - if size > Cstruct.length c then - failwith "not enough memory" ; - c - in - alloc_cstruct -end - -include Rrd_writer_functor.Make (Page) diff --git a/ocaml/xcp-rrdd/test/rrdd/dune b/ocaml/xcp-rrdd/test/rrdd/dune index a2f1fa93bf5..699ae424bfe 100644 --- a/ocaml/xcp-rrdd/test/rrdd/dune +++ b/ocaml/xcp-rrdd/test/rrdd/dune @@ -1,5 +1,6 @@ (test (name test_rrdd_monitor) + (modes exe) (package xapi-rrdd) (libraries alcotest diff --git a/ocaml/xe-cli/dune b/ocaml/xe-cli/dune index 22b768ce699..dede643723b 100644 --- a/ocaml/xe-cli/dune +++ b/ocaml/xe-cli/dune @@ -1,5 +1,5 @@ (executable - (modes byte exe) + (modes exe) (name newcli) (public_name xe) (package xe) diff --git a/ocaml/xen-api-client/async_examples/dune b/ocaml/xen-api-client/async_examples/dune index e5b3da830b5..7cfce054d69 100644 --- a/ocaml/xen-api-client/async_examples/dune +++ b/ocaml/xen-api-client/async_examples/dune @@ -1,5 +1,5 @@ (executable - (modes byte exe) + (modes exe) (name list_vms) (modules list_vms) (libraries @@ -18,7 +18,7 @@ ) (executable - (modes byte exe) + (modes exe) (name event_test) (modules event_test) (libraries diff --git a/ocaml/xen-api-client/lib_test/dune b/ocaml/xen-api-client/lib_test/dune index c6e08f58339..4b6bdcafb19 100644 --- a/ocaml/xen-api-client/lib_test/dune +++ b/ocaml/xen-api-client/lib_test/dune @@ -1,5 +1,5 @@ (executable - (modes byte exe) + (modes exe) (name xen_api_test) (libraries dune-build-info diff --git a/ocaml/xen-api-client/lwt_examples/dune b/ocaml/xen-api-client/lwt_examples/dune index 2b0501daf87..ba5fe7c95e2 100644 --- a/ocaml/xen-api-client/lwt_examples/dune +++ b/ocaml/xen-api-client/lwt_examples/dune @@ -1,5 +1,5 @@ (executable - (modes byte exe) + (modes exe) (name list_vms) (modules list_vms) (libraries @@ -15,7 +15,7 @@ ) (executable - (modes byte exe) + (modes exe) (name upload_disk) (modules upload_disk) (libraries @@ -32,7 +32,7 @@ ) (executable - (modes byte exe) + (modes exe) (name watch_metrics) (modules watch_metrics) (libraries diff --git a/ocaml/xenopsd/test/dune b/ocaml/xenopsd/test/dune index 914313172d9..871ad4832a7 100644 --- a/ocaml/xenopsd/test/dune +++ b/ocaml/xenopsd/test/dune @@ -1,5 +1,6 @@ (test (name test) + (modes exe) (package xapi-xenopsd) (libraries alcotest diff --git a/ocaml/xenopsd/xc/dune b/ocaml/xenopsd/xc/dune index 6b5659ca3a4..55992a74f8b 100644 --- a/ocaml/xenopsd/xc/dune +++ b/ocaml/xenopsd/xc/dune @@ -60,6 +60,7 @@ ) (executable (name xenops_xc_main) + (modes exe) (public_name xenopsd-xc) (package xapi-xenopsd-xc) (modules xenops_xc_main) @@ -81,6 +82,7 @@ (executable (name memory_breakdown) + (modes exe) (modules memory_breakdown) (libraries astring @@ -99,6 +101,7 @@ (executable (name memory_summary) + (modes exe) (modules memory_summary) (libraries dune-build-info @@ -111,6 +114,7 @@ (executable (name domain_sethandle) + (modes exe) (modules domain_sethandle) (libraries cmdliner @@ -121,6 +125,7 @@ (executable (name cancel_utils_test) + (modes exe) (modules cancel_utils_test) (libraries cmdliner diff --git a/ocaml/xenopsd/xc/xenops_server_xen.ml b/ocaml/xenopsd/xc/xenops_server_xen.ml index 70114ccdbf0..781ca1bbe93 100644 --- a/ocaml/xenopsd/xc/xenops_server_xen.ml +++ b/ocaml/xenopsd/xc/xenops_server_xen.ml @@ -5124,27 +5124,6 @@ module Actions = struct qemu_disappeared di xc xs ; Updates.add (Dynamic.Vm id) internal_updates in - let register_rrd_plugin ~domid ~name ~grant_refs ~protocol = - debug - "Registering RRD plugin: frontend_domid = %d, name = %s, refs = [%s]" - domid name - (List.map string_of_int grant_refs |> String.concat ";") ; - let uid = {Rrd_interface.name; frontend_domid= domid} in - let info = - { - Rrd_interface.frequency= Rrd.Five_Seconds - ; shared_page_refs= grant_refs - } - in - let (_ : float) = RRDD.Plugin.Interdomain.register uid info protocol in - () - in - let deregister_rrd_plugin ~domid ~name = - debug "Deregistering RRD plugin: frontend_domid = %d, name = %s" domid - name ; - let uid = {Rrd_interface.name; frontend_domid= domid} in - RRDD.Plugin.Interdomain.deregister uid - in match Astring.String.cuts ~empty:false ~sep:"/" path with | "local" :: "domain" @@ -5164,41 +5143,6 @@ module Actions = struct maybe_update_pv_drivers_detected ~xc ~xs (int_of_string frontend) path | "local" :: "domain" :: frontend :: "device" :: _ -> look_for_different_devices (int_of_string frontend) - | ["local"; "domain"; domid; "rrd"; name; "ready"] -> ( - debug "Watch picked up an RRD plugin: domid = %s, name = %s" domid name ; - try - let grant_refs_path = - Printf.sprintf "/local/domain/%s/rrd/%s/grantrefs" domid name - in - let protocol_path = - Printf.sprintf "/local/domain/%s/rrd/%s/protocol" domid name - in - let grant_refs = - xs.Xs.read grant_refs_path - |> Astring.String.cuts ~sep:"," - |> List.map int_of_string - in - let protocol = - xs.Xs.read protocol_path |> Rrd_interface.protocol_of_string - in - register_rrd_plugin ~domid:(int_of_string domid) ~name ~grant_refs - ~protocol - with e -> - debug "Failed to register RRD plugin: caught %s" (Printexc.to_string e) - ) - | ["local"; "domain"; domid; "rrd"; name; "shutdown"] -> - let value = - try Some (xs.Xs.read path) with Xs_protocol.Enoent _ -> None - in - if value = Some "true" then ( - debug "RRD plugin has announced shutdown: domid = %s, name = %s" domid - name ; - safe_rm xs (Printf.sprintf "local/domain/%s/rrd/%s" domid name) ; - try deregister_rrd_plugin ~domid:(int_of_string domid) ~name - with e -> - debug "Failed to deregister RRD plugin: caught %s" - (Printexc.to_string e) - ) | ["local"; "domain"; domid; "qemu-pid-signal"] -> fire_event_on_qemu domid | "local" :: "domain" :: domid :: _ -> diff --git a/ocaml/xsh/dune b/ocaml/xsh/dune index 73eac32f8db..13fc1e74c46 100644 --- a/ocaml/xsh/dune +++ b/ocaml/xsh/dune @@ -1,5 +1,5 @@ (executable - (modes byte exe) + (modes exe) (name xsh) (public_name xsh) (package xapi) diff --git a/ocaml/xxhash/stubs/dune b/ocaml/xxhash/stubs/dune index 478fc669eba..7eb0dcd7d98 100644 --- a/ocaml/xxhash/stubs/dune +++ b/ocaml/xxhash/stubs/dune @@ -1,5 +1,5 @@ (executable - (modes byte exe) + (modes exe) (name xxhash_stubgen) (libraries ctypes.stubs diff --git a/quality-gate.sh b/quality-gate.sh index 85f40726976..ea3dd5ba7af 100755 --- a/quality-gate.sh +++ b/quality-gate.sh @@ -25,7 +25,7 @@ verify-cert () { } mli-files () { - N=522 + N=519 # do not count ml files from the tests in ocaml/{tests/perftest/quicktest} MLIS=$(git ls-files -- '**/*.mli' | grep -vE "ocaml/tests|ocaml/perftest|ocaml/quicktest" | xargs -I {} sh -c "echo {} | cut -f 1 -d '.'" \;) MLS=$(git ls-files -- '**/*.ml' | grep -vE "ocaml/tests|ocaml/perftest|ocaml/quicktest" | xargs -I {} sh -c "echo {} | cut -f 1 -d '.'" \;) diff --git a/rrd-transport.opam b/rrd-transport.opam index cc458e95c4f..7ee89006fae 100644 --- a/rrd-transport.opam +++ b/rrd-transport.opam @@ -17,8 +17,6 @@ depends: [ "yojson" "xapi-idl" {>= "1.0.0"} "xapi-rrd" {>= "1.0.0"} - "xen-gnt" {>= "3.0.0"} - "xen-gnt-unix" {>= "3.0.0"} "ounit" {with-test} ] synopsis: "Shared-memory protocols for exposing performance counters" diff --git a/unixpwd/test/dune b/unixpwd/test/dune index 77d360eedad..a4bef581358 100644 --- a/unixpwd/test/dune +++ b/unixpwd/test/dune @@ -1,5 +1,5 @@ (executable - (modes byte exe) + (modes exe) (name main) (libraries unixpwd_stubs