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

Fix error reporting #782

Merged
merged 1 commit into from
Sep 4, 2019
Merged

Fix error reporting #782

merged 1 commit into from
Sep 4, 2019

Conversation

lblackstone
Copy link
Member

@lblackstone lblackstone commented Sep 4, 2019

Proposed changes

  • Pod errors were logged during updates, but not reported properly
    at the top level if the update failed
  • Wrap update error messages to provide better context for
    failures
  • Properly extract suberrors from wrapped errors so that they are
    reported

Here's what a failed Pod create looked like before:

  kubernetes:core:Pod (pod-test):
    error: Plan apply failed: 1 error occurred:
    	* resource pod-test-4e7xarx6 was successfully created, but the Kubernetes API server reported that it failed to fully initialize or become live: Resource operation was cancelled for 'pod-test-4e7xarx6'

With this change:

  kubernetes:core:Pod (pod-test):
    error: Plan apply failed: 2 errors occurred:
    	* resource pod-test-33ffnqif was successfully created, but the Kubernetes API server reported that it failed to fully initialize or become live: Resource operation was cancelled for "pod-test-33ffnqif"
    	* containers with unready status: [nginx] -- [ErrImagePull] manifest for nginx:1.13-fail not found: manifest unknown

Here's what a failed update looked like before:

  kubernetes:core:Pod (pod-test):
    error: Plan apply failed: 2 errors occurred:
    	* Resource operation was cancelled for 'pod-test-y8znfbm5'
    	* containers with unready status: [nginx] -- [ImagePullBackOff] Back-off pulling image "nginx:1.13-fail"

With this change:

  kubernetes:core:Pod (pod-test):
    error: Plan apply failed: 2 errors occurred:
    	* the Kubernetes API server reported that "pod-test-xn9sqrod" failed to fully initialize or become live: Resource operation was cancelled for "pod-test-xn9sqrod"
    	* containers with unready status: [nginx] -- [ImagePullBackOff] Back-off pulling image "nginx:1.13-fail"

Related issues (optional)

- Pod errors were logged during updates, but not reported properly
at the top level if the update failed
- Wrap update error messages to provide better context for
failures
- Properly extract suberrors from wrapped errors so that they are
reported
@lblackstone lblackstone merged commit c4aee18 into master Sep 4, 2019
@pulumi-bot pulumi-bot deleted the lblackstone/error-handling branch September 4, 2019 20:41
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