Skip to content

Commit 8da3362

Browse files
sos: add DNS troubleshooting outputs
1 parent 2781722 commit 8da3362

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
[1.31.10](https://github.com/kubernetes/kubernetes/releases/tag/v1.31.10)
99
(PR[#4610](https://github.com/scality/metalk8s/pull/4610))
1010

11+
- Add DNS troubleshooting outputs to `sosreport` plugin
12+
(PR[#4621](https://github.com/scality/metalk8s/pull/4621))
13+
1114
## Release 130.0.4 (in development)
1215

1316
## Release 130.0.3

packages/common/metalk8s-sosreport/metalk8s.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626

2727

2828
class MetalK8s(Plugin, RedHatPlugin):
29-
3029
"""Metalk8s plugin"""
3130

3231
plugin_name = "metalk8s"
@@ -135,6 +134,18 @@ def _setup_common(self):
135134
for service in services:
136135
self.add_journal(units=service)
137136

137+
# Add DNS troubleshooting outputs
138+
# We're using bash -c to ensure that the command is run in a
139+
# bash shell, which is needed for the `time` command to work properly
140+
# since it's a shell builtin.
141+
self.add_cmd_output(
142+
"bash -c 'time hostname -f'", suggest_filename="time_hostname_-f"
143+
)
144+
self.add_cmd_output(
145+
"bash -c 'time salt-call --local test.ping'",
146+
suggest_filename="time_salt_call_--local_test_ping",
147+
)
148+
138149
def _setup_k8s_resources(
139150
self,
140151
): # pylint: disable=too-many-statements,too-many-locals

0 commit comments

Comments
 (0)