-
Notifications
You must be signed in to change notification settings - Fork 171
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 random 6-character suffix to log file names #1041
Merged
dannycjones
merged 5 commits into
awslabs:main
from
dannycjones:add-pid-to-log-file-on-fail
Oct 3, 2024
Merged
Add random 6-character suffix to log file names #1041
dannycjones
merged 5 commits into
awslabs:main
from
dannycjones:add-pid-to-log-file-on-fail
Oct 3, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dannycjones
had a problem deploying
to
PR integration tests
September 30, 2024 20:34 — with
GitHub Actions
Failure
dannycjones
had a problem deploying
to
PR integration tests
September 30, 2024 20:34 — with
GitHub Actions
Failure
dannycjones
had a problem deploying
to
PR integration tests
September 30, 2024 20:34 — with
GitHub Actions
Failure
dannycjones
had a problem deploying
to
PR integration tests
September 30, 2024 20:34 — with
GitHub Actions
Failure
dannycjones
had a problem deploying
to
PR integration tests
September 30, 2024 20:34 — with
GitHub Actions
Failure
dannycjones
had a problem deploying
to
PR integration tests
September 30, 2024 20:34 — with
GitHub Actions
Failure
dannycjones
had a problem deploying
to
PR integration tests
September 30, 2024 20:34 — with
GitHub Actions
Failure
I was just testing this, it doesn't cover running in the background yet. |
dannycjones
force-pushed
the
add-pid-to-log-file-on-fail
branch
from
September 30, 2024 20:39
be67c2d
to
f331808
Compare
dannycjones
had a problem deploying
to
PR integration tests
September 30, 2024 20:39 — with
GitHub Actions
Failure
dannycjones
had a problem deploying
to
PR integration tests
September 30, 2024 20:39 — with
GitHub Actions
Failure
dannycjones
had a problem deploying
to
PR integration tests
September 30, 2024 20:39 — with
GitHub Actions
Failure
dannycjones
had a problem deploying
to
PR integration tests
September 30, 2024 20:39 — with
GitHub Actions
Failure
dannycjones
had a problem deploying
to
PR integration tests
September 30, 2024 20:39 — with
GitHub Actions
Failure
dannycjones
had a problem deploying
to
PR integration tests
September 30, 2024 20:39 — with
GitHub Actions
Failure
dannycjones
had a problem deploying
to
PR integration tests
September 30, 2024 20:39 — with
GitHub Actions
Failure
Signed-off-by: Daniel Carl Jones <djonesoa@amazon.com>
dannycjones
force-pushed
the
add-pid-to-log-file-on-fail
branch
from
September 30, 2024 20:43
f331808
to
8e72529
Compare
dannycjones
had a problem deploying
to
PR integration tests
September 30, 2024 20:43 — with
GitHub Actions
Failure
dannycjones
had a problem deploying
to
PR integration tests
September 30, 2024 20:43 — with
GitHub Actions
Failure
dannycjones
had a problem deploying
to
PR integration tests
September 30, 2024 20:43 — with
GitHub Actions
Failure
dannycjones
had a problem deploying
to
PR integration tests
September 30, 2024 20:43 — with
GitHub Actions
Failure
dannycjones
had a problem deploying
to
PR integration tests
September 30, 2024 20:43 — with
GitHub Actions
Failure
dannycjones
had a problem deploying
to
PR integration tests
September 30, 2024 20:43 — with
GitHub Actions
Failure
dannycjones
had a problem deploying
to
PR integration tests
September 30, 2024 20:43 — with
GitHub Actions
Failure
…he timestamp Signed-off-by: Daniel Carl Jones <djonesoa@amazon.com>
dannycjones
had a problem deploying
to
PR integration tests
October 2, 2024 10:27 — with
GitHub Actions
Failure
dannycjones
had a problem deploying
to
PR integration tests
October 2, 2024 10:27 — with
GitHub Actions
Failure
dannycjones
had a problem deploying
to
PR integration tests
October 2, 2024 10:27 — with
GitHub Actions
Failure
dannycjones
temporarily deployed
to
PR integration tests
October 2, 2024 10:45 — with
GitHub Actions
Inactive
dannycjones
commented
Oct 2, 2024
passaro
reviewed
Oct 3, 2024
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.
Looks good. One minor suggestion.
Signed-off-by: Daniel Carl Jones <djonesoa@amazon.com>
dannycjones
had a problem deploying
to
PR integration tests
October 3, 2024 09:46 — with
GitHub Actions
Failure
dannycjones
had a problem deploying
to
PR integration tests
October 3, 2024 09:47 — with
GitHub Actions
Failure
dannycjones
had a problem deploying
to
PR integration tests
October 3, 2024 09:47 — with
GitHub Actions
Failure
dannycjones
had a problem deploying
to
PR integration tests
October 3, 2024 09:47 — with
GitHub Actions
Failure
dannycjones
had a problem deploying
to
PR integration tests
October 3, 2024 09:47 — with
GitHub Actions
Failure
dannycjones
had a problem deploying
to
PR integration tests
October 3, 2024 09:47 — with
GitHub Actions
Failure
dannycjones
had a problem deploying
to
PR integration tests
October 3, 2024 09:47 — with
GitHub Actions
Failure
Signed-off-by: Daniel Carl Jones <djonesoa@amazon.com>
dannycjones
temporarily deployed
to
PR integration tests
October 3, 2024 09:54 — with
GitHub Actions
Inactive
dannycjones
temporarily deployed
to
PR integration tests
October 3, 2024 09:54 — with
GitHub Actions
Inactive
dannycjones
temporarily deployed
to
PR integration tests
October 3, 2024 09:54 — with
GitHub Actions
Inactive
dannycjones
temporarily deployed
to
PR integration tests
October 3, 2024 09:54 — with
GitHub Actions
Inactive
dannycjones
temporarily deployed
to
PR integration tests
October 3, 2024 09:54 — with
GitHub Actions
Inactive
dannycjones
temporarily deployed
to
PR integration tests
October 3, 2024 09:54 — with
GitHub Actions
Inactive
dannycjones
temporarily deployed
to
PR integration tests
October 3, 2024 09:54 — with
GitHub Actions
Inactive
passaro
approved these changes
Oct 3, 2024
rajdchak
pushed a commit
to rajdchak/mountpoint-s3-fork
that referenced
this pull request
Oct 4, 2024
* Add PID to log file names if log file already exists Signed-off-by: Daniel Carl Jones <djonesoa@amazon.com> * Update log filenames to always include some random string following the timestamp Signed-off-by: Daniel Carl Jones <djonesoa@amazon.com> * Rename logging_config fn to make_logging_config Signed-off-by: Daniel Carl Jones <djonesoa@amazon.com> * Move make_logging_config back to method of CliArgs Signed-off-by: Daniel Carl Jones <djonesoa@amazon.com> --------- Signed-off-by: Daniel Carl Jones <djonesoa@amazon.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of change
Before this change, Mountpoint can write to the same log file if multiple Mountpoint processes spawn within the same second. This can cause log entries to be interleaved and reduces the effectiveness of debug logging since its impossible to tell which log entries relate to which Mountpoint process.
This change updates the log file creation logic to now include a six-character suffix between the timestamp and the
.log
suffix. An example of a new log file name:mountpoint-s3-2024-10-02T10-26-57Z.961grx.log
.We update the log config logic so that it can be defined before the fork, and then persists after fork. We know this is safe as it contains no state unsafe to share over forks.
This change also updates the logging documentation to indicate that log file names could always change in the future and shouldn't be considered stable. It also clarifies this behavior, since customers may only infrequently run into this scenario.
Relevant issues: N/A
Alternatives considered
Does this change impact existing behavior?
Yes. We now include a random suffix in the name of log files.
Before:
mountpoint-s3-2024-10-02T10-26-57Z.log
After:
mountpoint-s3-2024-10-02T10-26-57Z.961grx.log
Does this change need a changelog entry in any of the crates?
Yes, the main Mountpoint change log has been updated.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and I agree to the terms of the Developer Certificate of Origin (DCO).