module Error: sig
.. end
type [> `Execution of
< host : string; message : string; stderr : string option;
stdout : string option >
| `Named_host_not_found of string
| `Ssh_failure of
[> `Wrong_log of string | `Wrong_status of Unix_process.Exit_code.t ] *
string
| `System of [> `Sleep of float ] * [> `Exn of exn ]
| `Timeout of float
| `Unix_exec of string ]
execution = [> `Execution of
< host : string; message : string; stderr : string option;
stdout : string option >
| `Named_host_not_found of string
| `Ssh_failure of
[> `Wrong_log of string | `Wrong_status of Unix_process.Exit_code.t ] *
string
| `System of [> `Sleep of float ] * [> `Exn of exn ]
| `Timeout of float
| `Unix_exec of string ]
as 'a
type [> `Execution of
< host : string; message : string; stderr : string option;
stdout : string option >
| `Named_host_not_found of string
| `Non_zero of string * int
| `Ssh_failure of
[> `Wrong_log of string | `Wrong_status of Unix_process.Exit_code.t ] *
string
| `System of [> `Sleep of float ] * [> `Exn of exn ]
| `Timeout of float
| `Unix_exec of string ]
execution
non_zero_execution = ([> `Execution of
< host : string; message : string; stderr : string option;
stdout : string option >
| `Named_host_not_found of string
| `Non_zero of string * int
| `Ssh_failure of
[> `Wrong_log of string | `Wrong_status of Unix_process.Exit_code.t ] *
string
| `System of [> `Sleep of float ] * [> `Exn of exn ]
| `Timeout of float
| `Unix_exec of string ]
as 'a)
execution
type
classified = [ `Fatal of string | `Recoverable of string ]
The “imposed” error types for “long-running” plugins.
A `Fatal _
error will make the target die with the error,
whereas if an error is `Recoverable _
Ketrew will keep trying
(for example, a networking error which may not happen later).
val classify : [ `Execution of
< host : string; message : string; stderr : string option;
stdout : string option >
| `Named_host_not_found of string
| `Non_zero of string * int
| `Ssh_failure of
[> `Wrong_log of string | `Wrong_status of Unix_process.Exit_code.t ] *
string
| `System of [ `Sleep of float ] * [ `Exn of exn ]
| `Timeout of float
| `Unix_exec of string ] ->
[ `Command_execution | `Connectivity | `Local_system ]
Get a glance at the gravity of the situation:
`Local_system
: a function of the kind Unix.exec
failed.
`Connectivity
: Host_io
failed to run something but it does not
mean that the actual command is wrong; connectivity can be
restored later.
`Command_execution
: the system and networking did their job
but the particular command failed.
val log : [< `Execution of
< host : string; message : string; stderr : string option;
stdout : string option; .. >
| `Named_host_not_found of string
| `Non_zero of string * int
| `Ssh_failure of
[< `Wrong_log of string | `Wrong_status of Unix_process.Exit_code.t ] *
string
| `System of [< `Sleep of float ] * [< `Exn of exn ]
| `Timeout of float
| `Unix_exec of string ] ->
Ketrew_pure.Internal_pervasives.Log.t