Skip to content

Commit 7122cd0

Browse files
authored
Merge branch master into feature/host-network-device-ordering (#6701)
2 parents ea80a89 + 9e24cd0 commit 7122cd0

File tree

222 files changed

+876
-589
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

222 files changed

+876
-589
lines changed

.git-blame-ignore-revs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ d6ab15362548b8fe270bd14d5153b8d94e1b15c0
3232
b12cf444edea15da6274975e1b2ca6a7fce2a090
3333
364c27f5d18ab9dd31825e67a93efabecad06823
3434
d8b4de9076531dd13bdffa20cc10c72290a52356
35+
bdf06bca7534fbc0c4fc3cee3408a51a22615226
3536

3637
# ocp-indent
3738
d018d26d6acd4707a23288b327b49e44f732725e

dune-project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(lang dune 3.15)
1+
(lang dune 3.20)
22

33
(formatting
44
(enabled_for ocaml))

ocaml/database/db_cache_impl.ml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -482,24 +482,24 @@ let spawn_db_flush_threads () =
482482
try
483483
Thread.delay Db_backend.db_FLUSH_TIMER ;
484484
(* If I have some writing capacity left in this write period then consider doing a write; or
485-
if the connection is not write-limited then consider doing a write too.
486-
We also have to consider doing a write if exit_on_next_flush is set: because when this is
487-
set (by a signal handler) we want to do a flush whether or not our write limit has been
488-
exceeded.
485+
if the connection is not write-limited then consider doing a write too.
486+
We also have to consider doing a write if exit_on_next_flush is set: because when this is
487+
set (by a signal handler) we want to do a flush whether or not our write limit has been
488+
exceeded.
489489
*)
490+
(* always flush straight away; this request is urgent
491+
otherwise, we only write if
492+
(i) "coalesscing period has come to an end"; and
493+
(ii) "write limiting requirements are met": *)
490494
( if
491495
!Db_connections.exit_on_next_flush
492-
(* always flush straight away; this request is urgent *)
493-
|| (* otherwise, we only write if (i) "coalesscing period has come to an end"; and (ii) "write limiting requirements are met": *)
494-
(not (in_coallescing_period ()))
495-
(* see (i) above *)
496-
&& (!my_writes_this_period
497-
< dbconn.Parse_db_conf.write_limit_write_cycles
498-
|| dbconn.Parse_db_conf.mode
499-
= Parse_db_conf.No_limit
500-
(* (ii) above *)
501-
)
502-
then (* debug "[%s] considering flush" db_path; *)
496+
|| (not (in_coallescing_period ()))
497+
&& (!my_writes_this_period
498+
< dbconn.Parse_db_conf.write_limit_write_cycles
499+
|| dbconn.Parse_db_conf.mode
500+
= Parse_db_conf.No_limit
501+
)
502+
then
503503
let was_anything_flushed =
504504
Xapi_stdext_threads.Threadext.Mutex.execute
505505
Db_lock.global_flush_mutex (fun () ->
@@ -509,7 +509,7 @@ let spawn_db_flush_threads () =
509509
if was_anything_flushed then (
510510
my_writes_this_period := !my_writes_this_period + 1 ;
511511
(* when we do a write, reset the coallesce_period_start to now -- recall that this
512-
variable tracks the time since last write *)
512+
variable tracks the time since last write *)
513513
coallesce_period_start := Unix.gettimeofday ()
514514
)
515515
) ;

ocaml/database/db_secret_string.mli

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
*)
1414

1515
(* Prevent direct conversions to string to avoid accidental misuse.
16-
* It is still possible to convert it to Rpc.t and recover it that way,
17-
* it is not a protection against willfully recovering the protected string
18-
* (we do need to send these as parameters in RPCs).
19-
* *)
16+
It is still possible to convert it to Rpc.t and recover it that way,
17+
it is not a protection against willfully recovering the protected string
18+
(we do need to send these as parameters in RPCs).
19+
*)
2020

2121
(** a type with no direct conversions to string *)
2222
type t

ocaml/database/dune

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
threads.posix
5252
http_lib
5353
httpsvr
54+
unix
5455
uuid
5556
xapi-backtrace
5657
xapi-datamodel
@@ -78,6 +79,7 @@
7879
(name block_device_io)
7980
(modules block_device_io)
8081
(libraries
82+
unix
8183
xapi_database
8284
xapi-log
8385
xapi-stdext-pervasives
@@ -98,6 +100,7 @@
98100
http_lib
99101
httpsvr
100102
threads.posix
103+
unix
101104
xapi_database
102105
xapi-stdext-threads
103106
xapi-stdext-unix))
@@ -113,6 +116,7 @@
113116
rpclib.xml
114117
sexplib
115118
sexplib0
119+
unix
116120
xapi_database
117121
xml-light2))
118122

ocaml/doc/dune

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
mustache
66
rpclib.core
77
rpclib.json
8+
unix
89
uuid
910
xapi-consts
1011
xapi-datamodel

ocaml/forkexecd/cli/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
(executable
22
(modes exe)
33
(name fe_cli)
4-
(libraries forkexec))
4+
(libraries forkexec unix))
55

66
(install
77
(package xapi-forkexecd)

ocaml/forkexecd/lib/dune

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
rpclib.core
1111
rpclib.json
1212
rpclib.xml
13+
unix
1314
uuid
1415
xapi-backtrace
1516
xapi-log

ocaml/forkexecd/lib/fe_systemctl.ml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,10 @@ let show ~service =
107107
let stop ~service =
108108
action ~service "stop" ;
109109
(* Stopping shouldn't fail because it should fall back to SIGKILL which should almost always work,
110-
* unless there is a kernel bug that keeps a process stuck.
111-
* In the unlikely scenario that this does fail we leave the transient service file behind
112-
* so that the failure can be investigated.
113-
* *)
110+
unless there is a kernel bug that keeps a process stuck.
111+
In the unlikely scenario that this does fail we leave the transient service file behind
112+
so that the failure can be investigated.
113+
*)
114114
let status = show ~service in
115115
(* allow systemd to garbage-collect the status and the unit, preventing leaks.
116116
* See CollectMode in systemd.unit(5) for details. *)
@@ -162,7 +162,7 @@ let start_transient ?env ?properties ?(exec_ty = Type.Simple) ~service cmd args
162162
(* If start failed we do not know what state the service is in:
163163
* try to stop it and clean up.
164164
* Stopping could fail as well, in which case report the original exception.
165-
* *)
165+
*)
166166
( try
167167
let (_ : status) = stop ~service in
168168
()

ocaml/forkexecd/src/child.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ let run state comms_sock fd_sock fd_sock_path =
274274
let (_ : int list) = Unix.sigprocmask Unix.SIG_BLOCK [Sys.sigchld] in
275275

276276
(* First test whether the child has exited - if it has then report this
277-
* via the socket and exit. *)
277+
* via the socket and exit. *)
278278
match Unix.waitpid [Unix.WNOHANG] result with
279279
| pid, status when pid = result ->
280280
report_child_exit comms_sock args result status ;

0 commit comments

Comments
 (0)