From c98ac0494d693e36c6f88131b36ac4353af20275 Mon Sep 17 00:00:00 2001 From: Hannes Mehnert Date: Tue, 16 Jun 2020 09:58:10 +0200 Subject: [PATCH] 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) --- command-line/albatross_cli.ml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/command-line/albatross_cli.ml b/command-line/albatross_cli.ml index 7ea26a9..31241fa 100644 --- a/command-line/albatross_cli.ml +++ b/command-line/albatross_cli.ml @@ -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)"