Skip to content

Commit

Permalink
Find propolis procs
Browse files Browse the repository at this point in the history
Created using spr 1.3.6-beta.1
  • Loading branch information
papertigers committed Dec 19, 2024
1 parent 3b048f9 commit 331ac9a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions sled-diagnostics/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ use std::{
};

const CT_ALL: &str = "/system/contract/all";
// Most Oxide services
const OXIDE_FMRI: &str = "svc:/oxide/";
// NB: Used for propolis zones
const ILLUMOS_FMRI: &str = "svc:/system/illumos/";
const CTD_ALL: i32 = 2;

#[allow(non_camel_case_types)]
Expand Down Expand Up @@ -168,8 +171,9 @@ pub fn find_oxide_pids(log: &Logger) -> Result<BTreeSet<i32>, ContractError> {
}
};

let fmri = status.get_fmri()?.unwrap_or_default();
if fmri.to_string_lossy().starts_with(OXIDE_FMRI) {
let fmri_owned = status.get_fmri()?.unwrap_or_default();
let fmri = fmri_owned.to_string_lossy();
if fmri.starts_with(OXIDE_FMRI) || fmri.starts_with(ILLUMOS_FMRI) {
pids.extend(status.get_members()?);
}
}
Expand Down

0 comments on commit 331ac9a

Please sign in to comment.