diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2017-11-30 17:14:18 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2017-12-01 13:58:11 +0100 |
| commit | 2fa91450df792689c42bd52f98ffdacee99ace91 (patch) | |
| tree | 6bac47c9c556725b596af31c0212d57fc6157575 /vm | |
| parent | 5683420f11c9eb812a57f2c5786b38015a652fa0 (diff) | |
dashboard/app: add manager monitoring
Make it possible to monitor health and operation
of all managers from dashboard.
1. Notify dashboard about internal syz-ci errors
(currently we don't know when/if they happen).
2. Send statistics from managers to dashboard.
Diffstat (limited to 'vm')
| -rw-r--r-- | vm/vm.go | 9 | ||||
| -rw-r--r-- | vm/vmimpl/vmimpl.go | 4 |
2 files changed, 7 insertions, 6 deletions
@@ -37,18 +37,15 @@ type Instance struct { index int } -type ( - Env vmimpl.Env - BootError vmimpl.BootError -) +type Env vmimpl.Env var ( Shutdown = vmimpl.Shutdown TimeoutErr = vmimpl.TimeoutErr ) -func (err BootError) Error() string { - return fmt.Sprintf("%v\n%s", err.Title, err.Output) +type BootErrorer interface { + BootError() (string, []byte) } func Create(typ string, env *Env) (*Pool, error) { diff --git a/vm/vmimpl/vmimpl.go b/vm/vmimpl/vmimpl.go index 81f798d26..2e3833d89 100644 --- a/vm/vmimpl/vmimpl.go +++ b/vm/vmimpl/vmimpl.go @@ -66,6 +66,10 @@ func (err BootError) Error() string { return fmt.Sprintf("%v\n%s", err.Title, err.Output) } +func (err BootError) BootError() (string, []byte) { + return err.Title, err.Output +} + // Create creates a VM type that can be used to create individual VMs. func Create(typ string, env *Env) (Pool, error) { ctor := ctors[typ] |
