98 lines
3.4 KiB
Diff
98 lines
3.4 KiB
Diff
From 5e7a01d9df2bc4e1f2659ace959ea52228ee1eee Mon Sep 17 00:00:00 2001
|
|
From: akumari <akumari@redhat.com>
|
|
Date: Wed, 1 Jul 2026 09:26:52 +0530
|
|
Subject: [PATCH 1/2] [foremanctl] Enable plugin for containerized deployments
|
|
|
|
The plugin required foremanctl package which doesn't exist in
|
|
containerized mode. Add container detection to enable the plugin
|
|
and collect foremanctl health diagnostics for support cases.
|
|
|
|
Signed-off-by: akumari <akumari@redhat.com>
|
|
---
|
|
sos/report/plugins/foremanctl.py | 29 +++++++++++++++++++++++++----
|
|
1 file changed, 25 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/sos/report/plugins/foremanctl.py b/sos/report/plugins/foremanctl.py
|
|
index 1b6ba4a4..0425cc05 100644
|
|
--- a/sos/report/plugins/foremanctl.py
|
|
+++ b/sos/report/plugins/foremanctl.py
|
|
@@ -19,6 +19,7 @@ class Foremanctl(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
|
|
plugin_name = 'foremanctl'
|
|
profiles = ('sysmgmt',)
|
|
packages = ('foremanctl', )
|
|
+ containers = ('foreman', 'foreman-proxy',)
|
|
|
|
def setup(self):
|
|
self.add_copy_spec([
|
|
@@ -29,14 +30,34 @@ class Foremanctl(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
|
|
|
|
self.add_cmd_output([
|
|
"foremanctl features",
|
|
+ "foremanctl health",
|
|
])
|
|
|
|
self.add_dir_listing(["/var/lib/foremanctl/"], recursive=True)
|
|
|
|
def postproc(self):
|
|
- self.do_path_regex_sub("/var/lib/foremanctl/parameters.yaml",
|
|
- r"(foreman_initial_admin_password:\s*)(.*)",
|
|
- r"\1********")
|
|
-
|
|
+ # Scrub passwords, credentials, tokens, secrets, and keys
|
|
+ self.do_path_regex_sub(
|
|
+ "/var/lib/foremanctl/parameters.yaml",
|
|
+ r"((.*)?(passw|cred|token|secret|key).*(\:\s|=))(.*)",
|
|
+ r"\1********")
|
|
+
|
|
+ # Scrub passwords from foremanctl logs - Pattern 1: key=value format
|
|
+ self.do_path_regex_sub(
|
|
+ "/var/log/foremanctl/foremanctl.*log*",
|
|
+ r"((passw|cred|token|secret|key)\w*\s*=\s*)(.*?)(\s|,|\"|'|$)",
|
|
+ r"\1********\4")
|
|
+
|
|
+ # Scrub passwords from foremanctl logs - Pattern 2: "password something" format
|
|
+ self.do_path_regex_sub(
|
|
+ "/var/log/foremanctl/foremanctl.*log*",
|
|
+ r"(password\s+)(.*?)(\s|,|\"|$)",
|
|
+ r"\1********\3")
|
|
+
|
|
+ # Scrub admin credentials in username:password format
|
|
+ self.do_path_regex_sub(
|
|
+ "/var/log/foremanctl/foremanctl.*log*",
|
|
+ r"(Admin credentials:\s+\w+:)(.*?)(\"|,|$)",
|
|
+ r"\1********\3")
|
|
|
|
# vim: set et ts=4 sw=4 :
|
|
--
|
|
2.54.0
|
|
|
|
From 3b6bbcb819e05aecf0fec4767588ea0376c9f218 Mon Sep 17 00:00:00 2001
|
|
From: akumari <akumari@redhat.com>
|
|
Date: Tue, 7 Jul 2026 14:06:40 +0530
|
|
Subject: [PATCH 2/2] [valkey] Add container support for containerized
|
|
deployments
|
|
|
|
Adds container support to the valkey plugin to enable it
|
|
for containerized deployments using foremanctl/quadlet.
|
|
|
|
Signed-off-by: akumari <akumari@redhat.com>
|
|
---
|
|
sos/report/plugins/valkey.py | 1 +
|
|
1 file changed, 1 insertion(+)
|
|
|
|
diff --git a/sos/report/plugins/valkey.py b/sos/report/plugins/valkey.py
|
|
index 26a74a56..f7b49253 100644
|
|
--- a/sos/report/plugins/valkey.py
|
|
+++ b/sos/report/plugins/valkey.py
|
|
@@ -19,6 +19,7 @@ class Valkey(Plugin, IndependentPlugin):
|
|
profiles = ('services',)
|
|
|
|
packages = ('valkey',)
|
|
+ containers = ('valkey',)
|
|
|
|
var_puppet_gen = "/var/lib/config-data/puppet-generated/valkey"
|
|
|
|
--
|
|
2.54.0
|
|
|