From 638d3092fa8778373e1d04054f3f4c39b8e72a72 Mon Sep 17 00:00:00 2001 From: Mike Zeller Date: Wed, 11 Dec 2024 04:02:29 +0000 Subject: [PATCH 1/3] Fix typo Created using spr 1.3.6-beta.1 --- sled-agent/src/sled_agent.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sled-agent/src/sled_agent.rs b/sled-agent/src/sled_agent.rs index d0a653268e..a154faac2c 100644 --- a/sled-agent/src/sled_agent.rs +++ b/sled-agent/src/sled_agent.rs @@ -1389,7 +1389,7 @@ impl SledAgent { pub(crate) async fn support_pstack_info( &self, ) -> Vec> { - sled_diagnostics::pargs_oxide_processes(&self.log).await + sled_diagnostics::pstack_oxide_processes(&self.log).await } } From 3db8b04172ce00bfd3b218eca364a48b381ba856 Mon Sep 17 00:00:00 2001 From: Mike Zeller Date: Sun, 15 Dec 2024 18:16:28 +0000 Subject: [PATCH 2/3] license Created using spr 1.3.6-beta.1 --- sled-diagnostics/src/contract.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sled-diagnostics/src/contract.rs b/sled-diagnostics/src/contract.rs index 8b090b3193..295e11d699 100644 --- a/sled-diagnostics/src/contract.rs +++ b/sled-diagnostics/src/contract.rs @@ -1,3 +1,9 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + +// ! Bindings to libcontract(3lib). + use fs_err as fs; use libc::{c_char, c_int, c_void, pid_t}; use slog::{warn, Logger}; From 331ac9a90c4c250e72cea2843928c762a91a552e Mon Sep 17 00:00:00 2001 From: Mike Zeller Date: Thu, 19 Dec 2024 18:32:07 +0000 Subject: [PATCH 3/3] 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()?); } }