retry-connections now defaults to 0

this makes it much easier to reason about the initialization.

for production, init scripts should enforce the dependency order
for testing, provide your own if desired

//cc MagnusS

also move enable_stats and retry_connections up (before exit codes)
This commit is contained in:
Hannes Mehnert 2020-06-16 09:58:10 +02:00
parent 21406965e7
commit c98ac0494d
1 changed files with 8 additions and 8 deletions

View File

@ -316,6 +316,14 @@ let set_dbdir = function
in
Vmm_unix.set_dbdir path
let enable_stats =
let doc = "Connect to albatross-stats to report statistics" in
Arg.(value & flag & info [ "enable-stats" ] ~doc)
let retry_connections =
let doc = "Number of retries when connecting to other daemons (log, console, stats etc). 0 aborts after one failure, -1 is unlimited retries." in
Arg.(value & opt int 0 & info [ "retry-connections" ] ~doc)
let exit_status = function
| Ok () -> Ok Success
| Error e -> Ok e
@ -353,14 +361,6 @@ let exits =
remote_command_failed ::
Term.default_exits
let enable_stats =
let doc = "Connect to albatross-stats to report statistics" in
Arg.(value & flag & info [ "enable-stats" ] ~doc)
let retry_connections =
let doc = "Number of retries when connecting to other daemons (log, console, stats etc). 0 aborts after one failure, -1 is unlimited retries." in
Arg.(value & opt int 3 & info [ "retry-connections" ] ~doc)
let auth_exits =
[ Term.exit_info ~doc:"on local authentication failure \
(certificate not accepted by remote)"