|
|
c71a15 |
From ff5e73b29b1fcc4c5531654d4f67f808408aa989 Mon Sep 17 00:00:00 2001
|
|
|
c71a15 |
From: Pablo Acevedo Montserrat <pacevedo@redhat.com>
|
|
|
c71a15 |
Date: Thu, 2 Mar 2023 12:12:06 +0100
|
|
|
c71a15 |
Subject: [PATCH] [microshift] Fix microshift get and add commands
|
|
|
c71a15 |
|
|
|
c71a15 |
Drop microshift get usage in favor of oc get commands.
|
|
|
c71a15 |
Add version and show-config commands before running inspect.
|
|
|
c71a15 |
|
|
|
c71a15 |
Closes https://issues.redhat.com/browse/USHIFT-932
|
|
|
c71a15 |
|
|
|
c71a15 |
Signed-off-by: Pablo Acevedo Montserrat <pacevedo@redhat.com>
|
|
|
c71a15 |
---
|
|
|
c71a15 |
sos/report/plugins/microshift.py | 9 +++++++--
|
|
|
c71a15 |
1 file changed, 7 insertions(+), 2 deletions(-)
|
|
|
c71a15 |
|
|
|
c71a15 |
diff --git a/sos/report/plugins/microshift.py b/sos/report/plugins/microshift.py
|
|
|
c71a15 |
index 953eb88e..69981d63 100644
|
|
|
c71a15 |
--- a/sos/report/plugins/microshift.py
|
|
|
c71a15 |
+++ b/sos/report/plugins/microshift.py
|
|
|
c71a15 |
@@ -86,9 +86,10 @@ class Microshift(Plugin, RedHatPlugin):
|
|
|
c71a15 |
|
|
|
c71a15 |
def _get_namespaces(self):
|
|
|
c71a15 |
res = self.exec_cmd(
|
|
|
c71a15 |
- 'microshift get namespaces'
|
|
|
c71a15 |
+ 'oc get namespaces'
|
|
|
c71a15 |
' -o custom-columns=NAME:.metadata.name'
|
|
|
c71a15 |
- ' --no-headers')
|
|
|
c71a15 |
+ ' --no-headers'
|
|
|
c71a15 |
+ ' --kubeconfig=%s' % self.get_option('kubeconfig'))
|
|
|
c71a15 |
if res['status'] == 0:
|
|
|
c71a15 |
return self._reduce_namespace_list(res['output'].split('\n'))
|
|
|
c71a15 |
return []
|
|
|
c71a15 |
@@ -146,6 +147,10 @@ class Microshift(Plugin, RedHatPlugin):
|
|
|
c71a15 |
which is used to retrieve all API resources from the cluster.
|
|
|
c71a15 |
"""
|
|
|
c71a15 |
self.add_forbidden_path('/var/lib/microshift')
|
|
|
c71a15 |
+ self.add_cmd_output([
|
|
|
c71a15 |
+ 'microshift version',
|
|
|
c71a15 |
+ 'microshift show-config -m effective'
|
|
|
c71a15 |
+ ])
|
|
|
c71a15 |
|
|
|
c71a15 |
_cluster_resources_to_collect = ",".join(
|
|
|
c71a15 |
self._get_cluster_resources())
|
|
|
c71a15 |
--
|
|
|
c71a15 |
2.39.2
|
|
|
c71a15 |
|