Skip to content

Epoll: the rest of the changes #5706

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
1ff083a
CA-389241: import-update-key compatible with xs8 and xs9
liulinC Mar 7, 2024
b11f678
Merge pull request #5483 from liulinC/private/linl/dev
liulinC Mar 8, 2024
3d5f055
Merge branch 'master' into private/linl/dev
liulinC Mar 21, 2024
4b83c2f
Merge pull request #5525 from liulinC/private/linl/dev
psafont Mar 21, 2024
d1a3219
CP-46944: Update yum plugins to dnf plugins (#5526)
liulinC Mar 26, 2024
6626e2c
Routine feature branch sync (#5531)
liulinC Mar 26, 2024
e1f14a7
CP-45921: Use dnf as package manager for XS9 (#5534)
liulinC Apr 3, 2024
a24f80b
CP-48221: Support new gpg for XS9 (#5543)
liulinC Apr 9, 2024
480b2ed
Merge remote-tracking branch 'master' into feature/xs9
liulinC Apr 11, 2024
6eace03
Merge pull request #5553 from xapi-project/private/linl/sync
psafont Apr 11, 2024
ca8ddc4
Update update.precheck/apply to be compatible with yum and dnf (#5564)
liulinC Apr 18, 2024
cdef56c
Merge remote-tracking branch 'ogh/master' into feature/xs9
liulinC Apr 18, 2024
3921246
Merge pull request #5568 from liulinC/private/linl/sync
liulinC Apr 18, 2024
ff08a18
Refactor watcher creation code
Vincent-lau May 22, 2024
733882a
Only create watcher once
Vincent-lau May 22, 2024
e612873
Refactor cluster change watcher interval
Vincent-lau Jun 19, 2024
af142fc
Add new internal API cstack_sync
Vincent-lau Jun 20, 2024
3dc79e0
CP-394109: Alert only once for cluster host leave/join
Vincent-lau Jun 19, 2024
cca43a4
Feature flag the cstack_sync call
Vincent-lau Jul 10, 2024
7279089
Merge pull request #5696 from Vincent-lau/private/shul2/less-alert
Vincent-lau Jul 10, 2024
3c41333
Merge pull request #5760 from xapi-project/feature/perf
edwintorok Jul 10, 2024
d8fa301
CP-50193: Update new fingerprint fields on DB upgrade
snwoods Jul 9, 2024
55963c4
CP-50108: Use Ipaddr instead of string-based CIDR handling
Jul 8, 2024
f0721d8
Merge branch 'master' into private/stephenche/sync_xs9_with_master
stephenchengCloud Jul 12, 2024
240a56c
Fix pytype warnings.
stephenchengCloud Jul 12, 2024
9bf0e46
Merge pull request #5814 from stephenchengCloud/private/stephenche/sy…
gangj Jul 12, 2024
471141d
dune: fix tests to packages
psafont Jul 12, 2024
527f57c
CP-50259 simplify raising error in record_util
Jul 12, 2024
ef15273
Refactor to use List apis
Vincent-lau Jul 5, 2024
0416e2a
Add new check for new parameters' default value
Vincent-lau Jul 5, 2024
34a8249
Refactored HTTP_actions template.
kc284 Dec 18, 2023
423ae3b
Merge pull request #5817 from psafont/packs
psafont Jul 12, 2024
2e59029
CP-50259 simplify parsing size with kib, mib, etc suffix
Jul 12, 2024
d204656
Update datamodel lifecycle
robhoes Jul 12, 2024
f0bbfa5
fixup! CP-50259 simplify parsing size with kib, mib, etc suffix
Jul 12, 2024
2aea851
xapi-cli-server: simplifications around error handling
psafont Nov 14, 2023
29aa477
xapi-cli-server: remove function s2sm to serialize data
psafont Mar 20, 2024
c46c5dc
xapi-cli-server: remove function s2brm to serialize data
psafont Mar 20, 2024
a0d4141
CP-49101: Fix pylint error
liulinC Jul 15, 2024
e0b95c3
CA-395626: Fix (server status report generation report)
Jul 15, 2024
4c29106
CP-50078: Instrument xapi-storage-script with tracing (#5808)
Jul 15, 2024
fd0818d
context: `complete_tracing` should be called last
GabrielBuica Jun 25, 2024
9ddaf75
context: catch error inside span
GabrielBuica Jun 26, 2024
174b597
tracing: Instrument task related functionality
GabrielBuica Jun 20, 2024
1e619ab
time: use `Date.now` over `Unix.time` in `taskHelper.ml`
GabrielBuica Jul 1, 2024
dcf558f
Merge pull request #5823 from psafont/private/paus/scrub
psafont Jul 15, 2024
d496db1
formatting: Use `let@` and `match` statements.
GabrielBuica Jul 1, 2024
0f45257
CA-395626: Add a unit test to detect incorrect cookie parsing
Jul 15, 2024
367e833
Merge pull request #5831 from liulinC/private/linl/dev
liulinC Jul 15, 2024
66f5896
quicktest: associate unit-test with xapi package
psafont Jul 15, 2024
de34718
CP-50270: Set the correct parent in `make_connection`
GabrielBuica Jul 15, 2024
8689af4
gen_empty_custom: avoid wildcards for actions
psafont Mar 28, 2024
fbcc033
Merge pull request #5834 from GabrielBuica/private/dbuica/CP-50270
edwintorok Jul 15, 2024
42fb801
Merge pull request #5832 from last-genius/private/asultanov/query-fix
edwintorok Jul 15, 2024
c6984ad
CA-390277: Add API to fetch references matching a query
psafont Mar 28, 2024
caadaf2
xapi-cli-server: use helper remote in migrate function
psafont Jul 3, 2024
ba47a87
CA-390277: Reduce record usage on CLI cross-pool migrations
psafont Mar 28, 2024
d7ce84f
Merge pull request #5833 from psafont/metacap
psafont Jul 15, 2024
a91635e
Merge pull request #5784 from Vincent-lau/private/shul2/check-param
Vincent-lau Jul 15, 2024
259fb4e
Refactor: Move to default optional parameters when they were reimplem…
Jul 4, 2024
1f80e89
Moved PS destructors to a template.
kc284 Dec 18, 2023
04c1055
Merge pull request #5816 from xapi-project/feature/xs9
liulinC Jul 16, 2024
972090a
Add -run-only and -list-tests parameters to quicktests
Jul 11, 2024
e8d9e67
CP-50079: Add correct cookie parsing alongside the old style
Jul 12, 2024
f42840c
CP-50079: Expands http quicktests to also check parsing of cookies.
Jul 12, 2024
aa02b52
CP-50079: Remove legacy sync_config_files interface
Jul 12, 2024
a0464a7
CP-50079: Remove unused unixpwd function and its associated tests
Jul 15, 2024
cbd156c
Merge pull request #5773 from psafont/getallwhere
psafont Jul 16, 2024
0c65928
Merge pull request #5735 from GabrielBuica/private/dbuica/CA-394169-t…
robhoes Jul 16, 2024
bd222d0
Merge pull request #5554 from kc284/private/konstantin1/sdk-ps
kc284 Jul 16, 2024
c8c8d4d
quality-gate: fix list.hd
psafont Jul 16, 2024
69768f5
Merge pull request #5844 from psafont/qgate
psafont Jul 16, 2024
28b16f4
CP-49811: Remove redundant method object from span name
snwoods Jul 16, 2024
4a06135
CA-395784: fix(xapi-fd-test): do not generate <1us timeouts
edwintorok Jul 16, 2024
f4f3a7f
CA-395784: fix(xapi-fd-test): timeouts get converted to microseconds,…
edwintorok Jul 15, 2024
80a66c8
Merge pull request #5840 from snwoods/private/stevenwo/CP-49811
bernhardkaindl Jul 16, 2024
c70d3de
CA-395784: fix(buf_io_test): the timeout is per read, not per functio…
edwintorok Jul 15, 2024
b8b5fd0
Merge pull request #5838 from edwintorok/private/edvint/fix-timeouts
edwintorok Jul 16, 2024
bb43199
CP-32622: Replace select in buf_io
snwoods Jan 10, 2023
a491af3
CP-47536: replace select in ezxenstore with Delay module
edwintorok May 23, 2024
c85179c
CP-47536: Drop posix_channel and channel_helper: unused and a mix of …
edwintorok May 23, 2024
14eca11
CP-47536: replace Protocol_unix.scheduler.Delay with Threadext.Delay
edwintorok May 10, 2024
917b077
CP-49499: Introduce 'Timer' and 'Timeout' modules in Unixext.
edwintorok May 13, 2024
e6c03c8
Fix Short/Long duration printing
edwintorok Jul 1, 2024
67d3d3e
CP-49499: Unixext.time_limited_{read,write}: use Timer.t for deadlines
edwintorok May 10, 2024
edda3d0
CP-32622: Replace select with polly in xn
snwoods Jan 4, 2023
99d6481
CP-32622: Replace select with polly in xsh
snwoods Jan 4, 2023
bc0adf2
fix(xapi-idl): replace another Thread.wait_timed_read
edwintorok Jun 10, 2024
82b2fb0
fix(xapi-idl): replace PipeDelay with Delay, avoid another Thread.wai…
edwintorok Jun 10, 2024
7092511
fix(master_connection): avoid Thread.wait_timed_read, just as bad as …
edwintorok Jun 10, 2024
9e638c6
forkexecd: do not clip commandline in logs
edwintorok Jul 3, 2024
9256dc3
CP-47536: use Unixext.time_limited_read/write in Jsonrpcclient
edwintorok May 10, 2024
9a70864
[TODO: timer] CP-32622: Replace select with polly in xe-cli. Remove r…
snwoods Jan 4, 2023
9c25154
CP-47536: convert block_device_io to use SO_RCVTIMEO instead of select
edwintorok May 23, 2024
df3cc5f
test: add a script that checks that we do not call unix_select from X…
edwintorok Jun 18, 2024
e130edd
epoll: increase default fd open limit
edwintorok May 30, 2024
01ebbab
Test for absence of select: enable open_1024 in tests
edwintorok Jul 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/other.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ jobs:
--cov-report xml:.git/coverage${{matrix.python-version}}.xml
env:
PYTHONDEVMODE: yes
PYTHONPATH: "python3:python3/tests/stubs"

- name: Upload coverage report to Coveralls
uses: coverallsapp/github-action@v2
Expand Down
12 changes: 6 additions & 6 deletions doc/content/xapi/guides/howtos/add-field.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
+++
title = "Adding a field to the API"
+++
This page describes how to add a field to XenAPI. A field is a parameter of a class that can be used in functions and read from the API.
This page describes how to add a field to XenAPI. A field is a parameter of a class that can be used in functions and read from the API.

Bumping the database schema version
-----------------------------------
Expand Down Expand Up @@ -34,15 +34,15 @@ new API fields used for ActiveDirectory integration were added:

(* IMPORTANT: Please bump schema vsn if you change/add/remove a _field_.
You do not have to dump vsn if you change/add/remove a message *)

let schema_major_vsn = 5
-let schema_minor_vsn = 55
+let schema_minor_vsn = 56

(* Historical schema versions just in case this is useful later *)
let rio_schema_major_vsn = 5
let rio_schema_minor_vsn = 19

+let miami_release_schema_major_vsn = 5
+let miami_release_schema_minor_vsn = 35
+
Expand Down Expand Up @@ -95,7 +95,7 @@ See datamodel_types.ml for information about other parameters.
Adding a field would change the constructors for the class – functions
Db.*.create – and therefore, any references to these in the code need to be
updated. In the example, the argument ~ha_enabled:false should be added to any
call to Db.Pool.create.
call to Db.Pool.create.

Examples of where these calls can be found is in `ocaml/tests/common/test_common.ml` and `ocaml/xapi/xapi_[class].ml`.

Expand All @@ -113,7 +113,7 @@ if you don't want this field to show up in a *_params_list call. As an example,
here is a field that we've just added to the SM class:

make_field ~name:"versioned-capabilities"
~get:(fun () -> Record_util.s2sm_to_string "; " (x ()).API.sM_versioned_capabilities)
~get:(fun () -> get_from_map (x ()).API.sM_versioned_capabilities)
~get_map:(fun () -> (x ()).API.sM_versioned_capabilities)
~hidden:true ();

Expand Down
45 changes: 26 additions & 19 deletions ocaml/database/block_device_io.ml
Original file line number Diff line number Diff line change
Expand Up @@ -325,16 +325,19 @@ let listen_on sock =
s

let accept_conn s latest_response_time =
let now = Unix.gettimeofday () in
let timeout = latest_response_time -. now in
(* Await an incoming connection... *)
let ready_to_read, _, _ = Unix.select [s] [] [] timeout in
R.info "Finished selecting" ;
if List.mem s ready_to_read then
(* We've received a connection. Accept it and return the socket. *)
fst (Unix.accept s)
else (* We must have timed out *)
raise Unixext.Timeout
match Clock.Timer.remaining latest_response_time with
| Expired _ ->
raise Unixext.Timeout
| Remaining timeout -> (
(* Await an incoming connection... *)
let timeout = Float.max 1e-6 @@ Clock.Timer.span_to_s timeout in
Unixext.with_socket_timeout s (Some timeout) @@ fun () ->
try
(* We've received a connection. Accept it and return the socket. *)
fst (Unix.accept s)
with Unix.(Unix_error ((EAGAIN | EWOULDBLOCK), _, _)) ->
raise Unixext.Timeout
)

(* Listen on a given socket. Accept a single connection and transfer all the data from it to dest_fd, or raise Timeout if target_response_time happens first. *)
(* Raises NotEnoughSpace if the next write would exceed the available_space. *)
Expand Down Expand Up @@ -731,6 +734,8 @@ let dump = ref false

let empty = ref false

let target_response_time delta = Clock.Timer.start ~duration:delta

let _ =
(* Initialise debug logging *)
initialise_logging () ;
Expand Down Expand Up @@ -770,11 +775,12 @@ let _ =
(* Open the block device *)
let block_dev_fd =
open_block_device !block_dev
(Unix.gettimeofday () +. !Db_globs.redo_log_max_startup_time)
(target_response_time !Db_globs.redo_log_max_startup_time)
in
R.info "Opened block device." ;
let target_response_time = Unix.gettimeofday () +. 3600. in
(* Read the validity byte *)
let target_response_time =
target_response_time !Db_globs.redo_log_max_connect_time
in
try
let validity = read_validity_byte block_dev_fd target_response_time in
Printf.printf "*** Validity byte: [%s]\n" validity ;
Expand Down Expand Up @@ -841,10 +847,12 @@ let _ =
(* Open the block device *)
let block_dev_fd =
open_block_device !block_dev
(Unix.gettimeofday () +. !Db_globs.redo_log_max_startup_time)
(target_response_time !Db_globs.redo_log_max_startup_time)
in
R.info "Opened block device." ;
let target_response_time = Unix.gettimeofday () +. 3600. in
let target_response_time =
target_response_time !Db_globs.redo_log_max_connect_time
in
initialise_redo_log block_dev_fd target_response_time ;
Printf.printf "Block device initialised.\n"
) ;
Expand All @@ -855,9 +863,8 @@ let _ =
let s = listen_on !ctrlsock in
(* Main loop: accept a new client, communicate with it until it stops sending commands, repeat. *)
while true do
let start_of_startup = Unix.gettimeofday () in
let target_startup_response_time =
start_of_startup +. !Db_globs.redo_log_max_startup_time
target_response_time !Db_globs.redo_log_max_startup_time
in
R.info "Awaiting incoming connections on %s..." !ctrlsock ;
let client = accept_conn s target_startup_response_time in
Expand Down Expand Up @@ -898,11 +905,11 @@ let _ =
send_failure client (str ^ "|nack")
("Unknown command " ^ str)
)
, 0.
, Mtime.Span.zero
)
in
(* "Start the clock!" -- set the latest time by which we need to have responded to the client. *)
let target_response_time = Unix.gettimeofday () +. block_time in
let target_response_time = target_response_time block_time in
action_fn block_dev_fd client !datasock target_response_time
with
(* this must be an exception in Unixext.really_read because action_fn doesn't throw exceptions *)
Expand Down
15 changes: 9 additions & 6 deletions ocaml/database/db_globs.ml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,22 @@
let redo_log_block_device_io = ref "block_device_io"

(** The delay between each attempt to connect to the block device I/O process *)
let redo_log_connect_delay = ref 0.1
let redo_log_connect_delay = ref Mtime.Span.(100 * ms)

(** The maximum time, in seconds, for which we are prepared to wait for a response from the block device I/O process before assuming that it has died while emptying *)
let redo_log_max_block_time_empty = ref 2.
let redo_log_max_block_time_empty = ref Mtime.Span.(2 * s)

(** The maximum time, in seconds, for which we are prepared to wait for a response from the block device I/O process before assuming that it has died while reading *)
let redo_log_max_block_time_read = ref 30.
let redo_log_max_block_time_read = ref Mtime.Span.(30 * s)

(** The maximum time, in seconds, for which we are prepared to wait for a response from the block device I/O process before assuming that it has died while writing a delta *)
let redo_log_max_block_time_writedelta = ref 2.
let redo_log_max_block_time_writedelta = ref Mtime.Span.(2 * s)

(** The maximum time, in seconds, for which we are prepared to wait for a response from the block device I/O process before assuming that it has died while writing a database *)
let redo_log_max_block_time_writedb = ref 30.
let redo_log_max_block_time_writedb = ref Mtime.Span.(30 * s)

(** The maximum amount of time to wait for a connection (used to be hardcoded to 3600s) *)
let redo_log_max_connect_time = ref Mtime.Span.(1 * hour)

(** {3 Settings related to the exponential back-off of repeated attempts to reconnect after failure} *)

Expand All @@ -35,7 +38,7 @@ let redo_log_max_dying_processes = 2
let redo_log_comms_socket_stem = "sock-blkdev-io"

(** The maximum time, in seconds, for which we are prepared to wait for a response from the block device I/O process before assuming that it has died while initially connecting to it *)
let redo_log_max_startup_time = ref 5.
let redo_log_max_startup_time = ref Mtime.Span.(5 * s)

(** The length, in bytes, of one redo log which constitutes half of the VDI *)
let redo_log_length_of_half = 60 * 1024 * 1024
Expand Down
7 changes: 7 additions & 0 deletions ocaml/database/dune
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@
test_schemas unit_test_marshall unit_test_sql))
(libraries
forkexec
fmt
gzip
mtime
mtime.clock
mtime.clock.os
rpclib.core
rpclib.json
safe-resources
Expand Down Expand Up @@ -61,6 +65,9 @@
(modules block_device_io)
(libraries
dune-build-info
mtime
mtime.clock
mtime.clock.os
xapi_database
xapi-log
xapi-stdext-pervasives
Expand Down
6 changes: 5 additions & 1 deletion ocaml/database/master_connection.ml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,11 @@ let open_secure_connection () =
~write_to_log:(fun x -> debug "stunnel: %s\n" x)
~verify_cert host port
@@ fun st_proc ->
let fd_closed = Thread.wait_timed_read Unixfd.(!(st_proc.Stunnel.fd)) 5. in
let fd_closed =
Xapi_stdext_unix.Unixext.wait_timed_read
Unixfd.(!(st_proc.Stunnel.fd))
Mtime.Span.(5 * s)
in
let proc_quit =
try
Unix.kill (Stunnel.getpid st_proc.Stunnel.pid) 0 ;
Expand Down
39 changes: 20 additions & 19 deletions ocaml/database/redo_log.ml
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,7 @@ let generation_size = 16

let length_size = 16

let get_latest_response_time block_time =
let now = Unix.gettimeofday () in
now +. block_time
let get_latest_response_time block_time = Clock.Timer.start ~duration:block_time

(* Returns the PID of the process *)
let start_io_process block_dev ctrlsockpath datasockpath =
Expand All @@ -265,26 +263,29 @@ let connect sockpath latest_response_time =
Unix.connect s (Unix.ADDR_UNIX sockpath) ;
D.debug "Connected to I/O process via socket %s" sockpath ;
s
with Unix.Unix_error (a, b, _) ->
with Unix.Unix_error (a, b, _) -> (
(* It's probably the case that the process hasn't started yet. *)
(* See if we can afford to wait and try again *)
Unix.close s ;
let attempt_delay = !Db_globs.redo_log_connect_delay in
let now = Unix.gettimeofday () in
let remaining = latest_response_time -. now in
if attempt_delay < remaining then (
(* Wait for a while then try again *)
D.debug
"Waiting to connect to I/O process via socket %s (error was %s: \
%s)..."
sockpath b (Unix.error_message a) ;
D.debug "Remaining time for retries: %f" remaining ;
Thread.delay attempt_delay ;
attempt ()
) else (
D.debug "%s timeout reached" __FUNCTION__ ;
raise Unixext.Timeout
)
match
Clock.Timer.remaining
(Clock.Timer.shorten_by attempt_delay latest_response_time)
with
| Remaining remaining ->
(* Wait for a while then try again *)
D.debug
"Waiting to connect to I/O process via socket %s (error was %s: \
%s)..."
sockpath b (Unix.error_message a) ;
D.debug "Remaining time for retries: %a" Debug.Pp.mtime_span remaining ;
Unixext.delay_span attempt_delay ;
attempt ()
| Expired overrun ->
D.debug "%s timeout reached (%a overrun)" __FUNCTION__
Debug.Pp.mtime_span overrun ;
raise Unixext.Timeout
)
in
attempt ()

Expand Down
2 changes: 1 addition & 1 deletion ocaml/database/redo_log.mli
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ type t =
represents the write to the field with name [fldname] of a row in table [tblname] with key [objref], overwriting its value with [newval]. *)

val apply :
(Generation.t -> Unix.file_descr -> int -> float -> unit)
(Generation.t -> Unix.file_descr -> int -> Clock.Timer.t -> unit)
-> (Generation.t -> t -> unit)
-> [< `RO | `RW] redo_log
-> unit
Expand Down
9 changes: 1 addition & 8 deletions ocaml/forkexecd/src/child.ml
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,7 @@ let handle_comms comms_sock fd_sock state =
let log_failure args child_pid reason =
(* The commandline might be too long to clip it *)
let cmdline = String.concat " " args in
let limit = 80 - 3 in
let cmdline' =
if String.length cmdline > limit then
String.sub cmdline 0 limit ^ "..."
else
cmdline
in
Fe_debug.error "%d (%s) %s" child_pid cmdline' reason
Fe_debug.error "%d (%s) %s" child_pid cmdline reason

let report_child_exit comms_sock args child_pid status =
let module Unixext = Xapi_stdext_unix.Unixext in
Expand Down
4 changes: 2 additions & 2 deletions ocaml/idl/datamodel_certificate.ml
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ let t =
[(Published, rel_stockholm, ""); (Deprecated, "24.19.0", "")]
~ty:String "fingerprint" ~default_value:(Some (VString ""))
"Use fingerprint_sha256 instead"
; field ~qualifier:StaticRO ~lifecycle ~ty:String "fingerprint_sha256"
; field ~qualifier:StaticRO ~lifecycle:[] ~ty:String "fingerprint_sha256"
~default_value:(Some (VString ""))
"The certificate's SHA256 fingerprint / hash"
; field ~qualifier:StaticRO ~lifecycle ~ty:String "fingerprint_sha1"
; field ~qualifier:StaticRO ~lifecycle:[] ~ty:String "fingerprint_sha1"
~default_value:(Some (VString ""))
"The certificate's SHA1 fingerprint / hash"
]
Expand Down
11 changes: 11 additions & 0 deletions ocaml/idl/datamodel_cluster.ml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,16 @@ let pool_resync =
~params:[(Ref _cluster, "self", "The cluster to resync")]
~lifecycle ~allowed_roles:_R_POOL_OP ~errs:[] ()

let cstack_sync =
call ~name:"cstack_sync"
~doc:
"Sync xapi db with the cluster stack synchronously, and generate alerts \
as needed. Only happens on the coordinator as this is where the cluster \
watcher performs updates."
~params:[(Ref _cluster, "self", "The cluster to sync")]
~hide_from_docs:true ~pool_internal:true ~lifecycle
~allowed_roles:_R_POOL_OP ~errs:[] ()

let t =
create_obj ~name:_cluster ~descr:"Cluster-wide Cluster metadata"
~doccomments:[] ~gen_constructor_destructor:false ~gen_events:true
Expand Down Expand Up @@ -245,5 +255,6 @@ let t =
; pool_force_destroy
; pool_destroy
; pool_resync
; cstack_sync
]
()
2 changes: 1 addition & 1 deletion ocaml/idl/datamodel_common.ml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ open Datamodel_roles
to leave a gap for potential hotfixes needing to increment the schema version.*)
let schema_major_vsn = 5

let schema_minor_vsn = 779
let schema_minor_vsn = 780

(* Historical schema versions just in case this is useful later *)
let rio_schema_major_vsn = 5
Expand Down
Loading
Loading