module Error: sig
.. end
type [> `Execution of
< host : string; message : string; stderr : string option;
stdout : string option >
| `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 >
| `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 >
| `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 >
| `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 >
| `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 | `Ssh | `Unix ]
Get a glance at the gravity of the situation:
`Unix
: a function of the kind Unix.exec
failed.
`Ssh
: SSH failed to run something but it does not mean that the
actual command is wrong.
`Execution
: SSH/Unix
succeeded but the command failed.
val log : [< `Execution of
< host : string; message : string; stderr : string option;
stdout : string option; .. >
| `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