From 331ac9a90c4c250e72cea2843928c762a91a552e Mon Sep 17 00:00:00 2001 From: Mike Zeller Date: Thu, 19 Dec 2024 18:32:07 +0000 Subject: [PATCH] Find propolis procs Created using spr 1.3.6-beta.1 --- sled-diagnostics/src/contract.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sled-diagnostics/src/contract.rs b/sled-diagnostics/src/contract.rs index 295e11d699..f6bca904f9 100644 --- a/sled-diagnostics/src/contract.rs +++ b/sled-diagnostics/src/contract.rs @@ -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)] @@ -168,8 +171,9 @@ pub fn find_oxide_pids(log: &Logger) -> Result, 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()?); } }