summaryrefslogtreecommitdiff
path: root/workers/error.go
diff options
context:
space:
mode:
authorAleksander Mistewicz <a.mistewicz@samsung.com>2017-06-08 14:30:34 +0200
committerMaciej Wereski <m.wereski@partner.samsung.com>2017-09-20 11:43:41 +0200
commit46e1236e609298cc2cbd181c37cb7d2920664b00 (patch)
tree5f497cfa75b1638e7644c3a1c25e6a82f0e4536d /workers/error.go
parent310e803740d2cadf35e42dfef2c4c8844a13c50d (diff)
downloadboruta-46e1236e609298cc2cbd181c37cb7d2920664b00.tar.gz
boruta-46e1236e609298cc2cbd181c37cb7d2920664b00.tar.bz2
boruta-46e1236e609298cc2cbd181c37cb7d2920664b00.zip
Implement state update after failure
When Worker detects malfunction of Dryad it informs Boruta server of failure and reason of it. Boruta will not dispatch any jobs to worker in the FAIL state. Only administrator is able to change the state. Change-Id: I7132193218974fa3b8eb7d97d07b98e4e45dced3 Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com> Reviewed-on: https://mcdsrvbld02.digital.local/review/49057 Reviewed-by: Maciej Wereski <m.wereski@partner.samsung.com> Tested-by: Maciej Wereski <m.wereski@partner.samsung.com>
Diffstat (limited to 'workers/error.go')
-rw-r--r--workers/error.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/workers/error.go b/workers/error.go
index c6cf519..1b0f7d6 100644
--- a/workers/error.go
+++ b/workers/error.go
@@ -26,4 +26,8 @@ var (
// ErrMissingUUID is returned when Register is called
// with caps, which do not contain "UUID" field.
ErrMissingUUID = errors.New("Capabilities are missing UUID entry")
+ // ErrWorkerNotFound is returned when UUID argument does not match any worker on the list.
+ ErrWorkerNotFound = errors.New("Worker is not present on the list")
+ // ErrInMaintenance is returned when SetFail has been called for Worker in MAINTENANCE state.
+ ErrInMaintenance = errors.New("It is forbidden to set FAIL state when Worker is in MAINTENANCE state")
)