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

overlord/snapshotstate: include the last message printed by tar in the error #9953

Merged
merged 1 commit into from
Feb 24, 2021

Conversation

bboozzoo
Copy link
Collaborator

When tar fails with a fatal error, include the last message it prints, as it
will likely contain the actual error.

Related to https://bugs.launchpad.net/stuttgart/+bug/1915781, where the root
cause of the problem was caused by the directory getting modified while tar was
processing it.

Supersedes #9941

…e error

When tar fails with a fatal error, include the last message it prints, as it
will likely contain the actual error.

Related to https://bugs.launchpad.net/stuttgart/+bug/1915781, where the root
cause of the problem was caused by the directory getting modified while tar was
processing it.

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
@bboozzoo bboozzoo added the Simple 😃 A small PR which can be reviewed quickly label Feb 23, 2021
Copy link
Collaborator

@zyga zyga left a comment

Choose a reason for hiding this comment

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

Looks good

@mvo5
Copy link
Contributor

mvo5 commented Feb 23, 2021

This looks fine but I wonder if we should include maybe the last ~5 messages or something (followup becuase this already improves things so we should take it :)

Copy link
Member

@anonymouse64 anonymouse64 left a comment

Choose a reason for hiding this comment

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

LGTM, but I agree with @mvo5's suggestion more messages would be better I think

@bboozzoo
Copy link
Collaborator Author

I've added a followup in #9957, which keeps some number of the last lines tar printed. Only after I added more tests it also turned out that the matcher keeps only some number of lines from the beginning, so the new PR also fixes that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Simple 😃 A small PR which can be reviewed quickly
Projects
None yet
4 participants