Skip to content

Expose logs when container started but exited with errors#527

Merged
metrue merged 5 commits intomasterfrom
fix-expose-container-startup-error
May 16, 2020
Merged

Expose logs when container started but exited with errors#527
metrue merged 5 commits intomasterfrom
fix-expose-container-startup-error

Conversation

@metrue
Copy link
Owner

@metrue metrue commented May 16, 2020

Issue: Close #502
Summary:

The checklist before PR is ready for review:

  • has unit testing for new added codes
  • has functional testing for new added features
  • has checked the lint or style issues
  • README updated if need

metrue added 3 commits May 16, 2020 13:54
* disable container auto-remove, only remove it when it fails to start
* call /containers/id/logs endpoint to get the logs
}

if err := api.RemoveContainer(createRes.ID); err != nil {
return errors.Wrap(err, "remove container failed")
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should append the logs into error message

@codecov
Copy link

codecov bot commented May 16, 2020

Codecov Report

Merging #527 into master will decrease coverage by 0.73%.
The diff coverage is 1.92%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #527      +/-   ##
==========================================
- Coverage   25.45%   24.71%   -0.74%     
==========================================
  Files          54       53       -1     
  Lines        1878     1922      +44     
==========================================
- Hits          478      475       -3     
- Misses       1320     1367      +47     
  Partials       80       80              
Impacted Files Coverage Δ
container_runtimes/docker/http/api.go 0.00% <0.00%> (ø)
container_runtimes/docker/sdk/docker.go 45.58% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 63bc06a...99c67f9. Read the comment docs.

@metrue metrue merged commit 6214581 into master May 16, 2020
@metrue metrue deleted the fix-expose-container-startup-error branch May 16, 2020 10:11
metrue added a commit that referenced this pull request May 16, 2020
Expose logs when container started but exited with errors (#527)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose error of container startup

1 participant