Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a catchall for unhandled failure cases #138

Merged
merged 1 commit into from
Apr 17, 2018

Conversation

mlehner616
Copy link
Contributor

@mlehner616 mlehner616 commented Apr 17, 2018

This adds a catchall to log very useful events that are not displayed anywhere else upon deployment failure.

For example:
This output isn't very helpful to developers in deploy output. There's no explanation on why it failed.

2018/04/17 12:40:59 PDT [ERROR] levant/deploy: deployment ee8fb7f8-4277-11e8-a099-17687cc3cd50 has status failed
2018/04/17 12:40:59 PDT [ERROR] levant/failure_inspector: alloc fee09c3a-4277-11e8-b4ac-4fe73209d2f7 incurred event killed because the task was successfully killed

This change would add the missed events that were not picked up by the case statement.

  2018/04/17 12:40:59 PDT [ERROR] levant/deploy: deployment ee8fb7f8-4277-11e8-a099-17687cc3cd50 has status failed
+ 2018/04/17 12:40:59 PDT [ERROR] levant/failure_inspector: alloc fee09c3a-4277-11e8-b4ac-4fe73209d2f7 logged for failure; event_type: received; message: task received by client
+ 2018/04/17 12:40:59 PDT [ERROR] levant/failure_inspector: alloc fee09c3a-4277-11e8-b4ac-4fe73209d2f7 logged for failure; event_type: task setup; message: building task directory
+ 2018/04/17 12:40:59 PDT [ERROR] levant/failure_inspector: alloc fee09c3a-4277-11e8-b4ac-4fe73209d2f7 logged for failure; event_type: template; message: missing: vault.read(secret/mysecret/key)
+ 2018/04/17 12:40:59 PDT [ERROR] levant/failure_inspector: alloc fee09c3a-4277-11e8-b4ac-4fe73209d2f7 logged for failure; event_type: alloc unhealthy; message: task not running by deadline
  2018/04/17 12:40:59 PDT [ERROR] levant/failure_inspector: alloc fee09c3a-4277-11e8-b4ac-4fe73209d2f7 incurred event killed because the task was successfully killed

This adds a catchall to log very useful events that are not handled anywhere else upon deployment failure and are missed under certain failure cases.
@jrasell
Copy link
Member

jrasell commented Apr 17, 2018

awesome @mlehner616 thanks for this

@jrasell jrasell merged commit db39fab into hashicorp:master Apr 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants