-
Notifications
You must be signed in to change notification settings - Fork 2
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
Log shim panic logs before shim cleanup #16
Conversation
@ambarve Bundle cleanup always gets called when cleaning up a container but shim delete doesn't, is that correct? So in most cases we'd get the shim panic logs logged twice? Once on shim delete and once on bundle cleanup when reading the file itself? |
@dcantah You are right, I was planning on removing that code from the shim delete command, I will push a PR for that. |
@ambarve Cool thanks for clarification! |
@dcantah Actually we shouldn't remove the logging changes added to hcsshim. This is because in some cases containerd calls shim delete first before calling delete on the bundle. In that case the shim delete command will remove the bundle directory and bundle cleanup will never find panic.log file. |
@ambarve Cool thanks for checking on this |
aec59f7
to
3b7de65
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small question and nit. Otherwise, LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment here about errors.Is
but otherwise lgtm!
We already have code in hcsshim that logs the contents of the panic.log file during shim delete command. However, that doesn't handle all of the cases. This change should fix that. Signed-off-by: Amit Barve <ambarve@microsoft.com>
Changes the bundle cleanup function to look for a file named panic.log and log the contents of that file if it exists.
We already added a change to hcsshim to log the contents of panic.log file during
shim delete
command. However, that doesn't handle all of the cases. This change should fix that.Signed-off-by: Amit Barve ambarve@microsoft.com