Skip to content

[sled-diagnostics] want chrony logs in support bundles #8530

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

Conversation

papertigers
Copy link
Contributor

@papertigers papertigers commented Jul 7, 2025

This fixes #8516

Note that this PR is on top of #8529

Created using spr 1.3.6-beta.1
@papertigers papertigers requested a review from smklein July 7, 2025 18:38
//
// TODO: Once omicron#4728 is picked up we will need to handle the
// rotation and sorting of these files.
if service == "ntp" {
Copy link
Collaborator

Choose a reason for hiding this comment

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

  • Could we match on service, to make it clear this is basically the same thing we're doing with cockroachdb above?
  • How much of this is "NTP-specific"? E.g., why not grab service_logs.extra as a catch-all for all services?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It does match on the service being ntp, but I will add the filter to make sure we are only grabbing those files for now.

I have been treating things in extra as a case by case basis. For example the log file names in cockroachdb look very different from the log names of chrony.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I mean we could do:

match service {
  "cockroachdb" => ...
  "ntp" => ...
  _ => ...
}

Which we are not doing; we are using two separate "if" statements

My question is, for the following logic:

                for log in service_logs.extra {
                    self.process_logs(
                        &service,
                        &mut zip,
                        &mut log_snapshots,
                        log.path.as_path(),
                        LogType::Extra,
                    )
                    .await?;
                }

What about this is "NTP-specific"? This seems like a generic way to "grab all extra logs", and could be the default thing we do for services

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh yea totally -- will get something pushed to make that generic with some extra comments.

Created using spr 1.3.6-beta.1
@papertigers papertigers requested a review from smklein July 18, 2025 19:28
Created using spr 1.3.6-beta.1
@papertigers
Copy link
Contributor Author

From a collection on berlin:

  rack/b4565385-52aa-4176-bb05-76fad7573be5/sled/14e180a6-5553-4d44-b4da-dda35f1b00dd/logs/oxz_ntp_abe0fa40-9271-421d-b914-538e6531bf26/ntp/extra/                                                                                                                                                                  
  rack/b4565385-52aa-4176-bb05-76fad7573be5/sled/14e180a6-5553-4d44-b4da-dda35f1b00dd/logs/oxz_ntp_abe0fa40-9271-421d-b914-538e6531bf26/ntp/extra/measurements.log                                                                                                                                                              
  rack/b4565385-52aa-4176-bb05-76fad7573be5/sled/14e180a6-5553-4d44-b4da-dda35f1b00dd/logs/oxz_ntp_abe0fa40-9271-421d-b914-538e6531bf26/ntp/extra/statistics.log                                                                                                                                                                
  rack/b4565385-52aa-4176-bb05-76fad7573be5/sled/14e180a6-5553-4d44-b4da-dda35f1b00dd/logs/oxz_ntp_abe0fa40-9271-421d-b914-538e6531bf26/ntp/extra/tracking.log                                                                                                                                                                 

Created using spr 1.3.6-beta.1
@papertigers papertigers merged commit 4e9c4bf into spr/papertigers/main.sled-diagnostics-want-chrony-logs-in-support-bundles Jul 18, 2025
17 checks passed
@papertigers papertigers deleted the spr/papertigers/sled-diagnostics-want-chrony-logs-in-support-bundles branch July 18, 2025 22:32
@papertigers papertigers restored the spr/papertigers/sled-diagnostics-want-chrony-logs-in-support-bundles branch July 18, 2025 22:33
@papertigers
Copy link
Contributor Author

Sigh I merged this into the wrong spot because I forgot it wasn't against main. The real PR is #8645

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