Skip to content

Commit 331ac9a

Browse files
committed
Find propolis procs
Created using spr 1.3.6-beta.1
1 parent 3b048f9 commit 331ac9a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

sled-diagnostics/src/contract.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ use std::{
1717
};
1818

1919
const CT_ALL: &str = "/system/contract/all";
20+
// Most Oxide services
2021
const OXIDE_FMRI: &str = "svc:/oxide/";
22+
// NB: Used for propolis zones
23+
const ILLUMOS_FMRI: &str = "svc:/system/illumos/";
2124
const CTD_ALL: i32 = 2;
2225

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

171-
let fmri = status.get_fmri()?.unwrap_or_default();
172-
if fmri.to_string_lossy().starts_with(OXIDE_FMRI) {
174+
let fmri_owned = status.get_fmri()?.unwrap_or_default();
175+
let fmri = fmri_owned.to_string_lossy();
176+
if fmri.starts_with(OXIDE_FMRI) || fmri.starts_with(ILLUMOS_FMRI) {
173177
pids.extend(status.get_members()?);
174178
}
175179
}

0 commit comments

Comments
 (0)