-
Notifications
You must be signed in to change notification settings - Fork 40
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
Pull support-bundle/queries into a standalone crate #7193
Pull support-bundle/queries into a standalone crate #7193
Conversation
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
pub trait SledDiagnosticsCommandHttpOutput { | ||
fn get_output(self) -> String; | ||
} | ||
|
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.
I know this isn't new in this PR, but since we're exposing it from a crate API, we may want to revisit this trait name.
- The name is a little redundant with the crate
- The
HttpOutput
bit is especially confusing now, since this trait also has nothing to do with HTTP
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.
I left this as is because I knew it would be addressed in a PR on top of this PR.
The updated output type can be found in #7228
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
This PR adds support for finding all oxide processes via libcontract and relying on the fact that we deploy oxide services with the fmri prefix svc:/oxide/ or svc:/system/illumos. This allows us to find every pid started via smf even if the smf script uses ctrun. You can see this for yourself by running pfexec ctstat -av on a helios/illumos based system: ``` 205 1 process owned 2492 0 - - cookie: 0 informative event set: core critical event set: hwerr empty fatal event set: hwerr parameter set: noorphan regent member processes: 2497 inherited contracts: none service fmri: svc:/oxide/wicketd:default service fmri ctid: 204 creator: ctrun aux: 249 1 process owned 1334 0 - - cookie: 0x20 informative event set: none critical event set: hwerr empty fatal event set: none parameter set: inherit regent member processes: 2794 inherited contracts: none service fmri: svc:/oxide/dendrite:default service fmri ctid: 249 creator: svc.startd aux: start 254 1 process owned 1334 0 - - cookie: 0x20 informative event set: none critical event set: hwerr empty fatal event set: none parameter set: inherit regent member processes: 2802 inherited contracts: none service fmri: svc:/oxide/lldpd:default service fmri ctid: 254 creator: svc.startd aux: start ``` This PR is on top of: - #7193
This PR adds support for finding all oxide processes via libcontract and relying on the fact that we deploy oxide services with the fmri prefix svc:/oxide/ or svc:/system/illumos. This allows us to find every pid started via smf even if the smf script uses ctrun. You can see this for yourself by running pfexec ctstat -av on a helios/illumos based system: ``` 205 1 process owned 2492 0 - - cookie: 0 informative event set: core critical event set: hwerr empty fatal event set: hwerr parameter set: noorphan regent member processes: 2497 inherited contracts: none service fmri: svc:/oxide/wicketd:default service fmri ctid: 204 creator: ctrun aux: 249 1 process owned 1334 0 - - cookie: 0x20 informative event set: none critical event set: hwerr empty fatal event set: none parameter set: inherit regent member processes: 2794 inherited contracts: none service fmri: svc:/oxide/dendrite:default service fmri ctid: 249 creator: svc.startd aux: start 254 1 process owned 1334 0 - - cookie: 0x20 informative event set: none critical event set: hwerr empty fatal event set: none parameter set: inherit regent member processes: 2802 inherited contracts: none service fmri: svc:/oxide/lldpd:default service fmri ctid: 254 creator: svc.startd aux: start ``` This PR is on top of: - #7193
This pulls out sled-agent/support-bundle/queries from Omicron into a standalone sled-diagnostics crate that can be reused outside of sled-agent.