-
Notifications
You must be signed in to change notification settings - Fork 45
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
feat: pipe system logs to nucleus log path #1661
base: main
Are you sure you want to change the base?
Conversation
@@ -64,6 +65,7 @@ public class KernelAlternatives { | |||
private static final String KERNEL_LIB_DIR = "lib"; | |||
private static final String LOADER_PID_FILE = "loader.pid"; | |||
static final String LAUNCH_PARAMS_FILE = "launch.params"; | |||
public static final String LOGS_DIR = "logs"; |
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.
should read the Greengrass log directory, since the customer can configure it, right?
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.
Yep, thats right, gonna make that change now
@@ -24,9 +27,10 @@ public class NucleusPaths { | |||
private Path kernelAltsPath; | |||
private Path cliIpcInfoPath; | |||
private Path binPath; | |||
private Path logsPath; |
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.
we own the logger, the logger has methods to read the path it is going to write to already.
src/main/java/com/aws/greengrass/util/orchestration/SystemServiceUtils.java
Dismissed
Show dismissed
Hide dismissed
1e509ed
to
66a6f99
Compare
5f1515e
to
da6fefc
Compare
Binary incompatibility detected for commit 499419f. com.aws.greengrass.util.NucleusPaths is binary incompatible and is source incompatible because of CONSTRUCTOR_REMOVED Produced by binaryCompatability.py |
Unit Tests Coverage Report
Minimum allowed coverage is Generated by 🐒 cobertura-action against 499419f |
Integration Tests Coverage Report
Minimum allowed coverage is Generated by 🐒 cobertura-action against 499419f |
Why do we log into |
|
||
import java.util.Scanner; | ||
|
||
public final class NucleusLogsSummarizer { |
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.
What about Windows log? They already exist and we just need to parse them
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.
Updated with windows logging as well
2c331ca
to
6a82f80
Compare
6a82f80
to
08aaf77
Compare
08aaf77
to
499419f
Compare
Issue #, if available:
Description of changes:
This modifies the loader script to dump its shell logs into
aws.greengrass.Nucleus.log
file. Nucleus reads this log file and summarizes loader logs as part of the deployment status FSS message in case a deployment finishes with a Nucleus Restart Failure. Nucleus also cleans up this log file while preparing for bootstrap to ensure a fresh set of loader logs for each bootstrap deployment.Why is this change necessary:
Currently, we do not have any mechanism to understand deployment failures due to NRF except chasing customers for loader logs. With this change, a summarized version of loader logs will be published to FSS which we can use to debug NRF failures further.
How was this change tested:
Any additional information or context required to review the change:
Documentation Checklist:
Compatibility Checklist:
any deprecated method or type.
Refer to Compatibility Guidelines for more information.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.