Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[squeezed] allow "balance-check-interval" to be set via config file

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
  • Loading branch information...
commit abffea91c760e2a33b45a34a97a5ff4b40c053cc 1 parent 31a2035
@djs55 djs55 authored
View
5 ocaml/xapi/xapi_globs.ml
@@ -607,9 +607,6 @@ let master_connection_default_timeout = ref 10.
let qemu_dm_ready_timeout = ref 300.
-(* seconds per balancing check *)
-let squeezed_balance_check_interval = ref 10.
-
(* Time we allow for the hotplug scripts to run before we assume something bad
has happened and abort *)
let hotplug_timeout = ref 300.
@@ -717,8 +714,6 @@ let xapi_globs_spec =
Config.Set_float master_connection_default_timeout;
"qemu_dm_ready_timeout",
Config.Set_float qemu_dm_ready_timeout;
- "squeezed_balance_check_interval",
- Config.Set_float squeezed_balance_check_interval;
"hotplug_timeout",
Config.Set_float hotplug_timeout;
"pif_reconfigure_ip_timeout",
View
4 ocaml/xenops/squeezed.ml
@@ -32,11 +32,13 @@ let config_file = ref (Printf.sprintf "/etc/%s.conf" name)
let pidfile = ref (Printf.sprintf "/var/run/%s.pid" name)
let log_destination = ref "syslog:daemon"
let daemon = ref false
+let balance_check_interval = ref 10.
let config_spec = [
"pidfile", Config.Set_string pidfile;
"log", Config.Set_string log_destination;
"daemon", Config.Set_bool daemon;
+ "balance-check-interval", Config.Set_float balance_check_interval;
"disable-logging-for", Config.String
(fun x ->
try
@@ -329,7 +331,7 @@ let _ =
Unixext.mkdir_rec (Filename.dirname !pidfile) 0o755;
Unixext.pidfile_write !pidfile;
- debug "Starting daemon listening on %s with idle_timeout = %.0f" _service !Xapi_globs.squeezed_balance_check_interval;
+ debug "Starting daemon listening on %s with idle_timeout = %.0f" _service !balance_check_interval;
let module Server = Memory_interface.Server(Memory_server) in
Debug.with_thread_associated "main" (start sockets) Server.process;
View
4 scripts/squeezed.conf
@@ -5,3 +5,7 @@ pidfile=/var/run/squeezed.pid
# Omit some sources of log-spam by default
disable-logging-for=http
+
+# Host memory will be re-examined and possibly re-balanced
+# every balance-check-interval
+balance-check-interval=10
Please sign in to comment.
Something went wrong with that request. Please try again.