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 error message for fail to create record temp folder #209

Merged
merged 1 commit into from
Jul 26, 2024

Conversation

lancelui-amzn
Copy link
Contributor

If aperf record is run with sudo and exits without cleaning up its temp folder, future non-sudo aperf records will fail to create this folder and panic. This error message informs the user of the error, and how to remove the existing folder with root permissions.

Description of changes:
Added error check and message when aperf record creates the aperf_tmp folder.

Tested with existing tmp folder with different permissions. When aperf is unable to create the folder it displays this error message:

[2024-07-26T17:05:38Z ERROR aperf_lib::record] Could not create /tmp/aperf_tmp folder.
    File exists (os error 17): Remove using 'sudo rm -rf /tmp/aperf_tmp'.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@lancelui-amzn lancelui-amzn requested a review from a team as a code owner July 26, 2024 17:11
@lancelui-amzn lancelui-amzn merged commit a5df597 into aws:main Jul 26, 2024
6 checks passed
@lancelui-amzn lancelui-amzn deleted the record-temp-folder branch August 9, 2024 18:22
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